Skip to content

Manage PR/Issues that are stale automatically #8706

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
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
44 changes: 44 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: close stale issues and pr
on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/stale@v8
with:
debug-only: true
days-before-issue-stale: 28
days-before-issue-close: 7
any-of-issue-labels:
[
"Waiting on author",
"Cannot reproduce 🤷",
"python past end of life",
"Won't fix/not planned",
]
exempt-issue-labels: ["High priority", "Blocked 🚧", "Needs decision 🔒"]
stale-issue-message:
"This issue is stale because it has been open 4 weeks with no activity.
Remove 'Stale' label or comment or this will be closed in a week."
close-issue-message:
"This issue was closed because it has been stalled for five weeks with no
activity."

any-of-pr-labels:
["Waiting on author", "python past end of life", "Won't fix/not planned"]
exempt-pr-labels: ["High priority", "Blocked 🚧", "Needs review 🔍"]
days-before-pr-stale: 56
days-before-pr-close: -1
stale-pr-label: "Needs take over 🛎️"
Copy link
Member

Choose a reason for hiding this comment

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

Can we exclude PRs with a label of needs-review? I wouldn't be comfortable marking PRs stale without an initial review.

Copy link
Collaborator

Choose a reason for hiding this comment

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

For me this label is really indicative of PRs which it would just be a shame to lose the time investment of. But if you really want to close these I'll give in.

Copy link
Member

Choose a reason for hiding this comment

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

I just don't see how it's a loss, it's in the repository permanently, and easily searchable with the label we've already given it.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like Pierre is suggesting not closing PRs for the moment, at least while we try this out. See the suggestion above to use -1 days.

close-pr-message:
"This PR was closed because it needed to be taken over for 16 weeks with no
one stepping up."
stale-pr-message:
"This PR needs take over because because it has been open 8 weeks with no
activity."