-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Workflow to label and comment stale pull requests #13522
Conversation
c4b9f00
to
c4de81e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my assumptions are correct, then this looks good to me, and if the debugging assumption specifically is correct, then I see no problem with merging this and trying it out.
Also, please rebase against develop, the |
Co-authored-by: Kamil Śliwak <cameel2@gmail.com> Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
291f502
to
e276736
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like euler is broken again, so don't worry about it.
Or not 😄 |
close-pr-label: closed-due-inactivity | ||
days-before-pr-stale: ${{ env.BEFORE_STALE }} | ||
days-before-pr-close: ${{ env.BEFORE_CLOSE }} | ||
exempt-pr-labels: 'external contribution' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This label actually has an emoji in it :) It should be external contribution :star:
.
stale-pr-label: stale | ||
close-pr-label: closed-due-inactivity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remember to actually create these labels before we run the bot. Github would create them automatically but without colors or description.
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action is producing this warning:
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Do they have a newer version that does not use set-output
already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they released v6 some days ago which already upgrade to the new format: actions/stale#839
exempt-draft-pr: true | ||
exempt-all-milestones: true | ||
remove-stale-when-updated: true | ||
operations-per-run: 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd increase this to 100 so that we can process all our current PRs in one go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. But for some reason, this action is parsing issues even though we explicitly disable it. I'm thinking of using another one that I did in my tests that call the graphql api directly for the PRs instead of use this actions/stale
, but it is still a bit incomplete (it does not do everything that the actions/stale
does yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. It probably fetches from the API first and filters only then. Might be worth a feature request or something.
I'd keep it simple for now and stick to this action but yeah, in the longer term we might actually want to switch to the other one (or build a custom one) because I think that just marking as stale is not what we want in some cases. E.g. for unreviewed PRs we might want to instead assign someone randomly or ping the channel or something.
This PR supersedes #13499 and address some of the concerns of the issue #8969.
It adds a workflow to label PRs as stale after 14 days of inactivity, comments on them, and if they remain inactive for more than 7 days, it closes them. If an update occurs, the label is removed, and the timer restarted.
PRs labeled as
external contribution
, milestones, and draft PRs are ignored.Issues are ignored (i.e., set to
-1
).It runs every day at noon.
It is currently set for debugging only and can be triggered manually in the workflow dashboard, so we can check the expected behavior in the workflow logs without affecting the current open PRs.