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

Trigger stale workflow on issue comments to remove stale label immediately #5252

Merged
merged 3 commits into from
Apr 17, 2023

Conversation

yubiuser
Copy link
Member

What does this PR aim to accomplish?:

We use the stale action to mark issues stale after 30 days of inactivity. The actions runs only once a day to mark stale issues. If updates to issues occur (e.g. comments) the action removes the stale label. However, this happens so far only once a day - in the worst case leaving a "gap" of 23:59 between comments and label removal.

This PR adds a trigger to the stale workflow to run on issue_commentso that new comments should remove the label immediately.


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

…ately

Signed-off-by: Christian König <ckoenig@posteo.de>
@yubiuser yubiuser requested a review from a team April 15, 2023 08:29
@dschaper
Copy link
Member

Will this both mark and unmark on every comment or just unmark on every comment?

@yubiuser
Copy link
Member Author

As this triggers the whole workflow, it will also trigger marking issues as stale if they are due.

@PromoFaux
Copy link
Member

I think running it on every issue_comment is overkill, and may even lead us into hitting rate limits on the Github API (1000 requests per hour per repo).. maybe not solely this, but in combination with other actions.

However, this happens so far only once a day - in the worst case leaving a "gap" of 23:59 between comments and label removal.

Does this cause an issue? We know that once a comment is added to an issue then next time the action runs the stale label will be removed.

How about instead just changing the schedule to be every n hours - with n to be decided. (But maybe 12?)

@yubiuser
Copy link
Member Author

Does this cause an issue? We know that once a comment is added to an issue then next time the action runs the stale label will be removed.

It can be irritating for users if the label is not removed shortly after a new comment was added. I agree with
pi-hole/web#2534 (comment)

__

We're not the getting that many comments... How about changing the workflow to not trigger the whole stale action but only removing the label if there is any?

Signed-off-by: Christian König <ckoenig@posteo.de>
.github/workflows/stale.yml Outdated Show resolved Hide resolved
Signed-off-by: Christian König <ckoenig@posteo.de>
@dschaper dschaper merged commit 8fbad01 into development Apr 17, 2023
16 checks passed
@dschaper dschaper deleted the tweak/stale branch April 17, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants