diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index bb77b1b7..dac83cc4 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -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" }, { diff --git a/.github/plugin/marketplace.json b/.github/plugin/marketplace.json index bb77b1b7..dac83cc4 100644 --- a/.github/plugin/marketplace.json +++ b/.github/plugin/marketplace.json @@ -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" }, { diff --git a/plugins/github/.claude-plugin/plugin.json b/plugins/github/.claude-plugin/plugin.json index 85c6890f..c507c837 100644 --- a/plugins/github/.claude-plugin/plugin.json +++ b/plugins/github/.claude-plugin/plugin.json @@ -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" diff --git a/plugins/github/CHANGELOG.md b/plugins/github/CHANGELOG.md index cd33a31e..f54d963a 100644 --- a/plugins/github/CHANGELOG.md +++ b/plugins/github/CHANGELOG.md @@ -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 diff --git a/plugins/github/plugin.json b/plugins/github/plugin.json index 85c6890f..c507c837 100644 --- a/plugins/github/plugin.json +++ b/plugins/github/plugin.json @@ -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" diff --git a/plugins/github/skills/gh-stack/SKILL.md b/plugins/github/skills/gh-stack/SKILL.md index c3a992af..9a81ebe8 100644 --- a/plugins/github/skills/gh-stack/SKILL.md +++ b/plugins/github/skills/gh-stack/SKILL.md @@ -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 --- diff --git a/plugins/github/skills/gh-stack/references/commands.md b/plugins/github/skills/gh-stack/references/commands.md index 89ed80b0..54fd09a5 100644 --- a/plugins/github/skills/gh-stack/references/commands.md +++ b/plugins/github/skills/gh-stack/references/commands.md @@ -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. @@ -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. @@ -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`. diff --git a/plugins/github/skills/gh-stack/references/troubleshooting.md b/plugins/github/skills/gh-stack/references/troubleshooting.md index 3bd45fb7..774a4593 100644 --- a/plugins/github/skills/gh-stack/references/troubleshooting.md +++ b/plugins/github/skills/gh-stack/references/troubleshooting.md @@ -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