Skip to content

[actions] close stale prs and remove labels on push#41

Merged
capcom6 merged 1 commit into
masterfrom
actions/close-issues-pr-labels
Apr 14, 2026
Merged

[actions] close stale prs and remove labels on push#41
capcom6 merged 1 commit into
masterfrom
actions/close-issues-pr-labels

Conversation

@capcom6

@capcom6 capcom6 commented Apr 14, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Enhanced automated stale issue and pull request management workflow with improved configuration for handling inactive pull requests more effectively.
    • Added automated workflow to remove specified labels from pull requests when new commits are pushed.

@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown

Walkthrough

Two GitHub Actions workflows were updated: .github/workflows/close-issues-prs.yml was upgraded from actions/stale v5 to v10 with configuration changes to manage stale pull requests, and a new workflow .github/workflows/pr-labels.yml was added to automatically remove specific labels (ready, deployed) when pull requests are opened or updated.

Changes

Cohort / File(s) Summary
Stale Issues and PRs Management
.github/workflows/close-issues-prs.yml
Updated action from v5 to v10, migrated configuration to use days-before-close parameter, added PR-specific stale/close messaging and labeling (stale-pr-message, close-pr-message, stale-pr-label), expanded permissions to include pull-requests: write, removed explicit repo-token input.
Label Cleanup on PR Updates
.github/workflows/pr-labels.yml
New workflow that triggers on PR open/synchronize events, removes ready and deployed labels using GitHub CLI with error suppression, requires pull-requests: write permission.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures both main changes: upgrading the stale PR closure workflow and adding a new label removal workflow on push.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 edit commands, 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

📥 Commits

Reviewing files that changed from the base of the PR and between f30b333 and 96f7629.

📒 Files selected for processing (2)
  • .github/workflows/close-issues-prs.yml
  • .github/workflows/pr-labels.yml

Comment thread .github/workflows/pr-labels.yml
@capcom6 capcom6 merged commit 0e1481e into master Apr 14, 2026
9 checks passed
@capcom6 capcom6 deleted the actions/close-issues-pr-labels branch April 14, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant