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

Add actions/stale gh-action #538

Merged
merged 1 commit into from
Feb 26, 2024
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
26 changes: 26 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Stale issues and pull requests
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: What will happen with all open issues / PRs on the first invocation of this job? Will all issues / PRs with >90 days of inactivity get labelled life-cycle/stale? Nothing will get closed, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup, it will be a busy first day for this action

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes to which part of the question? Yes to both? Meaning the stale label will be added to all issues older than 90 days, but NO rotten labels will be added on the initial run, right?

As far, as I understand it, an issue first gets the stale label after 90 days of inactivity. It then needs to sit with the stale label for 90 days before it is relabeled as rotten (pinging all watchers of the issue in the process). It then needs to sit with the rotten label for 90 days before it is automatically closed.

If you remove either label (regardless of which lifecycle state it’s in), the whole process starts over and you have another 270 days before the issue is closed (90 until stale label, another 90 until rotten, and another 90 until closed).

So as long as the initial run only applies the stale label, we have 180 more days until an auto close.

Copy link
Contributor

@klueska klueska Feb 23, 2024

Choose a reason for hiding this comment

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

Actually, here’s the rules applied by k8s, can we just configure ours the same:
kubernetes/website#34183 (comment)

So 90,30,30 instead of 90,90,90 as I said above.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, also update the labels to match lifecycle/ vs life-cycle/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

after seeing the action, looks like issues older than 180 days will get closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So 90,30,30 instead of 90,90,90 as I said above.

This GitHub action only has 2 stages, so it would be 90-60, is that ok? , this PR proposes 90-90

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated the PR
removed the rotten label
and adjusted the closing time

Copy link
Collaborator Author

Choose a reason for hiding this comment

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


on:
schedule:
- cron: "21 4 * * *"

jobs:
stale:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v8
with:
stale-issue-message: 'This issue has become stale and will be closed automatically within 30 days if no activity is recorded.'
stale-pr-message: 'This pull request has become stale and will be closed automatically within 30 days if no activity is recorded.'
stale-issue-label: 'life-cycle/stale'
stale-pr-label: 'life-cycle/stale'
ArangoGutierrez marked this conversation as resolved.
Show resolved Hide resolved
days-before-stale: 90
close-issue-message: 'This issue was automatically closed due to inactivity.'
close-pr-message: 'This pull request was automatically closed due to inactivity.'
days-before-issue-close: 30
days-before-pr-close: 30
remove-stale-when-updated: true