Skip to content
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

Label and close stale PRs #10274

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
32 changes: 32 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Label and close stale PRs'
on:
schedule:
# Run at 1:30 AM UTC every day
- cron: '30 1 * * *'
workflow_dispatch: # Allows manual triggering

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
# Pull Request Settings
days-before-pr-stale: 150
days-before-pr-close: 30
stale-pr-message: 'Thank you for your contribution. This pull request has been marked as stale because it has had no activity in the last 150 days. It will be closed in 30 days if there is no further activity. If you need more time, you can remove the "stale" label.'
dimitarvdimitrov marked this conversation as resolved.
Show resolved Hide resolved
close-pr-message: 'This pull request has been closed because it has been stale for 30 days with no activity. Feel free to reopen if you want to continue working on this.'
stale-pr-label: 'stale'

# Disable issue handling completely
days-before-stale: -1
days-before-close: -1

# Optional: Remove stale label when PR is updated
remove-stale-when-updated: true

# Optional settings to reduce API usage
operations-per-run: 100

# Enable statistics in the logs
enable-statistics: true
2 changes: 2 additions & 0 deletions docs/internal/contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Doing so can be a helpful way of asking for assistance or to develop an idea.

When you open a PR as a draft, add a short description of what you’re still working on, what you are seeking assistance with, or both.

There is an automated GitHub action which closes PRs after 180 days of inactivity to keep the PR list clean. 30 days before closing, the GitHub action will add `stale` label to the PR. If you need more time, please remove the `stale` label.

Before a piece of work is finished:

- Organize it into one or more commits, and include a commit message for each that describes all of the changes that you made in that commit. It is more helpful to explain _why_ more than _what_, which are available via `git diff`.
Expand Down
Loading