Skip to content

Commit fc000be

Browse files
committed
Make release-notes comment step non-fatal to fix CI 403
check_release_notes runs via pull_request_target, so GitHub executes the workflow definition from the default branch (main). For bot-authored PRs such as Maestro/darc dependency updates (e.g. PR #20133), the run's GITHUB_TOKEN is capped and the issue-comment API returns HTTP 403 'Resource not accessible by integration', which failed the required check even though release-notes validation itself passed ('No release notes required'). Mark the 'Create or update comment' step with continue-on-error so posting the informational comment can never fail the check. The real gate (exit 1 when release notes are genuinely missing) is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 36ce348 commit fc000be

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/check_release_notes.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,14 @@ jobs:
305305
exit 1
306306
fi
307307
# Keep one bot comment current without evaluating pull request content as JavaScript.
308+
# Posting the informational comment is best-effort and must never fail the check:
309+
# this job runs via pull_request_target, and the Actions GITHUB_TOKEN is not always
310+
# permitted to create a new issue comment (the comment API can return HTTP 403
311+
# "Resource not accessible by integration"), even though release-notes validation
312+
# above has already succeeded.
308313
- name: Create or update comment
309314
if: ${{ (success() || failure()) && steps.release_notes_changes.outputs.release-notes-check-message != '' }}
315+
continue-on-error: true
310316
uses: actions/github-script@v9
311317
env:
312318
COMMENT_BODY: ${{ steps.release_notes_changes.outputs.release-notes-check-message }}

0 commit comments

Comments
 (0)