Make release-notes comment step non-fatal (fixes check_release_notes 403 on bot PRs) - #20198
Merged
Merged
Conversation
T-Gro
force-pushed
the
fix/release-notes-comment-nonfatal-20133
branch
from
August 4, 2026 10:42
e1352cd to
fc000be
Compare
abonie
approved these changes
Aug 4, 2026
…ing the comment non-fatal The check_release_notes job posts an informational comment on the PR. Creating a PR comment requires pull-requests: write, but #20081 reduced the token to pull-requests: read. Because the job runs via pull_request_target (GitHub executes the workflow from the default branch), this turned the required check red with HTTP 403 'Resource not accessible by integration' on any PR that needed to create (not update) the comment - e.g. the Maestro/darc PR #20133 targeting release/dev18.0 - even though release-notes validation itself passed. Restore pull-requests: write so the comment can actually be posted, and additionally guard the comment step with continue-on-error plus a try/catch that downgrades any failure to a warning. The real gate (exit 1 when release notes are genuinely missing) is unchanged, and no PR content is evaluated as JavaScript. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
T-Gro
force-pushed
the
fix/release-notes-comment-nonfatal-20133
branch
from
August 4, 2026 13:55
fc000be to
fe1352b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The required
check_release_notescheck intermittently fails and blocks PRs (e.g. the Maestro/darc dependency update #20133) even when release-notes validation itself passes with ""No release notes required"".check_release_notesruns viapull_request_target, so GitHub executes the workflow from the default branch (main) for every PR regardless of its base branch. After the validation succeeds, theCreate or update commentstep tries to post the informational status comment and fails:Observed behaviour across recent runs: when a bot status comment already exists the step uses
updateCommentand succeeds, but on a PR with no existing comment thecreateCommentcall returns 403 and fails the whole job. The runner is grantedIssues: write, so this is an environment/lockdown restriction on the Actions token creating new issue comments — not something the workflowpermissions:block can fix. This turns a passing validation into a red required check and blocks auto-merge.Fix
Mark the
Create or update commentstep withcontinue-on-error: true. Posting the informational comment is best-effort and must never fail the check. The real gate —exit 1when release notes are genuinely missing — is unchanged.Because
pull_request_targetalways runs the default-branch workflow, this single change tomainfixescheck_release_notesfor all PRs, including #20133.