[actions] close stale prs and remove labels on push#41
Conversation
WalkthroughTwo GitHub Actions workflows were updated: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/pr-labels.yml (1)
14-15: Remove the unused checkout step.The job only runs
gh pr editcommands, which operate via the GitHub CLI API and don't require workspace files. The PR number and GitHub token are provided through GitHub's environment variables, not from the repository. Removing this step reduces runtime and unnecessary attack surface.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-labels.yml around lines 14 - 15, Remove the unnecessary checkout step named "Checkout code into workspace directory" that uses actions/checkout@v4; delete the step block containing that uses: actions/checkout@v4 entry from the workflow so the job only runs the gh pr edit commands and doesn't perform a workspace checkout.
🤖 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/pr-labels.yml:
- Around line 20-21: The workflow currently masks all failures by appending "||
true" to the two gh pr edit commands (the calls that remove "ready" and
"deployed" labels), which hides token/API/rate-limit errors; remove the "||
true" from those gh pr edit invocations and enable stricter shell error handling
(e.g., add set -euo pipefail at the top of the step or script) so real failures
surface, or alternatively explicitly handle only the benign "label not found"
case and allow other non-zero exits to fail the job.
---
Nitpick comments:
In @.github/workflows/pr-labels.yml:
- Around line 14-15: Remove the unnecessary checkout step named "Checkout code
into workspace directory" that uses actions/checkout@v4; delete the step block
containing that uses: actions/checkout@v4 entry from the workflow so the job
only runs the gh pr edit commands and doesn't perform a workspace checkout.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 028bc930-29a6-421a-9d29-b934f4b5357e
📒 Files selected for processing (2)
.github/workflows/close-issues-prs.yml.github/workflows/pr-labels.yml
Summary by CodeRabbit