Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{
"name": "github",
"description": "GitHub CLI, stacked PRs, Actions docs, and issue management skills",
"version": "1.0.7",
"version": "1.0.8",
"source": "./plugins/github"
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{
"name": "github",
"description": "GitHub CLI, stacked PRs, Actions docs, and issue management skills",
"version": "1.0.7",
"version": "1.0.8",
"source": "./plugins/github"
},
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/github/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "github",
"description": "GitHub CLI, stacked PRs, Actions docs, and issue management skills",
"version": "1.0.7",
"version": "1.0.8",
"author": {
"name": "devantler-tech",
"url": "https://github.com/devantler-tech"
Expand Down
4 changes: 4 additions & 0 deletions plugins/github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog — `github`

## 1.0.8 — 2026-10-27

**Changed** — sync `gh-stack` from `https://github.com/github/gh-stack` at `refs/tags/v0.3.0`.

## 1.0.7 — 2026-10-24

**Added** — `resources/THIRD-PARTY-NOTICES.md` records the upstream license, copyright notice
Expand Down
2 changes: 1 addition & 1 deletion plugins/github/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "github",
"description": "GitHub CLI, stacked PRs, Actions docs, and issue management skills",
"version": "1.0.7",
"version": "1.0.8",
"author": {
"name": "devantler-tech",
"url": "https://github.com/devantler-tech"
Expand Down
4 changes: 2 additions & 2 deletions plugins/github/skills/gh-stack/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ description: |
metadata:
author: github
github-path: skills/gh-stack
github-ref: refs/tags/v0.2.0
github-ref: refs/tags/v0.3.0
github-repo: https://github.com/github/gh-stack
github-tree-sha: bde7bcf5a96697d31aa55b33565fa0ff002167ca
github-tree-sha: 1f58c48379bc9fcab68e8a37cb41aad3ad937419
version: 0.2.0
name: gh-stack
---
Expand Down
20 changes: 12 additions & 8 deletions plugins/github/skills/gh-stack/references/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,25 @@ selects a non-default trunk.

## push

Pushes every active (non-merged, non-queued) branch in one multi-ref push with per-branch
Pushes every active (non-merged, non-queued) branch in one atomic multi-ref push with per-branch
`--force-with-lease`.

**Not atomic.** Some branches may update while another is rejected. A rejection means that branch
moved on the remote; fix that branch and rerun — rerunning is safe and skips what already landed.
All branch updates succeed or fail together. `push`, `submit`, `sync`, and `link` accept
`--no-atomic` to allow partial updates. Any non-empty `GH_STACK_NO_ATOMIC` (for example, `1`)
opts out by default; `--no-atomic=false` overrides the environment. Failed atomic pushes never
automatically retry non-atomically.

`push` never creates or updates pull requests. Use `submit` for that.

## submit

Pushes each active branch, then creates a PR for every branch that lacks one, basing it on the
Pushes all active branches together, then creates a PR for every branch that lacks one, basing it on the
first non-merged ancestor, then links them into a Stack on GitHub.

- **Not atomic.** Branches are pushed sequentially with per-branch `--force-with-lease`. If a later
push is rejected, earlier pushes and PR updates stand. Fix the rejection and rerun the same command.
- **Atomic pushes by default.** One multi-ref push with per-branch `--force-with-lease` precedes
the bottom-to-top PR creation/update loop, even when opting out of atomicity. A failed push
stops before that loop. PR and stack API operations are not atomic; later API failures do not
undo the push.
- **A fully merged stack cannot be extended.** When every PR in the current stack is already merged,
`submit` forks the remaining unmerged branches into a **new** stack rooted at the trunk and creates
it on GitHub, leaving the merged stack untouched.
Expand All @@ -88,7 +92,7 @@ branches managed by another tool. Worktrees alone do not require `link`: local t
exists.** In that case the remaining arguments are appended to the top of that stack and you do
not re-list its current PRs: `gh stack link 7 feature-c`. Arguments already in the stack are
skipped; arguments belonging to a different stack are rejected.
- Branch arguments are pushed automatically (non-force, atomic). Missing PRs are created with
- Branch arguments are pushed automatically (non-force, atomic by default). Missing PRs are created with
auto-generated titles and correctly chained bases; existing PRs with a wrong base are corrected.
- Stack membership is **additive only** — `link` never removes a PR from a stack.

Expand All @@ -104,7 +108,7 @@ The routine command. Steps, in order:
from its remote, or a branch no longer contains its expected parent. Merged PRs are handled
automatically. On conflict, **all branches are restored** to their pre-rebase state and the
command exits **3**.
5. **Push** all active branches, atomically.
5. **Push** all active branches, atomically by default.
6. **Refresh PR state** from GitHub.
7. **Sync the stack object** — link open PRs into a stack, additively. Only when two or more PRs
exist. `sync` never opens PRs; that is `submit`.
Expand Down
6 changes: 4 additions & 2 deletions plugins/github/skills/gh-stack/references/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ Two resolution paths:

```bash
gh stack unstack # removes the grouping; PRs and branches survive
gh stack init --base main branch-1 branch-2 # use your trunk and desired branch order
gh stack submit --auto
```

Neither path deletes pull requests or branches.
Remote unstacking leaves PRs that are merging (auto-merge enabled) or are queued (in a merge queue)
stacked. If needed, clear that state before retrying.
Merged or queued PRs remain stacked on GitHub, but successful unstacking still removes local
tracking. If every PR is locked, GitHub rejects the operation and local tracking is retained.
Use `--local` to remove only local tracking.

## Restructuring a stack

Expand Down
Loading