Skip to content

Add stale.yml - #1855

Merged
shimat merged 2 commits into
mainfrom
stale
Apr 2, 2026
Merged

shimat merged 2 commits into
mainfrom
stale

Conversation

@shimat

@shimat shimat commented Apr 2, 2026 •

Copy link
Copy Markdown
Owner

This pull request adds a GitHub Actions workflow to automatically close stale issues and pull requests. The workflow is scheduled to run daily and will mark items as stale after 30 days of inactivity, then close them 5 days later if there is no further activity.

Workflow automation:

  • Added a new workflow file .github/workflows/stale.yml that uses the actions/stale GitHub Action to manage stale issues and PRs, scheduling it to run every day at 1:00 AM UTC.
  • Configured the workflow to mark issues and PRs as stale after 30 days of inactivity and to close them 5 days after being marked as stale if there is no further activity.

Summary by CodeRabbit

  • Chores
    • Added an automated workflow to manage stale issues and pull requests. Inactive items are marked stale after 30 days and automatically closed 5 days later.
    • The cleanup runs daily at 01:00 UTC to keep the issue and pull request list current and reduce noise for contributors.

@shimat shimat self-assigned this Apr 2, 2026
@coderabbitai

coderabbitai Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a1562922-e6bb-4b7c-805b-2b593ba285d4

📥 Commits

Reviewing files that changed from the base of the PR and between 761b444 and c49cc2d.

📒 Files selected for processing (1)
  • .github/workflows/stale.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/stale.yml

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow was added to automatically mark issues and pull requests as stale after 30 days of inactivity and close them 5 days after being marked stale; it runs daily at 01:00 UTC.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/stale.yml
Added scheduled workflow "Close stale issues and PRs" using actions/stale@v10; runs daily (cron 0 1 * * *), configures issues and pull-requests write permissions, marks items stale after 30 days and closes 5 days later.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Add stale.yml' is too vague and lacks meaningful information about what the workflow does or its purpose. Consider a more descriptive title like 'Add GitHub Actions workflow to automatically close stale issues and PRs' that conveys the actual functionality and intent.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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
  • Commit unit tests in branch stale

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: 1

🧹 Nitpick comments (1)
.github/workflows/stale.yml (1)

11-14: Consider adding stale labels, messages, and exempt labels.

The current configuration is minimal. For better user experience and to protect important issues, consider adding:

  • Stale labels to visually identify stale items
  • Messages to notify users when items are marked stale or closed
  • Exempt labels to prevent auto-closure of important issues (e.g., security, pinned, help-wanted)
📋 Proposed enhancement with labels and messages
       - uses: actions/stale@v10
         with:
           days-before-stale: 30
           days-before-close: 5
+          stale-issue-label: 'stale'
+          stale-pr-label: 'stale'
+          stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs.'
+          stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs.'
+          close-issue-message: 'This issue was automatically closed due to inactivity.'
+          close-pr-message: 'This pull request was automatically closed due to inactivity.'
+          exempt-issue-labels: 'pinned,security,help-wanted'
+          exempt-pr-labels: 'pinned,security,work-in-progress'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/stale.yml around lines 11 - 14, The stale action config
(actions/stale@v10) is minimal—add clearer labels and messages plus exempt
labels to improve UX and protect important issues: update the workflow entry for
actions/stale@v10 to include keys like stale-label (e.g., "stale"),
days-before-stale, days-before-close, exempt-labels (e.g., "security", "pinned",
"help-wanted"), stale-message (notify authors when marked stale) and
close-message (notify when closed); keep the existing days-before-stale and
days-before-close values but add these label and message fields so stale items
are visibly labeled, users are informed, and critical issues are exempted from
auto-closing.
🤖 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/stale.yml:
- Around line 7-11: The workflow's stale job uses actions/stale@v10 but lacks an
explicit permissions block; add a top-level permissions mapping to grant the
workflow the needed write rights (for example, add permissions: issues: write
and pull-requests: write, and any additional read permissions you need such as
contents: read) so the stale action can comment/label/close issues and PRs;
update the workflow YAML by inserting the permissions block at the root of the
workflow (affects the stale job using actions/stale@v10).

---

Nitpick comments:
In @.github/workflows/stale.yml:
- Around line 11-14: The stale action config (actions/stale@v10) is minimal—add
clearer labels and messages plus exempt labels to improve UX and protect
important issues: update the workflow entry for actions/stale@v10 to include
keys like stale-label (e.g., "stale"), days-before-stale, days-before-close,
exempt-labels (e.g., "security", "pinned", "help-wanted"), stale-message (notify
authors when marked stale) and close-message (notify when closed); keep the
existing days-before-stale and days-before-close values but add these label and
message fields so stale items are visibly labeled, users are informed, and
critical issues are exempted from auto-closing.
🪄 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: 519695d9-cf58-4fb7-be7e-2527cb22eceb

📥 Commits

Reviewing files that changed from the base of the PR and between 485244e and 761b444.

📒 Files selected for processing (1)
  • .github/workflows/stale.yml

Comment thread .github/workflows/stale.yml
Add permissions for issues and pull requests in stale workflow
@shimat
shimat merged commit bd2842f into main Apr 2, 2026
10 checks passed
@shimat
shimat deleted the stale branch April 2, 2026 14:39
@shimat shimat added the enhancement New feature or improvement to OpenCvSharp label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to OpenCvSharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant