Skip to content

cutalion/staging-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

staging-tool

Rebuilds a disposable staging branch by re-merging the open PRs you select — the "delete staging, recreate from develop, re-merge everything staged, force-push" chore as one command with a checkbox picker.

Install

With Go:

go install github.com/cutalion/staging-tool/cmd/staging@latest

Or grab a binary from Releases.

Requires git and an authenticated gh on PATH.

Usage

Run inside the repo whose staging branch you're rebuilding:

staging rebuild    # pick PRs → recreate branch → merge → confirm → force-push
staging continue   # resume after fixing a merge conflict (or a postponed push)
staging abort      # give up: restore staging to the remote state
staging status     # what's merged, what's pending, what's next

rebuild lists all open PRs; ones labeled staged are preselected. After your confirmation it recreates staging from origin/develop, merges each PR branch with --no-ff, and (after one more confirmation) pushes with --force-with-lease. Newly selected PRs get the staged label.

On a merge conflict the tool exits and leaves the standard git conflict in your working tree — resolve it, git add + git commit, then staging continue. Progress survives in .git/staging-rebuild.json.

Configuration

Flags come after the command; each falls back to an env var, then a default:

Flag Env Default
--remote STAGING_REMOTE origin
--branch STAGING_BRANCH staging
--base STAGING_BASE develop
--label STAGING_LABEL staged

Example: staging rebuild --base main --label qa

Set ACCESSIBLE=1 for plain line-based prompts (screen readers, scripting).

About

Rebuild a disposable staging branch by re-merging selected PRs

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages