Repository navigation
ci: prune verified merged PR heads, preserve release and active branches - #336
Open
turinglambdaai wants to merge 1 commit into
Open
turinglambdaai wants to merge 1 commit into
turinglambdaai wants to merge 1 commit into
Conversation
2 of 7 tasks
This branch has not been deployed
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.
Purpose
The owner has explicitly requested deletion of obsolete topic branches in all repositories, keeping default and active development branches. This PR adds a Rivet-only, GitHub-native workflow using this repo's default token—no global PAT, no source checkout, no Racket or native product behavior changes.
Exactly what may be deleted
A remote branch can be pruned only when (1) not the default/protected branch, (2) does not have any open PR, (3) not a release/deployment/upstream/history name, (4) one merged same-repository PR has the exact current head SHA for that named branch, (5) a fresh head/protection/open-PR recheck agrees. Unknown/unmerged/divergent/continued-development heads remain.
The initial merge triggers the workflow (push to main with workflow path); subsequent merged PRs retrigger it. GitHub API does not offer atomic compare/delete, and workflow documents the small remaining race window. CI failing to get contents:write will leave branches intact, which must be reported.
Source reviewed from site merged PR #11, already deployed on a site repo where only default branch remains. Rivet baseline
main@9de6f5a76991bf30f0e2b5890856e62a8493ad29, after verified merges of #335/#334/#331. No PR checks bypassed; requires full current-head six-workflow CI before merge. No claim of deleted Rivet refs until its cleanup run succeeds and the remote listing changes.Tracks portfolio branch hygiene issue #10.