ci: restore master and keep it synced to main automatically - #79
Merged
Merged
Conversation
The repository was renamed from master to main, but older documentation, bookmarks and raw file URLs still point at .../rConfig-templates/master/... Deleting the branch breaks every one of those links, so it has been recreated from main. Documents that it carries no unique work, that nothing should branch from it or merge into it, and how to resync it. Left unsynced it is worse than absent: the old links keep working while quietly serving stale templates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What happened
The
masterbranch was deleted after the rename tomain. It has been recreated frommainand now points at the same commit, so old links work again.Why it has to exist
Older documentation, bookmarks and raw file URLs still reference it:
Every one of those breaks without the branch.
Why it has to stay in sync
An unsynced
masteris worse than a missing one. The old links keep working but quietly serve stale templates, so someone following a year-old doc gets something that looks current and is not. That fails silently, which is the hard kind to notice.The workflow
.github/workflows/sync-master.ymlfast-forwardsmasterwhenevermainmoves.Triggered on push to
main, not onpull_request. Apull_requesttrigger fires while the PR is open, before the merge, whenmainhas not moved yet. Push-to-mainfires on the merge itself, which is the moment that matters.workflow_dispatchis there for a manual re-run.The push is deliberately not forced. git refuses a non-fast-forward by default, so this can only move
masterforward alongmain's history. If someone has committed directly tomaster, the push is rejected and the job fails loudly with a message saying so, rather than force-pushing their work away. That is the failure mode I would rather have: a red check beats silent data loss.A concurrency group, so two merges landing close together cannot race and leave
masteron the older of the two.A verification step re-fetches both refs afterwards and fails if they do not match, so the job cannot report success while leaving them apart.
Verified
Both paths exercised against a throwaway local remote:
mainmoves ahead,masteris an ancestormasterfast-forwardsmasterWorkflow YAML parses. Validator unaffected: 79 templates, 0 errors, 2 pre-existing warnings.
README
The Branches section now describes the automation rather than telling people to remember a manual step, and keeps the one-liner for seeding the branch if it is ever deleted again.
🤖 Generated with Claude Code