-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Description
Hello. I am sorry if I am abusing Issues like this, but I don't see any Discussions set up for this repo and I am unable to understand all nuances of the available features by just looking at README. I am in the process of moving a home grown stale bot to Actions, and I think this should do what I want but I am not 100% sure.
on:
schedule:
# runs every Wednesday at 1am UTC
- cron: '0 1 * * 3'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
operations-per-run: 50
ascending: true
days-before-issue-stale: -1
days-before-issue-close: 7
remove-issue-stale-when-updated: false
stale-issue-message: 'This issue was labeled as **Close?**. Remove **Close?** label or this will be closed in 7 days.'
close-issue-message: 'I am going to close this issue because it was marked with **Close?**, but if you feel that this issue should stay open, then feel free to re-open, remove **Close?** and **closed-by-bot** labels, and apply **keep-open** label.'
close-issue-label: 'closed-by-bot'
exempt-issue-labels: 'keep-open'
only-issue-labels: 'Close?'
days-before-pr-stale: 150
days-before-pr-close: 30
remove-pr-stale-when-updated: true
stale-pr-message: 'This pull request is stale because it has been open 150 days with no activity. Remove **Close?**, comment, or push, or this will be closed in 30 days.'
close-pr-message: 'I am going to close this pull request as per my previous message, but if you feel that this issue should stay open, then feel free to re-open, remove **Close?** and **closed-by-bot** labels, and apply **keep-open** label.'
stale-pr-label: 'Close?'
close-pr-label: 'closed-by-bot'
exempt-pr-labels: 'keep-open'
I am thinking having it run weekly, going through the 50 oldest stuff first (hence, ascending: true
).
Desired issue handling:
- Only comb through open issues marked as "Close?" and then issue
stale-issue-message
and start the clock. Skip issues with "keep-open" label. - People commenting on the issue will not reset the clock.
- After 7 days (this is separate from the cron setting, though is coincidentally also weekly), issue
close-issue-message
, slap a "closed-by-bot" label, and close the issue.
Desired pull request handling:
- Comb through open PRs, except those with "keep-open" label.
- For those without activity the last 5 months or so (150 days), issue
stale-pr-message
, slap a "Close?" label, and start the clock. - People commenting or pushing new commits will reset the clock. (Though currently, we don't let comments reset the clock but it is a small change that we can live with, I think.)
- After another month or so (30 days), issue
close-pr-message
, slap a "closed-by-bot" label, and close the PR.
Things I am not sure about using this Action:
- I am not sure if the YAML is really what my desired issue handling logic is. Is the desired issue logic even possible with this Action? In the home grown bot, it checked for the presence of
stale-issue-message
and that's how it knows whether to proceed withclose-issue-message
or not. I don't know what is the equivalent logic here. If you don't have something like this, what is the closest logic that I can use? - Currently, you only have
remove-stale-when-updated
but I think I need different settings for issue and PR, respectively; hence, the feature request.
I really like what you have done here and wish to use this Action if possible. Thank you for your contributions to the FOSS community!
Metadata
Metadata
Assignees
Labels
No labels