Conversation
📝 WalkthroughWalkthroughGitHub Actions release workflow refactored to correct job-to-workflow mappings, swap Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
socksy
left a comment
There was a problem hiding this comment.
wish we could get rid of that announce job
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release.yml:
- Around line 315-317: The caller workflow's permissions block is missing the
contents read scope required by reusable publish jobs that call
actions/checkout; update the permissions object in the workflow (the block that
currently contains "id-token": "write" and "packages": "write") to also include
"contents": "read" so the reusable workflows can successfully run
actions/checkout@v6.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2319f1c4-b5dc-400b-bb0b-29f7b2c45bb7
📒 Files selected for processing (2)
.github/workflows/release.ymldist-workspace.toml
| permissions: | ||
| "id-token": "write" | ||
| "packages": "write" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Caller job permissions and reusable workflow mapping =="
rg -n -A6 -B2 'custom-publish-(docker|npm):|uses: \./\.github/workflows/publish-(docker|npm)\.yml|permissions:|"contents"|"id-token"|"packages"' .github/workflows/release.yml
echo
echo "== Callee workflows requiring checkout (and their permissions) =="
rg -n -A5 -B2 'permissions:|contents:\s*read|id-token:\s*write|packages:\s*write|uses:\s*actions/checkout@v6' .github/workflows/publish-docker.yml .github/workflows/publish-npm.ymlRepository: tower/tower-cli
Length of output: 3417
Add contents: read to caller permissions for reusable publish jobs.
Both called workflows perform actions/checkout@v6; without contents: read at the caller, checkout will fail due to reduced token scope in reusable workflow execution.
🔧 Proposed fix
custom-publish-docker:
...
permissions:
+ "contents": "read"
"id-token": "write"
"packages": "write"
custom-publish-npm:
...
permissions:
+ "contents": "read"
"id-token": "write"
"packages": "write"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/release.yml around lines 315 - 317, The caller workflow's
permissions block is missing the contents read scope required by reusable
publish jobs that call actions/checkout; update the permissions object in the
workflow (the block that currently contains "id-token": "write" and "packages":
"write") to also include "contents": "read" so the reusable workflows can
successfully run actions/checkout@v6.
Summary by CodeRabbit