feat: wire cut-release.sh cross-repo publish via gh api (#872) - #959
Conversation
The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 7 minutes and 36 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@donpetry-bot please review |
|
@don-petry I'm on it — starting a fresh review now. Results will appear in a few minutes. |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
Code Review
This pull request implements the cross-repo release publishing path for agents hosted in the petry-projects/.github repository using the GitHub CLI (gh api). It updates the cut-release.sh script to resolve refs and create or move tags remotely, updates the release runbook and versioning documentation, and adds integration tests with a stubbed CLI. The review feedback is highly constructive, suggesting that the script explicitly verify the presence of the gh CLI before executing cross-repo operations and that the test setup include proper error handling when creating temporary directories with mktemp.
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-27T14:45:09Z. |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
|
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
10 similar comments
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
1 similar comment
|
@donpetry-bot I'm on it — starting a fresh review now. Results will appear in a few minutes. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: be749ecb7db92707a1976e23401bf73caf94080f
Review mode: triage-approved (single reviewer)
Summary
Wires the cross-repo publish path in cut-release.sh so the #482/#870 reusables (hosted in petry-projects/.github) can have their release/channel tags cut against that repo via gh api, resolving the TODO(#872) open question. This-repo agents keep the local-git path verbatim; cross-repo immutability is preserved (existing vX.Y.Z release tags are never overwritten). Confirms the triage low-risk assessment.
Linked issue analysis
No closes references; PR refs #872, #870. #872 was the open question of the cross-repo push target — this PR substantively resolves it by routing resolve+publish through gh api against petry-projects/.github (requires GH_TOKEN contents:write). #870 promotion is unblocked. Scope is honest: docs note canary-rollout.sh does not yet use this path, so the six stay out of canary-rings.json until that automation is taught the same move.
Findings
No blocking findings.
- Secret scan:
run_secret_scanningMCP tool not exposed in this environment; relied on the gitleaks CI check (SUCCESS). - gh api wrappers use
-f/-Ftyped params (no shell-string interpolation) and inputs are gated by valid_agent / validate_version / cross_repo_agent; gh presence is checked viacommand -vbefore cross-repo ops. No hardcoded secrets. - Advisory bots resolved: SonarCloud quality gate passed (0 new issues); both gemini-code-assist threads (gh CLI presence check, mktemp error handling) are resolved and the suggested code is present.
- Tests: +4 strip_origin unit cases and a new gh-mocked integration suite (tests/test_cut_release_cross_repo.bats) covering dry-run, print-only, --push create+move, existing-tag refusal, and this-repo path unchanged. ShellCheck clean.
CI status
All required checks green: CodeQL (actions+python), ShellCheck, bats/unit-tests, Lint, Secret scan (gitleaks), SonarCloud, Agent Security Scan, agent-shield, guard/holdout-guard, validate-agent-profiles, gh-aw-compile. Duplicate dev-lead/review runs show CANCELLED (superseded re-runs) with a later SUCCESS; dependency-audit ecosystem jobs SKIPPED (no matching ecosystems). reviewDecision=APPROVED.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>



Summary
Unblocks promotion of the #870 reusables. The six #482 reusables +
feature-ideationare hosted inpetry-projects/.github, so their release/channel tags belong on that repo — butcut-release.shresolved refs against local git and refused live cross-repo cuts (the push target was flagged an open question,TODO(#872)). This wires the cross-repo path.What changed
gh api— for across_repo_agent, the ref resolves againstpetry-projects/.github(commits/<ref>; anorigin/prefix is stripped soorigin/main→ itsmain), and--pushcreates the annotated<name>/vX.Y.Zrelease object + force-moves the<name>/<channel>tag (git/tags+git/refs).pr-review/dev-leadkeep the local-git tag+push path verbatim.<name>/vX.Y.Zis never overwritten.--pushfor a cross-repo agent requiresGH_TOKENwithcontents:writeonpetry-projects/.github.Tests
strip_originpure helper (+4 cases).tests/test_cut_release_cross_repo.bats: dry-run resolves + touches nothing; print-only (no--push);--pushcreates release + moves channel on.github;--pushrefuses an existing release tag; this-repo agent still uses local git.shellcheck --severity=warningclean.Docs
versioning.md+runbook.mdupdated — cross-repo cut is now wired (was "dry-run only"). Note:canary-rollout.sh(the automated promotion driver) does not yet use this cross-repo path, so the six stay out ofcanary-rings.jsonuntil that's taught the same move — manual/scriptedcut-release.shcuts work today.Refs #872, #870.
🤖 Generated with Claude Code