Repository navigation
ci: fix preview acknowledgement comment (pull-requests: write on authorize job) - #283
Merged
Merged
Conversation
ben-harris-5
approved these changes
Nov 11, 2026
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 M05 live test (
/previewon a PR) fails in theauthorizejob. Authorization passes, but posting the acknowledgement comment is rejected:The response header shows the permissions the endpoint requires:
x-accepted-github-permissions: issues=write; pull_requests=write. Commenting on a pull request needs both. After #247 the job hadissues: writeandpull-requests: read. Failing run: https://github.com/reddit/devvit-docs/actions/runs/43067039332Fix
Change the
authorizejob'spull-requestspermission fromreadtowrite(one line). This job:ref: ${{ github.sha }},persist-credentials: false),The
previewjob, which does run PR code, is unchanged and keepscontents: readonly.Testing
issue_commentworkflows run from the default branch, so this cannot be tested on the PR. After merge, comment/previewon a test PR (I have draft PR #282 ready) and confirm: acknowledgement comment appears, thepreviewjob starts, and its token has onlyContents: read.Part of M05 follow-up.