Add tooling to delete 10 merged branches from closed PRs#289
Open
Add tooling to delete 10 merged branches from closed PRs#289
Conversation
Co-authored-by: thesprockee <962164+thesprockee@users.noreply.github.com>
Co-authored-by: thesprockee <962164+thesprockee@users.noreply.github.com>
Co-authored-by: thesprockee <962164+thesprockee@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove all merged branches in echotools/nakama
Add tooling to delete 10 merged branches from closed PRs
Jan 31, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automation and documentation to safely delete 10 specific stale branches from the EchoTools/nakama repository, using either a GitHub Actions workflow or local tooling.
Changes:
- Introduces a
workflow_dispatchGitHub Actions workflow to delete the identified branches, with adry_runtoggle and summary output. - Adds a
gh-based helper script to delete the same branches via the GitHub API, including auth checks and per-branch status reporting. - Documents the targeted branches, multiple execution paths (workflow, CLI, git, UI), and the analysis used to determine that these branches are safe to delete.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/delete-merged-branches.yaml |
Defines a manual GitHub Actions job that iterates over the 10 branches, optionally runs in dry-run mode, deletes them via git push origin --delete, and prints remaining branches. |
scripts/delete-merged-branches.sh |
Bash helper that uses gh api to delete the same fixed list of branches from EchoTools/nakama, with authentication check, per-branch success/error classification, and an optional remaining-branches listing. |
DELETE_MERGED_BRANCHES.md |
Runbook listing the exact branches to delete and providing five concrete methods (script, workflow, gh CLI, raw git, web UI) plus a verification command. |
BRANCH_DELETION_SUMMARY.md |
Records the branch-analysis methodology, the final list of 10 branches selected for deletion, and links back to the workflow, script, and documentation as the proposed execution paths. |
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.
Identified 10 stale branches from merged/closed PRs consuming namespace. Direct deletion requires elevated credentials unavailable in agent context.
Branches Identified for Deletion
Changes
.github/workflows/delete-merged-branches.yaml- Workflow_dispatch action with dry-run toggle for safe executionscripts/delete-merged-branches.sh- GH CLI script with auth checks and progress reportingDELETE_MERGED_BRANCHES.md- Multi-method execution guide (workflow, CLI, git, UI)BRANCH_DELETION_SUMMARY.md- Analysis methodology and findingsExecution
Recommended: Trigger workflow from Actions tab with
dry_run: falseAlternative:
gh auth login && bash scripts/delete-merged-branches.shVerification:
git ls-remote --heads origin | wc -lshould show 41 branches (51 - 10)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.