Skip to content

Latest commit

 

History

194 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-sweep

demo

Audit and clean up many GitHub repositories from the terminal: dead branches, unresolved review threads, branch-protection drift, and slow workflows. Every view works across an org or an explicit list of repos, so you never open one repo at a time.

Install

# GitHub CLI extension
gh extension install kyleking/gh-sweep
# Go
go install github.com/KyleKing/gh-sweep/cmd/gh-sweep@latest
# from source
go build -o gh-sweep ./cmd/gh-sweep

Quick start

Find every branch whose PR merged or closed, across a whole org, and preview the cleanup before deleting anything:

gh sweep orphans --org my-org --cleanup --dry-run

Run gh sweep with no arguments for the home menu, which reaches all thirteen views. Each view prints its keys along the bottom of the screen.

What it does not do

  • Update dependencies. Use Renovate or Dependabot
  • Touch issues. The orphan sweep covers branches only
  • Automate releases. The releases view reads release state and nothing more
  • Follow a CI run live. gha-perf reports history, so use watchgha to tail a run
  • Write anything in the webhooks, collaborators, secrets, or releases views, which are read-only. Repo settings, security & analysis, release immutability, branch protection, rulesets, and leftover-branch pruning are the exception: gh sweep policy diffs and applies those against a file you declare (see docs/alternatives.md)

Full docs: ./docs

License

MIT

About

A gh cli plugin for a mix of administrative tools (branch pruning, unresolved comment followup, etc.)

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages