Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/carmel-judgment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
name: Carmel Judgment Protocol 😼

permissions:
contents: read
pull-requests: write
issues: write

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- "**"

jobs:
judgment:
Expand All @@ -27,26 +35,24 @@ jobs:
run: npm run test:run

- name: 😼 Carmel Judgment Stamp
if: always()
if: ${{ always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }}
uses: actions/github-script@v7
env:
TESTS_OUTCOME: ${{ steps.tests.outcome }}
with:
script: |
const passed = process.env.TESTS_OUTCOME == "success";

const body = passed
? "😼✨ **Carmel Approval Stamp™**\n\n> *Adequate work, human.*"
: "😼🔥 **Carmel Chaos Stamp™**\n\n> *I sense weakness in these tests.*";

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body
});

if (!passed) core.setFailed("Carmel has rejected this PR.");

- name: 😼 Carmel Observes the Results
run: echo "Verdict delivered."
run: echo "Verdict delivered. "