Skip to content

Commit e1352cd

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 e1352cd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎.github/workflows/check_release_notes.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,12 @@ jobs:
305305
exit 1
306306
fi
307307
# Keep one bot comment current without evaluating pull request content as JavaScript.
308+
# Posting the informational comment must never fail the check itself: bot-authored
309+
# pull_request_target runs (e.g. Maestro/darc dependency updates) receive a
310+
# capped GITHUB_TOKEN and the comment API can return HTTP 403.
308311
- name: Create or update comment
309312
if: ${{ (success() || failure()) && steps.release_notes_changes.outputs.release-notes-check-message != '' }}
313+
continue-on-error: true
310314
uses: actions/github-script@v9
311315
env:
312316
COMMENT_BODY: ${{ steps.release_notes_changes.outputs.release-notes-check-message }}

0 commit comments

Comments
 (0)