chore: add workflow to auto-delete branches on PR merge + bulk cleanup#1041
Closed
chore: add workflow to auto-delete branches on PR merge + bulk cleanup#1041
Conversation
Agent-Logs-Url: https://github.com/CodingThrust/problem-reductions/sessions/07ab69c2-2292-48ea-883c-4d32a80e80af Co-authored-by: GiggleLiu <6257240+GiggleLiu@users.noreply.github.com>
Agent-Logs-Url: https://github.com/CodingThrust/problem-reductions/sessions/07ab69c2-2292-48ea-883c-4d32a80e80af Co-authored-by: GiggleLiu <6257240+GiggleLiu@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
GiggleLiu
April 12, 2026 00:42
View session
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
Adds
.github/workflows/cleanup-branches.ymlwith two jobs:Auto-delete on merge (
pull_request: closed): Automatically deletes the head branch whenever a PR is merged. Protected branches (main,develop,master) are never deleted.Bulk cleanup (
workflow_dispatch): A manual trigger that paginates through all closed/merged PRs, finds branches that still exist, and deletes them.How to clean up existing stale branches
After merging this PR:
This will delete the ~15 branches that belong to already-merged PRs:
405-kth-largest-m-tuple,505-scheduling-min-weighted-completion,515-register-sufficiency530-feasible-basis-extension,543-quadratic-diophantine-equations,552-integer-expression-membership787-upgrade-good-lp-add-lp-solvers,feat/770-tier1a-tier1b-medium-batchfeat/batch-10-rules-770,feat/batch-models,feat/decision-wrapperfeat/find-solver-find-problem-skills,feat/verify-reduction-skillfix/789-hc-stackercrane-connector-cost,fix/974-example-db-paper-entries