fix(release): resume draft CLI releases by ID - #3200
Conversation
GitHub's release-by-tag REST endpoint does not return draft releases, so a successful draft creation was followed by a false 404. Resolve both draft and published releases through gh, bind the result to the expected repository API URL, and perform subsequent reads by stable release ID.\n\nGenerated-by: Codex
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
PR Summary by QodoResume draft CLI releases by stable API ID
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more' |
Summary
English
Resume a partially created CLI GitHub Release by resolving its stable API ID through
gh release view. GitHub's release-by-tag REST endpoint returns 404 for drafts, which caused Finalize run32125339803to fail immediatelyafter successfully creating the draft.
The existing exact tag and draft remain the recovery state; rerunning Finalize after this fix will
upload, verify, and publish that draft.
简体中文
通过
gh release view解析稳定的 Release API ID,从而继续处理部分创建完成的 CLI GitHubRelease。GitHub 的 release-by-tag REST endpoint 对 draft 返回 404,导致 Finalize run
32125339803在成功创建 draft后立即失败。
现有精确 tag 和 draft 会保留为恢复状态;合并本修复后重新运行 Finalize,即可继续上传、验证并
发布该 draft。
Verification
npx --yes npm@11.19.0 run check:release— 27 tests passedgo run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/release-cli-finalize.ymlnpx biome check scripts/release-cli-workflow-policy.test.mjs372253908AI use
Select exactly one:
Tool(s) and scope: Codex diagnosed the Actions failure, implemented the workflow fix, and added the
regression assertion. M4n5ter is the human contributor of record and reviews the final change.
Checklist
Does this PR entail a change in behavior?