Commit 98c0121
authored
ci: let the release pull request merge itself on a cadence switch (#180)
## Related Issue
No issue — this came out of asking why `1.2.0` went straight to `2.0.0`.
## Problem
Changesets keeps one `ci: release packages` pull request open on `main`
and rewrites it as changesets land. Merging it cuts exactly one release,
so **how often it is merged is what decides the version sequence** — and
nothing said how often that should be.
Left to accumulate, it collapses a backlog into one bump. The current
release pull request carries **19 changesets, all from a single squashed
pull request**: one `major`, four `minor`, fourteen `patch`. They become
one version, `2.0.0`, and every number in between never exists. The
changelog cannot attribute anything either, because every entry cites
the same commit.
## What changed
A repository variable, `AUTO_MERGE_RELEASE_PR`, picks the cadence:
- `true` — the release pull request merges itself once its required
checks pass. One merge to `main` is one release, and the version tracks
each change: `2.1.2`, `2.1.3`, `2.1.4`, `2.2.0`.
- unset or `false` — today's behaviour, unchanged. A maintainer merges
it when a release is wanted.
This is deliberately **not** a blanket auto-merge:
- it only ever targets the changesets-authored `changeset-release/main`
branch,
- the repository's ten required status checks still gate the merge
(`strict: true`, so the branch must be current),
- and a `major` is gated separately, on the pull request that introduces
the changeset — so an unattended release can never rename the major
version on its own.
The step is `continue-on-error`. A version pull request left open costs
a manual merge; a failure here would block npm, the Marketplace and the
CDN behind it.
`CONTRIBUTING.md` now states the bump levels and both cadences, so the
version sequence is a documented choice rather than a side effect of
merge timing.
### Not included
Tagging is already correct and needed no change — releases are tagged
`@pymodel/pythinker-code@<version>` with a matching GitHub Release, and
the desktop app cuts `desktop-v*` separately.
[skip changeset] — release tooling and contributor docs only; nothing
here reaches the published package.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [ ] I have linked a related issue (external PRs: the issue must have a
maintainer's `/approve`).
- [ ] I have added tests that prove my feature works.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added optional automatic squash-merging for release pull requests when
enabled.
* Improved release workflows by reliably identifying the correct release
pull request for review and merging.
* Release workflow lookup issues remain non-blocking when a matching
pull request is unavailable.
* **Documentation**
* Clarified one-changeset-per-PR guidance and approval requirements for
major changes.
* Documented that pinned installations remain functional until consumers
upgrade.
* Explained how changesets added during release checks are included in
the pending release.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 2ecbe34 commit 98c0121
2 files changed
Lines changed: 114 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
184 | 209 | | |
185 | 210 | | |
186 | 211 | | |
| 212 | + | |
187 | 213 | | |
188 | | - | |
189 | | - | |
190 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
191 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
192 | 279 | | |
193 | 280 | | |
194 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
83 | 106 | | |
84 | 107 | | |
85 | 108 | | |
| |||
0 commit comments