Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

add actions workflow for closing stale issues #4561

Merged
merged 13 commits into from
Aug 17, 2020
Merged

add actions workflow for closing stale issues #4561

merged 13 commits into from
Aug 17, 2020

Conversation

epwalsh
Copy link
Member

@epwalsh epwalsh commented Aug 14, 2020

@epwalsh
Copy link
Member Author

epwalsh commented Aug 14, 2020

See https://github.com/allenai/allennlp/pull/4561/checks?check_run_id=986726261 to see what would be closed. This was a dry run, so nothing was actually closed.

Copy link
Contributor

@matt-gardner matt-gardner left a comment

Choose a reason for hiding this comment

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

LGTM! This is great. Seeing how easy it is makes me wonder if it's worth also having something that pings assignees if there has been no activity for some period of time. I imagine there are plenty of issues that have been assigned to me over the years that I have forgotten about.

# branches:
# - master
schedule:
- cron: '5 16-23 * * 1,2,3,4,5' # 5 past the hour, every hour from 16-24 UTC, on Monday - Friday
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need it to run that often? Why not just once per day? I suppose it doesn't matter too much, if it's cheap to run.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, once a day probably makes more sense 👍

@epwalsh
Copy link
Member Author

epwalsh commented Aug 15, 2020

Seeing how easy it is makes me wonder if it's worth also having something that pings assignees if there has been no activity for some period of time.

That would be pretty easy as well! I'll tack that on to this PR

@epwalsh epwalsh requested a review from matt-gardner August 15, 2020 15:35

for issue in open_issues:
if (
issue.milestone is None
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this check, and the PR check? I'd be fine if it just said "is assigned and last updated more than two weeks ago".

@epwalsh
Copy link
Member Author

epwalsh commented Aug 15, 2020 via email

Copy link
Member

@dirkgr dirkgr left a comment

Choose a reason for hiding this comment

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

Very cool!

print("Closing", issue)
issue.create_comment(
"This issue is being closed due to lack of activity. "
"If you think it still needs to be addressed, please comment on this thread 👇"
Copy link
Member

Choose a reason for hiding this comment

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

Will anyone see it if people add a comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

Anyone following the repo should still get notified about additional comments on closed issues

@epwalsh epwalsh merged commit 8511274 into master Aug 17, 2020
@epwalsh epwalsh deleted the issues-bot branch August 17, 2020 20:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a bot to autoclose issues
3 participants