ci: fix release-plz detached-HEAD failure and app-id deprecation#64
Conversation
PR #63 set `ref: ${{ github.sha }}` on the release-plz checkouts per a CodeRabbit suggestion to avoid running against a moving `main`. That form causes actions/checkout to do `git checkout --force <sha>`, which leaves HEAD detached. release-plz then runs `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` and aborts with `fatal: HEAD does not point to a branch`, failing both release-plz-release and release-plz-pr. Drop the explicit `ref:` so checkout uses its default behavior: `git checkout -B main <github.sha>`. This gives a branch HEAD pinned to the triggering commit — same commit-pinning guarantee CodeRabbit asked for, without the detached-HEAD side effect. Also rename `app-id:` to `client-id:` on actions/create-github-app-token@v3 (3 call sites) to clear the deprecation warnings. The existing RELEASE_PLZ_APP_ID secret value continues to work; the input was just renamed upstream. Signed-off-by: Brad Anderson <brad@enforceauth.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR updates GitHub Actions release workflows to use ChangesGitHub Actions Token and Checkout Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
The workflow changes correctly address both the detached-HEAD failure and the app-id deprecation warnings. The removal of explicit ref: parameters allows actions/checkout to use its default behavior that creates branch references pinned to github.sha, and the app-id → client-id parameter rename aligns with the upstream API changes. No blocking issues identified.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Summary
Fixes the failing
release-plz-releaseandrelease-plz-prjobs onmain(run #45) and clears the fourInput 'app-id' has been deprecatedwarnings that were on every release-plz/release-binaries run.Background
PR #63 set
ref: ${{ github.sha }}on the release-plz checkouts per a CodeRabbit suggestion. CodeRabbit's underlying concern was real (the priorref: mainwould resolve to a moving branch tip), but the suggested fix has a side effect:actions/checkoutwithref: <sha>performsgit checkout --force <sha>, leaving HEAD detached. release-plz then runsgit rev-parse --abbrev-ref --symbolic-full-name @{upstream}and bails withfatal: HEAD does not point to a branch.Removing the explicit
ref:is the right fix:actions/checkoutdefaults togit fetch +<github.sha>:refs/remotes/origin/mainfollowed bygit checkout -B main <github.sha>. That yields a branch HEAD pinned to the triggering commit — same commit-pinning guarantee CodeRabbit was after, without the detached-HEAD side effect.Changes
.github/workflows/release-plz.yml: dropref: ${{ github.sha }}from bothactions/checkout@v6steps so HEAD lands on themainbranch (still pinned togithub.sha)..github/workflows/release-plz.yml(×2) and.github/workflows/release-binaries.yml(×1): renameapp-id:→client-id:onactions/create-github-app-token@v3.1.1. The input was renamed upstream; existingRELEASE_PLZ_APP_IDsecret value continues to work unchanged.Test plan
actionlint .github/workflows/release-plz.yml .github/workflows/release-binaries.ymlmaintriggers release-plz; both jobs should complete withoutfatal: HEAD does not point to a branch'app-id' has been deprecatedwarningsChecklist
README.md/ docs (n/a)Summary by CodeRabbit