git-worktrees 0.13.1__tar.gz → 0.13.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/CHANGELOG.md +13 -0
  2. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/PKG-INFO +5 -5
  3. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/README.md +4 -4
  4. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/conf.d/worktrees.fish +1 -1
  5. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/merge.md +14 -11
  6. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/.claude-plugin/plugin.json +1 -1
  7. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/.codex-plugin/plugin.json +1 -1
  8. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/plugin.json +1 -1
  9. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/pyproject.toml +1 -1
  10. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/pr_merge.py +21 -16
  11. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_pr_merge.py +61 -4
  12. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/uv.lock +1 -1
  13. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/worktrees.plugin.zsh +1 -1
  14. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.claude/settings.json +0 -0
  15. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.codex/config.toml +0 -0
  16. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.github/workflows/codeql.yml +0 -0
  17. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.github/workflows/publish.yml +0 -0
  18. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.github/workflows/testpypi.yml +0 -0
  19. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.github/workflows/tests.yml +0 -0
  20. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.gitignore +0 -0
  21. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.pre-commit-config.yaml +0 -0
  22. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.python-version +0 -0
  23. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/.releasetools.yaml +0 -0
  24. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/AGENTS.md +0 -0
  25. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/LICENSE +0 -0
  26. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/Makefile +0 -0
  27. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/completions/gw.fish +0 -0
  28. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/completions/worktrees.fish +0 -0
  29. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/BENCHMARK.md +0 -0
  30. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/DEVELOPMENT.md +0 -0
  31. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/REFERENCE.md +0 -0
  32. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/add.md +0 -0
  33. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/branch-create.md +0 -0
  34. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/branch-prune.md +0 -0
  35. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/branch-status.md +0 -0
  36. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/ci-checks.md +0 -0
  37. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/fast-forward.md +0 -0
  38. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/list.md +0 -0
  39. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/preflight.md +0 -0
  40. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/push.md +0 -0
  41. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/commands/stack-link.md +0 -0
  42. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/docs/plans/2026-11-05-worktree-pruning-design.md +0 -0
  43. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gw.fish +0 -0
  44. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwa.fish +0 -0
  45. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwbc.fish +0 -0
  46. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwbp.fish +0 -0
  47. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwbs.fish +0 -0
  48. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwff.fish +0 -0
  49. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwl.fish +0 -0
  50. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwm.fish +0 -0
  51. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwp!.fish +0 -0
  52. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwp.fish +0 -0
  53. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwpa!.fish +0 -0
  54. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwpa.fish +0 -0
  55. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwpu.fish +0 -0
  56. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwr!.fish +0 -0
  57. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwr.fish +0 -0
  58. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gwrk!.fish +0 -0
  59. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/functions/gws.fish +0 -0
  60. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/hatch_build.py +0 -0
  61. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/README.md +0 -0
  62. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/hooks/codex.json +0 -0
  63. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/hooks/hooks.json +0 -0
  64. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/session.md +0 -0
  65. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/ci-checks/SKILL.md +0 -0
  66. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/describe-pr/SKILL.md +0 -0
  67. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/describe-pr/format.md +0 -0
  68. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/fast-forward/SKILL.md +0 -0
  69. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/preflight/SKILL.md +0 -0
  70. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/preflight/agents/openai.yaml +0 -0
  71. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/preflight/config.toml +0 -0
  72. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/preflight/merge_codex_rules.py +0 -0
  73. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/preflight/project.json +0 -0
  74. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/preflight/rules.json +0 -0
  75. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/preflight/worktrees.rules +0 -0
  76. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/prune/SKILL.md +0 -0
  77. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/ship-it/SKILL.md +0 -0
  78. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/plugin/skills/ship-it/rights.md +0 -0
  79. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/renovate.json +0 -0
  80. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/scripts/README.md +0 -0
  81. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/scripts/benchmark.py +0 -0
  82. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/scripts/bump_version.py +0 -0
  83. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/scripts/verify-publish.bash +0 -0
  84. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/__init__.py +0 -0
  85. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/audit.py +0 -0
  86. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/branch_cli.py +0 -0
  87. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/branch_forge.py +0 -0
  88. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/branches.py +0 -0
  89. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/ci.py +0 -0
  90. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/cli.py +0 -0
  91. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/errors.py +0 -0
  92. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/fast_forward.py +0 -0
  93. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/forge.py +0 -0
  94. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/git.py +0 -0
  95. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/layout.py +0 -0
  96. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/merged.py +0 -0
  97. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/new_branch.py +0 -0
  98. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/pick.py +0 -0
  99. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/preflight.py +0 -0
  100. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/progress.py +0 -0
  101. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/prune.py +0 -0
  102. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/push.py +0 -0
  103. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/render.py +0 -0
  104. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/repo.py +0 -0
  105. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/stack_link.py +0 -0
  106. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/sync.py +0 -0
  107. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/verdicts.py +0 -0
  108. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/src/worktrees/worktree.py +0 -0
  109. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/audit_schema.py +0 -0
  110. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/conftest.py +0 -0
  111. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_assessment.py +0 -0
  112. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_audit.py +0 -0
  113. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_benchmark.py +0 -0
  114. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_branch_forge.py +0 -0
  115. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_branches.py +0 -0
  116. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_ci.py +0 -0
  117. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_cli.py +0 -0
  118. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_command_defaults.py +0 -0
  119. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_completions.py +0 -0
  120. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_fast_forward.py +0 -0
  121. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_fixture.py +0 -0
  122. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_forge.py +0 -0
  123. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_gates.py +0 -0
  124. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_git_records.py +0 -0
  125. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_new_branch.py +0 -0
  126. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_partial_clone.py +0 -0
  127. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_path_boundaries.py +0 -0
  128. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_plugin.py +0 -0
  129. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_preflight.py +0 -0
  130. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_push.py +0 -0
  131. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_removal.py +0 -0
  132. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_render.py +0 -0
  133. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_shims.py +0 -0
  134. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_spec.py +0 -0
  135. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_stack_link.py +0 -0
  136. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_sync.py +0 -0
  137. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_version.py +0 -0
  138. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/tests/test_worktree.py +0 -0
  139. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/completions/_gw +0 -0
  140. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gw +0 -0
  141. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwa +0 -0
  142. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwbc +0 -0
  143. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwbp +0 -0
  144. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwbs +0 -0
  145. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwff +0 -0
  146. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwl +0 -0
  147. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwm +0 -0
  148. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwp +0 -0
  149. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwp! +0 -0
  150. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwpa +0 -0
  151. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwpa! +0 -0
  152. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwpu +0 -0
  153. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwr +0 -0
  154. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwr! +0 -0
  155. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gwrk! +0 -0
  156. {git_worktrees-0.13.1 → git_worktrees-0.13.2}/zsh/plugins/worktrees/functions/gws +0 -0
@@ -17,6 +17,19 @@ not in here, whatever it cost to build.
17
17
  A release closes with a `### Choices` section when a decision in it is worth
18
18
  the reader's time: what was chosen, and what the alternative failed to do.
19
19
 
20
+ ## 0.13.2 - 2026-11-22
21
+
22
+ ### Fixed
23
+
24
+ Single-PR `gw merge` commands preserve commit trailers, including agent
25
+ session IDs, when `--body-file` is omitted. An omitted subject uses the
26
+ pull request title with its number. Explicit message fields remain
27
+ unchanged.
28
+
29
+ Without a complete commit list, provide `--body-file`; otherwise the
30
+ command refuses at exit 3. It also refuses existing asynchronous merges
31
+ whose commit message cannot be verified.
32
+
20
33
  ## 0.13.1 - 2026-11-21
21
34
 
22
35
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: git-worktrees
3
- Version: 0.13.1
3
+ Version: 0.13.2
4
4
  Summary: Git worktree commands that refuse to lose work.
5
5
  Project-URL: Bug reports, https://github.com/MihaiBojin/worktrees/issues/new
6
6
  Project-URL: Source, https://github.com/MihaiBojin/worktrees
@@ -108,7 +108,7 @@ the plugin's tag to the same release, as each manager below describes.
108
108
  ### fish
109
109
 
110
110
  ```console
111
- fisher install MihaiBojin/worktrees@v0.13.1
111
+ fisher install MihaiBojin/worktrees@v0.13.2
112
112
  ```
113
113
 
114
114
  Fisher copies `functions/`, `completions/` and `conf.d/` from the repository
@@ -125,7 +125,7 @@ the untagged one holds the files.
125
125
  Antidote takes a `path:` into the repository, and `branch:` takes a tag:
126
126
 
127
127
  ```
128
- MihaiBojin/worktrees branch:v0.13.1 path:zsh/plugins/worktrees # in zsh_plugins.txt
128
+ MihaiBojin/worktrees branch:v0.13.2 path:zsh/plugins/worktrees # in zsh_plugins.txt
129
129
  ```
130
130
 
131
131
  The plugin puts its own `functions/` and `completions/` on `fpath` and
@@ -200,8 +200,8 @@ its stdout stays the version alone for a script to read.
200
200
  An excerpt of `gw --help`'s release lines with matching CLI and shell releases:
201
201
 
202
202
  ```console
203
- worktrees 0.13.1: git worktree commands that refuse to lose work
204
- The shell plugin here is 0.13.1, the same release as these commands.
203
+ worktrees 0.13.2: git worktree commands that refuse to lose work
204
+ The shell plugin here is 0.13.2, the same release as these commands.
205
205
  ```
206
206
 
207
207
  A shell without the variable has no plugin loaded, or one older than the
@@ -81,7 +81,7 @@ the plugin's tag to the same release, as each manager below describes.
81
81
  ### fish
82
82
 
83
83
  ```console
84
- fisher install MihaiBojin/worktrees@v0.13.1
84
+ fisher install MihaiBojin/worktrees@v0.13.2
85
85
  ```
86
86
 
87
87
  Fisher copies `functions/`, `completions/` and `conf.d/` from the repository
@@ -98,7 +98,7 @@ the untagged one holds the files.
98
98
  Antidote takes a `path:` into the repository, and `branch:` takes a tag:
99
99
 
100
100
  ```
101
- MihaiBojin/worktrees branch:v0.13.1 path:zsh/plugins/worktrees # in zsh_plugins.txt
101
+ MihaiBojin/worktrees branch:v0.13.2 path:zsh/plugins/worktrees # in zsh_plugins.txt
102
102
  ```
103
103
 
104
104
  The plugin puts its own `functions/` and `completions/` on `fpath` and
@@ -173,8 +173,8 @@ its stdout stays the version alone for a script to read.
173
173
  An excerpt of `gw --help`'s release lines with matching CLI and shell releases:
174
174
 
175
175
  ```console
176
- worktrees 0.13.1: git worktree commands that refuse to lose work
177
- The shell plugin here is 0.13.1, the same release as these commands.
176
+ worktrees 0.13.2: git worktree commands that refuse to lose work
177
+ The shell plugin here is 0.13.2, the same release as these commands.
178
178
  ```
179
179
 
180
180
  A shell without the variable has no plugin loaded, or one older than the
@@ -4,4 +4,4 @@
4
4
  # The release this plugin came from, which `gw --help` and `gw version` compare
5
5
  # with their own. Exported, because the environment is all a binary can see
6
6
  # of the shell that started it.
7
- set -gx WORKTREES_PLUGIN_VERSION 0.13.1
7
+ set -gx WORKTREES_PLUGIN_VERSION 0.13.2
@@ -10,20 +10,24 @@ gw merge 42 --match-head-commit FULL_SHA --subject 'Fix parser (#42)' --body-fil
10
10
  gw merge 41 42 43 --json
11
11
  ```
12
12
 
13
- With one `NUMBER`, `--match-head-commit` is required, and the merge commit
14
- takes the `--subject` and `--body-file` given. `--body-file` reads UTF-8
15
- text, including trailing newlines. Prepare the subject with its
16
- `(#NUMBER)` suffix and the body with the trailers the commit needs.
13
+ With one `NUMBER`, `--match-head-commit` is required. An omitted
14
+ `--subject` or `--body-file` uses the corresponding field gw builds below.
15
+ An explicit subject is used as given, including its `(#NUMBER)` suffix.
16
+ `--body-file` reads UTF-8 text unchanged, including trailing newlines;
17
+ that file supplies the trailers the commit needs.
17
18
 
18
19
  With several numbers, gw reads each pull request's head and CI and builds
19
20
  each message itself, so `--match-head-commit`, `--subject` and
20
- `--body-file` are a usage error at exit 2. The subject is the title and
21
- ` (#NUMBER)`. The body is the pull request's body without the
21
+ `--body-file` are a usage error at exit 2.
22
+
23
+ The generated subject is the title and ` (#NUMBER)`. The generated body
24
+ is the pull request's body without the
22
25
  `🤖 Generated with` footer line, a bare `https://claude.ai/code/session_...`
23
26
  line and the `<details><summary>Auto-resolution</summary>` block, keeping
24
27
  any `release-note` block, followed by each of `pr.trailers` from
25
28
  [`gw ci-checks`](ci-checks.md) that the body does not already hold. A pull
26
- request whose `pr.trailers` is null refuses: its commit list was incomplete.
29
+ request whose `pr.trailers` is null needs an explicit `--body-file`: its
30
+ commit list was incomplete, so gw refuses to build its body.
27
31
 
28
32
  The command always requests squash and accepts no strategy flag. A direct
29
33
  squash receives the subject and body; a merge queue controls its own
@@ -178,10 +182,9 @@ An `enqueued` answer ends polling; it does not mean the PR merged.
178
182
 
179
183
  HTTP 400 with `status: failed` is a failed outcome at exit 1, including when
180
184
  `gh` exits nonzero. `details.message` supplies its reason. HTTP 409 identifies
181
- an existing operation. The command follows it only when its expected head,
182
- method, queue action and rule-bypass setting match. A supplied subject or
183
- body prevents adoption because GitHub does not echo the existing operation's
184
- commit message.
185
+ an existing operation. The command refuses to adopt it because GitHub
186
+ does not echo that operation's commit message, so its trailers cannot be
187
+ verified.
185
188
 
186
189
  With one number, a refusal exits 3 and prints its reason on stderr. Invalid
187
190
  arguments exit 2. Unknown statuses, malformed responses and network failures
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worktrees",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Read CI, rebase onto the head branch, describe, ship and merge pull requests, and prune finished worktrees through the worktrees CLI",
5
5
  "author": {
6
6
  "name": "Mihai Bojin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worktrees",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Read CI, rebase onto the head branch, describe, ship and merge pull requests, and prune finished worktrees through the worktrees CLI",
5
5
  "author": {
6
6
  "name": "Mihai Bojin",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "worktrees",
4
- "version": "0.13.1",
4
+ "version": "0.13.2",
5
5
  "description": "Read CI, rebase onto the head branch, describe, ship and merge pull requests, and prune finished worktrees through the worktrees CLI",
6
6
  "author": {
7
7
  "name": "Mihai Bojin",
@@ -9,7 +9,7 @@ authors = [
9
9
  ]
10
10
  # Static, and the single source of truth for the version. Bump it in a pull
11
11
  # request and run `uv lock`; the release tag only has to agree with it.
12
- version = "0.13.1"
12
+ version = "0.13.2"
13
13
  # The standard library answers every question this asks. A dependency here
14
14
  # would be paid on every invocation, and an invocation is 67 ms of which 25 ms
15
15
  # is the interpreter starting.
@@ -530,6 +530,23 @@ def merge(number: int, sha: str, subject: str | None, body: str | None) -> dict:
530
530
  snapshot = _snapshot(number)
531
531
  pr = snapshot["pr"]
532
532
  _ready(snapshot, sha)
533
+ if subject is None or body is None:
534
+ trailers = pr["trailers"]
535
+ if body is None and trailers is None:
536
+ raise Refused(
537
+ f"#{number} commit list is incomplete, so its trailers "
538
+ "cannot be read; merge it alone with --subject and --body-file"
539
+ )
540
+ row = _pull(repository, number)
541
+ title = row.get("title")
542
+ text = row.get("body") or ""
543
+ if not isinstance(title, str) or not isinstance(text, str):
544
+ raise Refused(f"#{number} has no readable title and body")
545
+ default_subject, default_body = message(number, title, text, trailers or [])
546
+ if subject is None:
547
+ subject = default_subject
548
+ if body is None:
549
+ body = default_body
533
550
  for member, head in scope.lower:
534
551
  _ready(_snapshot(member), head)
535
552
  warnings = _squash_settings(repository, scope.lower) if scope.lower else []
@@ -573,9 +590,9 @@ def merge(number: int, sha: str, subject: str | None, body: str | None) -> dict:
573
590
  f"{exc}\nThe merge of #{number}{operation} may still complete. "
574
591
  "Read the pull request before submitting another merge."
575
592
  ) from None
576
- message = str(details.get("message") or "")
593
+ notice = str(details.get("message") or "")
577
594
  if status == "pending":
578
- message = (
595
+ notice = (
579
596
  "Merge still pending after the polling window; it may still complete. "
580
597
  "Read the PR before retrying."
581
598
  )
@@ -603,7 +620,7 @@ def merge(number: int, sha: str, subject: str | None, body: str | None) -> dict:
603
620
  "pr": pr,
604
621
  "sha": details.get("sha"),
605
622
  "uuid": uuid or None,
606
- "message": message,
623
+ "message": notice,
607
624
  "merged": done,
608
625
  "remaining": remaining,
609
626
  "branches": branches,
@@ -694,19 +711,7 @@ def ship(numbers: list[int]) -> list[dict]:
694
711
  snapshot = _snapshot(number)
695
712
  pr = snapshot["pr"]
696
713
  head = pr["headSha"]
697
- trailers = pr["trailers"]
698
- if trailers is None:
699
- raise Refused(
700
- f"#{number} commit list is incomplete, so its trailers "
701
- "cannot be read; merge it alone with --subject and --body-file"
702
- )
703
- row = _pull(repository, number)
704
- title = row.get("title")
705
- body = row.get("body") or ""
706
- if not isinstance(title, str) or not isinstance(body, str):
707
- raise Refused(f"#{number} has no readable title and body")
708
- subject, text = message(number, title, body, trailers)
709
- result = merge(number, head, subject, text)
714
+ result = merge(number, head, None, None)
710
715
  except Refused as exc:
711
716
  remaining, _ = _left([*covered, number], {})
712
717
  result = {
@@ -31,6 +31,8 @@ def pull(**extra) -> dict:
31
31
  "state": "open",
32
32
  "draft": False,
33
33
  "merged": False,
34
+ "title": "Seven",
35
+ "body": "Body.",
34
36
  "head": {"ref": "feature", "sha": HEAD},
35
37
  "base": {"ref": "main", "repo": {"full_name": "owner/repo"}},
36
38
  **extra,
@@ -147,6 +149,61 @@ def test_merge_pins_head_and_preserves_message_bytes(world, github) -> None:
147
149
  assert not any(c[:2] == ["git", "fetch"] for c in github.network_calls())
148
150
 
149
151
 
152
+ @pytest.mark.parametrize("subject", [None, "Custom (#7)"])
153
+ @pytest.mark.parametrize("body", [None, "", "Override body.\n\n"])
154
+ def test_single_merge_fills_omitted_message_fields(
155
+ world, github, subject: str | None, body: str | None
156
+ ) -> None:
157
+ commits = [
158
+ {
159
+ "oid": HEAD,
160
+ "messageHeadline": "Change",
161
+ "messageBody": f"{TRAILER}\nCodex-Session: abc",
162
+ }
163
+ ]
164
+ github.answer(
165
+ {"$view": _pr(commits=commits), "$api": {PR: pull(), ASYNC: merged()}}
166
+ )
167
+ args = []
168
+ if subject is not None:
169
+ args.extend(["--subject", subject])
170
+ if body is not None:
171
+ path = world.root / "message.txt"
172
+ path.write_text(body)
173
+ args.extend(["--body-file", str(path)])
174
+ proc = run(world, github, *args)
175
+ assert proc.returncode == 0, proc.stderr
176
+ calls = writes(github)
177
+ assert len(calls) == 1
178
+ expected_title = "Seven (#7)" if subject is None else "Custom (#7)"
179
+ expected_body = (
180
+ f"Body.\n\n{TRAILER}\nCodex-Session: abc\n" if body is None else body
181
+ )
182
+ assert "sha=" + HEAD in calls[0]
183
+ assert "commit_title=" + expected_title in calls[0]
184
+ assert "commit_message=" + expected_body in calls[0]
185
+
186
+
187
+ def test_automatic_body_refuses_incomplete_trailers(world, github) -> None:
188
+ github.answer({"$view": _pr(commits=None), "$api": {PR: pull(), ASYNC: merged()}})
189
+ proc = run(world, github)
190
+ assert proc.returncode == 3
191
+ assert "commit list is incomplete" in proc.stderr
192
+ assert not writes(github)
193
+
194
+
195
+ def test_explicit_body_can_merge_with_incomplete_trailers(world, github) -> None:
196
+ github.answer({"$view": _pr(commits=None), "$api": {PR: pull(), ASYNC: merged()}})
197
+ path = world.root / "message.txt"
198
+ path.write_text("Provided body.\n")
199
+ proc = run(world, github, "--body-file", str(path))
200
+ assert proc.returncode == 0, proc.stderr
201
+ calls = writes(github)
202
+ assert len(calls) == 1
203
+ assert "commit_title=Seven (#7)" in calls[0]
204
+ assert "commit_message=Provided body.\n" in calls[0]
205
+
206
+
150
207
  def test_native_bottom_pr_merges_without_merging_the_child(world, github) -> None:
151
208
  answer(github, **{PR: pull(stack=stack_info()), STACK: stack()})
152
209
  proc = run(world, github)
@@ -245,12 +302,12 @@ def test_each_terminal_outcome(world, github, response, expected, code, poll) ->
245
302
  assert "Required review missing" in proc.stderr
246
303
 
247
304
 
248
- def test_existing_matching_request_is_followed(world, github) -> None:
305
+ def test_existing_request_cannot_verify_an_automatic_message(world, github) -> None:
249
306
  answer(github, **{ASYNC: {"$http": 409, "$body": pending()}, OPERATION: merged()})
250
307
  proc = run(world, github)
251
- assert proc.returncode == 0, proc.stderr
252
- assert json.loads(proc.stdout)["uuid"] == UUID
253
- assert len(writes(github)) == 1
308
+ assert proc.returncode == 3
309
+ assert "message" in proc.stderr
310
+ assert not any(OPERATION in c for c in github.network_calls())
254
311
 
255
312
 
256
313
  @pytest.mark.parametrize(
@@ -49,7 +49,7 @@ wheels = [
49
49
 
50
50
  [[package]]
51
51
  name = "git-worktrees"
52
- version = "0.13.1"
52
+ version = "0.13.2"
53
53
  source = { editable = "." }
54
54
 
55
55
  [package.optional-dependencies]
@@ -12,4 +12,4 @@ autoload -Uz gw gwa gwbc gwbp gwbs gwff gwl gwm gwp 'gwp!' gwpa 'gwpa!' gwpu gwr
12
12
  # The release this plugin came from, which `gw --help` and `gw version` compare
13
13
  # with their own. Exported, because the environment is all a binary can see
14
14
  # of the shell that started it.
15
- export WORKTREES_PLUGIN_VERSION=0.13.1
15
+ export WORKTREES_PLUGIN_VERSION=0.13.2
File without changes
File without changes
File without changes