You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the stubbed --create-pr flag on `apx release submit` with a
fully working PR-based submission flow. The subtree push path is
removed from release submit; PR is now the only submit mechanism.
Key changes:
Publisher (internal/publisher/):
- Add PRNumber, PRURL, PRBranch, CIProvider, CIRunURL fields to
ReleaseManifest with YAML/JSON round-trip support
- Add SubmitReleaseWithPR: clone canonical, create release branch
(apx/release/<api-id>/<version>), copy snapshot, commit, force-push,
create PR with idempotent retry via FindExistingPR
- Add FindExistingPR: query gh pr list for existing open PRs on a branch
- Add ComputeReleaseBranchName: deterministic branch naming helper
- Make runGit/runGitIn stubable via function variables for testability
- Update FormatManifestReport to display PR and CI metadata
Command layer (cmd/apx/commands/release.go):
- Rewrite releaseSubmitAction: remove subtree path and --create-pr flag,
wire SubmitReleaseWithPR as the sole submit mechanism
- Add state guards: prepared → submit, canonical-pr-open → report
existing PR, package-published → no-op, failed → error with hint
- Add dry-run preview: show branch name, snapshot files, go.mod preview
- Add gh CLI preflight check with auth hint
- Add CI provenance: detect GitHub Actions/GitLab CI/Jenkins, embed
run URL in PR body and record in manifest
- Record PR metadata in manifest after successful submission
Tests:
- Unit tests for PR metadata round-trip, FindExistingPR (4 cases),
ComputeReleaseBranchName, SubmitReleaseWithPR (branch naming,
existing PR detection, CI provenance)
- Testscript scenarios: missing manifest, failed state, published state,
PR-open retry, inspect PR metadata display, dry-run preview
Docs:
- Update release-commands.md submit section for PR-only flow
- Update publishing/overview.md release pipeline description
- CLI reference and publishing docs consistency fixes
Copy file name to clipboardExpand all lines: docs/cli-reference/configuration.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ version: 1
88
88
| `api.domain` | string | no | | | Business domain for the API |
89
89
| `api.name` | string | no | | | API name within the domain |
90
90
| `api.line` | string | no | | | API compatibility line (e.g. v1, v2) |
91
-
| `api.lifecycle` | string | no | | experimental, beta, stable, deprecated, sunset | Maturity/support state of this API line |
91
+
| `api.lifecycle` | string | no | | experimental, preview, stable, deprecated, sunset | Maturity/support state of this API line (`beta` accepted as alias for `preview`) |
| `source.path` | string | no | | | Path within the canonical repo (derived from api.id) |
@@ -210,19 +210,23 @@ api:
210
210
domain: payments
211
211
name: ledger
212
212
line: v1
213
-
lifecycle: beta
213
+
lifecycle: preview
214
214
```
215
215
216
216
The `line` field represents the API compatibility line (`v1`, `v2`, etc.). Only breaking changes create a new line. The `lifecycle` field tracks the maturity state independently from the release version.
217
217
218
218
| Lifecycle | Meaning |
219
-
|-----------|---------|
219
+
|-----------|--------|
220
220
| `experimental` | Early exploration, no compatibility guarantees |
221
-
| `beta` | Feature-complete but may change before GA |
221
+
| `preview` | API surface is stabilizing; minor breaking changes still possible |
222
222
| `stable` | Production-ready, backward-compatible within the API line |
223
223
| `deprecated` | Superseded by a newer line, still supported |
224
224
| `sunset` | End-of-life, will be removed |
225
225
226
+
:::{note}
227
+
`beta`is accepted as a backward-compatible alias for `preview`. New projects should use `preview`.
0 commit comments