Skip to content

🌱 (ci) - Add stale config to close PRs and issues which are inactivity #1681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow automatically marks issues and pull requests as stale after 90 days of inactivity
# and closes them after an additional 30 days if no further activity occurs.
#
# Key behavior:
# - After 90 days of no activity:
# - Open issues and pull requests are labeled with "lifecycle/stale"
# - A comment is posted to notify contributors about the inactivity
#
# - After 30 additional days (i.e., 120 days total):
# - If still inactive and still labeled "lifecycle/stale", the issue or PR is closed
# - A closing comment is posted to explain why it was closed
#
# - Activity such as a comment, commit, or label removal during the stale period
# will remove the "lifecycle/stale" label and reset the clock
#
# - Items with any of the following labels will never be marked stale or closed:
# - security
# - planned
# - priority/critical
# - lifecycle/frozen
# - verified
#
# This workflow uses: https://github.com/actions/stale
name: "Close stale issues and PRs"
on:
schedule:
- cron: "0 1 * * *" # Runs daily at 01:00 UTC (adjust as needed)

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write # allow labeling, commenting, closing issues
pull-requests: write # allow labeling, commenting, closing PRs
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90
days-before-close: 30
stale-issue-label: "lifecycle/stale"
stale-pr-label: "lifecycle/stale"
stale-issue-message: >
Issues go stale after 90 days of inactivity. If there is no further
activity, the issue will be closed in another 30 days.
stale-pr-message: >
PRs go stale after 90 days of inactivity. If there is no further
activity, the PR will be closed in another 30 days.
close-issue-message: "This issue has been closed due to inactivity."
close-pr-message: "This pull request has been closed due to inactivity."
exempt-issue-labels: "security,planned,priority/critical,lifecycle/frozen,verified"
exempt-pr-labels: "security,planned,priority/critical,lifecycle/frozen,verified"
operations-per-run: 30
Loading