Skip to content

TEST: M05 preview flow check (do not merge) - #282

Closed
RGood wants to merge 1 commit into
mainfrom
tmp/m05-preview-test
Closed

RGood wants to merge 1 commit into
mainfrom
tmp/m05-preview-test

Conversation

@RGood

@RGood RGood commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Temporary PR to verify the preview workflow after #247. Will be closed and the branch deleted after the test.

@RGood

RGood commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

/preview

RGood added a commit that referenced this pull request Nov 11, 2026
…orize job) (#283)

## Problem
The M05 live test (`/preview` on a PR) fails in the `authorize` job.
Authorization passes, but posting the acknowledgement comment is
rejected:

> HttpError: Resource not accessible by integration (POST
/repos//issues/282/comments)

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 had `issues:
write` and `pull-requests: read`. Failing run:
https://github.com/reddit/devvit-docs/actions/runs/43067039332

## Fix
Change the `authorize` job's `pull-requests` permission from `read` to
`write` (one line). This job:
- runs only code from the default branch (`ref: ${{ github.sha }}`,
`persist-credentials: false`),
- never checks out or executes PR code,
- is gated on the commenter being OWNER/MEMBER/COLLABORATOR with write+
repository permission.

The `preview` job, which does run PR code, is unchanged and keeps
`contents: read` only.

## Testing
`issue_comment` workflows run from the default branch, so this cannot be
tested on the PR. After merge, comment `/preview` on a test PR (I have
draft PR #282 ready) and confirm: acknowledgement comment appears, the
`preview` job starts, and its token has only `Contents: read`.

Part of M05 follow-up.
@RGood

RGood commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

/preview

@github-actions

Copy link
Copy Markdown

Preview requested for c9a1384ddba5.

Open the preview run. When ready, the Start preview tunnel log shows the live preview URL.

The preview stays available for up to six hours. Comment preview again to replace it.

@RGood

RGood commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

unrelated comment (M05 test: should not replace the active preview)

@RGood

RGood commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

M05 preview test complete; closing. Branch deleted.

@RGood RGood closed this Nov 11, 2026
@RGood
RGood deleted the tmp/m05-preview-test branch November 11, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant