Resilient PR homepage screenshot publishing with token fallback#110
Open
crazygo wants to merge 1 commit into
Open
Resilient PR homepage screenshot publishing with token fallback#110crazygo wants to merge 1 commit into
crazygo wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the resilience of the “PR Frontend E2E” workflow’s PR-comment screenshot publishing by falling back to the built-in GitHub token and making the publish script non-fatal when no token is available.
Changes:
- Updated the PR E2E workflow to set
GITHUB_TOKENviasecrets.GH_TOKEN || github.tokenfor the publish step. - Updated the publish script to warn and exit successfully when no token is present (instead of throwing).
- Added a short plan doc describing the motivation, phased plan, and acceptance criteria.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
docs/plans/2026-04-02-14-20-UTC-pr-homepage-screenshot-token-fallback.md |
Documents the background, goals, implementation phases, and acceptance criteria for token fallback/resilience. |
.github/workflows/pr_frontend_e2e.yml |
Switches screenshot publishing auth from a custom PAT secret to `secrets.GH_TOKEN |
.github/scripts/publish_pr_homepage_screenshot.js |
Skips publishing with a warning when no token is set, avoiding workflow failure in that scenario. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Motivation
PR Frontend E2Eworkflow from failing when a custom PAT-like secret is not configured for publishing PR homepage screenshots.Description
.github/scripts/publish_pr_homepage_screenshot.jsto not throw when no token is present; it now logs a warning and exits successfully whenGITHUB_TOKEN/GH_TOKENis missing..github/workflows/pr_frontend_e2e.ymlto setGITHUB_TOKENfor the publish step from the fallback chainsecrets.GH_TOKEN || github.tokeninstead ofsecrets.CRAZYGO_PAT.docs/plans/2026-04-02-14-20-UTC-pr-homepage-screenshot-token-fallback.mddocumenting the background, goals, plan, and acceptance criteria for the change.Testing
node --check .github/scripts/publish_pr_homepage_screenshot.jsto validate the script syntax and it succeeded.Codex Task