Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
- Workflows triggered by `pull_request_target` have a write-capable token. They
must never check out the pull request head or execute files supplied by the
pull request. Read scripts and configuration from the base commit only.
- PR-body comments require pull-request write permission. Treat comment creation,
updates, and cleanup as best-effort feedback; the checker result alone decides
whether the enforcement job passes or fails.
6 changes: 4 additions & 2 deletions .github/workflows/pr-body.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
permissions:
contents: read
issues: write
pull-requests: read
pull-requests: write

concurrency:
group: pr-body-${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:

- name: Notify author on format failure
if: steps.validate.outputs.code != '0'
continue-on-error: true
uses: actions/github-script@v7
env:
FINDINGS_FILE: ${{ runner.temp }}/pr-body-check.txt
Expand Down Expand Up @@ -102,6 +103,7 @@ jobs:

- name: Clear format failure comment on success
if: steps.validate.outputs.code == '0'
continue-on-error: true
uses: actions/github-script@v7
with:
script: |
Expand All @@ -122,5 +124,5 @@ jobs:
}

- name: Fail when the body is invalid
if: steps.validate.outputs.code != '0'
if: always() && steps.validate.outputs.code != '0'
run: exit 1