Skip to content

Restore write permission for release-notes check comment - #20200

Closed
T-Gro wants to merge 2 commits into
mainfrom
fix/release-notes-comment-permission
Closed

Restore write permission for release-notes check comment#20200
T-Gro wants to merge 2 commits into
mainfrom
fix/release-notes-comment-permission

Conversation

@T-Gro

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

Copy link
Copy Markdown
Member

Posting the check_release_notes bot comment requires pull-requests: write,
but the token was reduced to read, so createComment failed with
Resource not accessible by integration and turned the check red even when no
release notes were required (e.g. the automated dotnet/arcade dependency-update
PRs). Restored the write scope and made the comment step best-effort so the
check reflects the release-notes verdict rather than the comment API result.

Expected check state

check_release_notes on this PR is expected to stay red. pull_request_target
loads its workflow from the default branch, so this PR runs the old workflow
still on main and hits the same read-only-token failure before the fix can
apply to itself. Subsequent pull request events use the fixed workflow once this
merges.

Posting the bot comment needs pull-requests: write; the token was reduced to read, so createComment failed with 'Resource not accessible by integration' and turned check_release_notes red even when no release notes were required. Restored the write scope and made the comment best-effort so the check reflects the release-notes verdict, not the comment API result.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The comment is informational only; the verdict is enforced by the shell step. Mark the comment step continue-on-error so an API or action-level failure (e.g. a read-only token) can never turn the check red.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
T-Gro added a commit that referenced this pull request Aug 4, 2026
…ing the comment non-fatal (#20198)

check_release_notes runs via pull_request_target, so GitHub executes the workflow from the default branch (main). Creating the informational PR comment requires pull-requests: write, but #20081 reduced the token to read, turning the check red with HTTP 403 on any PR that had to create (not update) the comment - e.g. Maestro/darc PR #20133. Restore pull-requests: write so the comment posts, and guard the comment step with continue-on-error plus try/catch so posting can never fail the release-notes verdict. Supersedes #20200.
@T-Gro

T-Gro commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

Superseded by #20198, which merged the same complete fix (restore \pull-requests: write\ + make the comment step non-fatal via \continue-on-error\ and try/catch). Closing as duplicate.

@T-Gro T-Gro closed this Aug 4, 2026
@T-Gro
T-Gro deleted the fix/release-notes-comment-permission branch August 4, 2026 13:56
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