Skip to content

Make release-notes comment step non-fatal (fixes check_release_notes 403 on bot PRs) - #20198

Merged
T-Gro merged 1 commit into
mainfrom
fix/release-notes-comment-nonfatal-20133
Aug 4, 2026
Merged

Make release-notes comment step non-fatal (fixes check_release_notes 403 on bot PRs)#20198
T-Gro merged 1 commit into
mainfrom
fix/release-notes-comment-nonfatal-20133

Conversation

@T-Gro

@T-Gro T-Gro commented Aug 4, 2026

Copy link
Copy Markdown
Member

Problem

The required check_release_notes check 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_notes runs via pull_request_target, so GitHub executes the workflow from the default branch (main) for every PR regardless of its base branch. After the validation succeeds, the Create or update comment step tries to post the informational status comment and fails:

HttpError: Resource not accessible by integration
POST /repos/dotnet/fsharp/issues/<n>/comments  -> 403

Observed behaviour across recent runs: when a bot status comment already exists the step uses updateComment and succeeds, but on a PR with no existing comment the createComment call returns 403 and fails the whole job. The runner is granted Issues: write, so this is an environment/lockdown restriction on the Actions token creating new issue comments — not something the workflow permissions: block can fix. This turns a passing validation into a red required check and blocks auto-merge.

Fix

Mark the Create or update comment step with continue-on-error: true. Posting the informational comment is best-effort and must never fail the check. The real gate — exit 1 when release notes are genuinely missing — is unchanged.

Because pull_request_target always runs the default-branch workflow, this single change to main fixes check_release_notes for all PRs, including #20133.

@T-Gro
T-Gro requested a review from a team as a code owner August 4, 2026 10:38
@T-Gro
T-Gro force-pushed the fix/release-notes-comment-nonfatal-20133 branch from e1352cd to fc000be Compare August 4, 2026 10:42
@T-Gro
T-Gro requested a review from abonie August 4, 2026 10:43
@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Aug 4, 2026
@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label 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
T-Gro force-pushed the fix/release-notes-comment-nonfatal-20133 branch from fc000be to fe1352b Compare August 4, 2026 13:55
@T-Gro
T-Gro merged commit 92a3700 into main Aug 4, 2026
3 of 4 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in F# Compiler and Tooling Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants