Skip to content

ci(pr-automation): stale prs and issues, pr heading and body checker, labels - #248

Merged
Ryan-Millard merged 11 commits into
mainfrom
ci/stale-issues-prs
Feb 4, 2026
Merged

ci(pr-automation): stale prs and issues, pr heading and body checker, labels#248
Ryan-Millard merged 11 commits into
mainfrom
ci/stale-issues-prs

Conversation

@Ryan-Millard

@Ryan-Millard Ryan-Millard commented Jan 30, 2026

Copy link
Copy Markdown
Owner

Updated stale issue and PR messages, added days before stale and close settings, and exempt labels.

What was changed & why

  • A new simple workflow to manage stale issues & PRs.
    • This helps maintainers by allowing a workflow to warn and close these instead of the current manual setup.
  • Automatic PR labeler
  • PR validator
    • Ensures correct content remains in the PR

Changes

  • stale.yml
  • pr-auto-label.yml
  • pr-check.yml

Testing & Verification

I ran it on a private repository. It worked as expected.

Additional Resources

None.

Summary by CodeRabbit

  • Chores

    • Automated maintenance: marks inactive issues/PRs stale after 60 days and closes them 14 days later; runs daily and supports manual triggering while preserving pinned/important items and applying distinct labels.
    • Auto-labeling: adds automatic PR labeling based on changed file patterns (languages, docs, CI, JS/TS, etc.).
    • PR validation: enforces PR title/body format and requires an explicit issue reference or "none".
  • Documentation

    • PR template clarified to prompt an issue reference or "none".

Updated stale issue and PR messages, added days before stale and close settings, and exempt labels.
@coderabbitai

coderabbitai Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@Ryan-Millard has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Adds GitHub automation: a scheduled stale workflow, PR validation workflow, PR auto-label workflow, labeler configuration, and a small PR template tweak requiring an issue placeholder or none. Workflows run daily or on PR events and use GitHub Actions for labeling, stale handling, and validation.

Changes

Cohort / File(s) Summary
Workflows — stale
.github/workflows/stale.yml
New scheduled + manual workflow using actions/stale@v10 to mark issues/PRs stale after 60 days and close after 14 days; applies no-issue-activity / no-pr-activity, exempts pinned and important, grants write perms for issues & pull-requests.
Workflows — PR validation
.github/workflows/pr-check.yml
New "PR Validation" workflow with title-check and body-check jobs enforcing conventional-style PR titles, required PR body sections, and requiring an issue reference or explicit none; uses actions/github-script@v7.
Workflows — auto-label
.github/workflows/pr-auto-label.yml
New PR-triggered workflow (runs on pull_request_target) using actions/labeler@v6 to assign labels based on changed paths; sets required permissions and uses secrets.GITHUB_TOKEN.
Labeler config
.github/labeler.yml
New labeler mappings for C/C++, docs, CI, JS/TS (includes Vite patterns and common package manifest/lockfile matches).
Template
.github/PULL_REQUEST_TEMPLATE.md
Minor edit: changed Fixes: line to include #<issue-number> placeholder and guidance to use Fixes: none when no related issue exists.

Sequence Diagram(s)

sequenceDiagram
  participant Contributor
  participant GitHub as "GitHub Events"
  participant Labeler as "actions/labeler@v6"
  participant PRCheck as "PR Validation (github-script)"
  participant Stale as "actions/stale@v10"

  Contributor->>GitHub: open or update PR
  GitHub->>Labeler: trigger pr-auto-label job (reads `.github/labeler.yml`)
  Labeler-->>GitHub: apply labels to PR
  GitHub->>PRCheck: run title-check and body-check jobs
  PRCheck-->>GitHub: report pass/fail statuses

  Note over GitHub,Stale: scheduled maintenance (daily)
  Stale->>GitHub: mark stale / close issues & PRs per config
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hop through repos in moonlit code,

I label, nudge, and close the quiet road,
I check each title, tidy each plea,
I mark the stale and set the issues free,
A carrot-coded cheer for automation's glow.

🚥 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 clearly summarizes the main changes: adding CI automation for stale PRs/issues, PR validation checks, and automatic labeling.
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.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/stale-issues-prs

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
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/workflows/stale.yml:
- Around line 1-4: Run Prettier on the workflow file to fix CI style errors:
format the YAML using your project's Prettier config (e.g., run prettier --write
on the workflow file or use the repo's formatting npm script) and commit the
resulting changes so the CI lint check for the stale workflow passes; the fix
targets the top-level workflow YAML content (the stale workflow header/comments)
that currently fails formatting.
- Line 20: The workflow currently pins the stale action to "uses:
actions/stale@v5" which targets Node 16 and is no longer supported; update that
reference to a supported release (recommend "actions/stale@v9" for Node 20 or
"actions/stale@v10" for Node 24) and then review and adjust any action inputs in
the workflow to match the new input schema/field names from the actions/stale
release notes; locate the literal string "uses: actions/stale@v5" in the
workflow and replace the version, then run a dry workflow or linter to ensure
the updated inputs (if any) for the stale action (e.g., labels, exempt teams,
days-before-stale, etc.) conform to the v9/v10 schema.

Comment thread .github/workflows/stale.yml
Comment thread .github/workflows/stale.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/stale.yml:
- Line 29: The workflow uses the deprecated input exempt-labels for
actions/stale@v10; replace it with the new inputs exempt-issue-labels and
exempt-pr-labels and set them to the same CSV values currently used (e.g.,
"pinned,important"). Update the job step referencing exempt-labels to instead
pass exempt-issue-labels: "pinned,important" and exempt-pr-labels:
"pinned,important" so the action accepts exemptions for both issues and PRs.

Comment thread .github/workflows/stale.yml Outdated
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Ryan-Millard Ryan-Millard changed the title ci(stale.yml): Configure stale workflow with new settings ci(pr-automation): stale prs, heading, body, labels Jan 31, 2026
@Ryan-Millard Ryan-Millard changed the title ci(pr-automation): stale prs, heading, body, labels ci(pr-automation): stale prs and issues, pr heading and body checker, labels Jan 31, 2026
Comment thread .github/workflows/pr-check.yml Fixed
Comment thread .github/workflows/pr-check.yml Fixed
Ryan-Millard and others added 2 commits January 31, 2026 02:30
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/pr-auto-label.yml:
- Around line 8-21: The workflow's Labeler step uses actions/labeler@v4 which is
unsupported; update the step in the label job to actions/labeler@v6 (e.g.,
actions/labeler@v6 or v6.0.1) and keep the existing inputs (repo-token) but
after updating, validate and, if needed, adapt your .github/labeler.yml config
to the v5+ schema changes; locate the "label" job and the step that references
actions/labeler@v4 to make this change.

Comment thread .github/workflows/pr-auto-label.yml
@Ryan-Millard

Copy link
Copy Markdown
Owner Author

@CodeRabbit full review

@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@Ryan-Millard

Copy link
Copy Markdown
Owner Author

@CodeRabbit where is the review?

@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

@Ryan-Millard: I apologize for the confusion. Let me trigger a comprehensive review of all the changes in this PR right now. You should see detailed inline comments on each of the modified files shortly.

✅ Actions performed

Full review triggered.

@Ryan-Millard
Ryan-Millard merged commit 5bcc8e2 into main Feb 4, 2026
11 checks passed
@Ryan-Millard
Ryan-Millard deleted the ci/stale-issues-prs branch February 4, 2026 00:52
Ryan-Millard added a commit that referenced this pull request Feb 4, 2026
… labels (#248)

* ci(stale.yml): Configure stale workflow with new settings

Updated stale issue and PR messages, added days before stale and close settings, and exempt labels.

* style(stale-workflow): format properly

* deps(stale-workflow): bump to newer v10

* ci(stale.yml): fix label inputs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* docs(PR-template): update PR template

* ci: add PR auto-label workflow and labeler config

* ci: PR heading and body checker

* fix: workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* style(workflows): format new workflow files

* ci(deps): bump labeler to v6

* ci(pr-check): fix permissions

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Ryan-Millard added a commit that referenced this pull request Feb 4, 2026
… labels (#248)

* ci(stale.yml): Configure stale workflow with new settings

Updated stale issue and PR messages, added days before stale and close settings, and exempt labels.

* style(stale-workflow): format properly

* deps(stale-workflow): bump to newer v10

* ci(stale.yml): fix label inputs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* docs(PR-template): update PR template

* ci: add PR auto-label workflow and labeler config

* ci: PR heading and body checker

* fix: workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* style(workflows): format new workflow files

* ci(deps): bump labeler to v6

* ci(pr-check): fix permissions

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Ryan-Millard added a commit that referenced this pull request Feb 4, 2026
… labels (#248)

* ci(stale.yml): Configure stale workflow with new settings

Updated stale issue and PR messages, added days before stale and close settings, and exempt labels.

* style(stale-workflow): format properly

* deps(stale-workflow): bump to newer v10

* ci(stale.yml): fix label inputs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* docs(PR-template): update PR template

* ci: add PR auto-label workflow and labeler config

* ci: PR heading and body checker

* fix: workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* style(workflows): format new workflow files

* ci(deps): bump labeler to v6

* ci(pr-check): fix permissions

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Ryan-Millard added a commit that referenced this pull request Feb 4, 2026
… labels (#248)

* ci(stale.yml): Configure stale workflow with new settings

Updated stale issue and PR messages, added days before stale and close settings, and exempt labels.

* style(stale-workflow): format properly

* deps(stale-workflow): bump to newer v10

* ci(stale.yml): fix label inputs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* docs(PR-template): update PR template

* ci: add PR auto-label workflow and labeler config

* ci: PR heading and body checker

* fix: workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* style(workflows): format new workflow files

* ci(deps): bump labeler to v6

* ci(pr-check): fix permissions

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.

2 participants