Recapture on main instead of holding branches up to date - #34
Merged
Conversation
ariofrio
enabled auto-merge (squash)
August 25, 2026 04:19
Requiring every branch to be up to date with main before merging made each merge invalidate every other open pull request, and with several open at once they serialised behind each other, re-running a full capture each time. Screenshots now also runs on main, so a branch that merges without recapturing is corrected there. The push uses a deploy key: GitHub Actions cannot be a bypass actor on a repository a person owns, so the workflow's own token cannot write to main. Protect main lets a deploy key through, and its bypass list offers one. The relevance step asks the compare API what a push replaced, the way it already asks the files API what a pull request changed, so neither path needs a deep checkout. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ariofrio
force-pushed
the
ariofrio/recapture-on-main-instead
branch
from
August 25, 2026 04:33
d88ac67 to
e64030e
Compare
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.
Summary
Screenshots now runs on main as well as on pull requests, so a branch that merges without recapturing is corrected there. A branch no longer has to be up to date with main to merge.
Motivation
Strict required checks meant every merge invalidated every other open pull request. With several branches open at once they serialised behind each other, each update re-running a full capture.
Changes
The recapture on main is pushed with a deploy key. GitHub Actions cannot be a bypass actor on a repository a person owns, so the workflow's own token cannot write to main.
Settings changed alongside the diff:
DeployKey, modealwaysstrict_required_status_checks_policySCREENSHOTS_DEPLOY_KEYTrade-offs
Each recapture on main starts one more Screenshots run, because a deploy key's push is not the token's. It stops at the relevance step in about 70 seconds, since
affects.mjsdoes not listassets/**.Main can hold stale screenshots between a merge and the recapture that follows, roughly the length of one capture. The previous arrangement prevented that by making every other branch pay for it.