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

Automatically comment on PRs after inactivity #17344

Open
tsteur opened this issue Mar 14, 2021 · 6 comments · Fixed by #17354
Open

Automatically comment on PRs after inactivity #17344

tsteur opened this issue Mar 14, 2021 · 6 comments · Fixed by #17354
Labels
Better processes Indicates an issue is about improving how we work. RFC Indicates the issue is a request for comments where the author is looking for feedback. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.

Comments

@tsteur
Copy link
Member

tsteur commented Mar 14, 2021

see #17318 (comment)

In #17318 we're discussing about following up automatically when a PR has been waiting for a review for too long. This issue is about automatically following up when we're waiting for the PR author.

We could maybe follow up with (community) PRs automatically if they have been inactive for a while for example when we're waiting for changes for say 2 weeks or more.

After 6 weeks we could close the PR and remind the PR author that we'll reopen the PR again once work continues etc.

so far we have this message for when a PR is more than 1 month old: https://github.com/matomo-org/matomo/wiki/Triage-the-issue-trackers#pull-request-more-than-1-month-old

This logic would ideally also apply to our own PRs but we'd need to have a custom label that we can assign to ignore this logic as sometimes we want to keep a PR open for longer.

I wonder though how we'd know if a PR is inactive for too long? I suppose it would be if there PR was last marked as Review: Changes requested and there hasn't been a commit since then?

@flamisz recommended https://github.com/actions/stale https://github.com/marketplace/actions/close-stale-issues for closing the issues automatically. We'd also want to comment automatically though.

fyi @mattab

@tsteur tsteur added Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. RFC Indicates the issue is a request for comments where the author is looking for feedback. labels Mar 14, 2021
@tsteur
Copy link
Member Author

tsteur commented Mar 14, 2021

Any thoughts @mattab @sgiehl @flamisz @diosmosis ?

@flamisz
Copy link
Contributor

flamisz commented Mar 15, 2021

@tsteur the action I recommended can comment and add a label on the pr or issue first, and closing later (can setup how many days of inactivity triggers what). Lots of options.
I added to one of my private repos and set it up for dry run. It means it doesn't add any comment, label, or closing the pr, only we can see in the run log, what would have happened in live mode.

@sgiehl
Copy link
Member

sgiehl commented Mar 15, 2021

For this case we could even use an GitHub App instead of an action. e.g. https://probot.github.io/apps/stale/

@tsteur
Copy link
Member Author

tsteur commented Mar 15, 2021

@flamisz great that it could comment first say after 2 weeks and then close after 6 weeks. Does this time start from PR creation? Is there any chance to only start the time measurement for example from the time Needs Review label was added or once the PR is no longer Draft and then the time from the last commit or so?

So far it says had no activity for a specified amount of time but not sure how they define activity. It might work though as well if we just say if nothing happened for say 2 weeks in a PR then leave a comment.

@tsteur tsteur added the Better processes Indicates an issue is about improving how we work. label Mar 15, 2021
@flamisz flamisz self-assigned this Mar 17, 2021
@tsteur tsteur reopened this Mar 18, 2021
@flamisz flamisz mentioned this issue Mar 29, 2021
10 tasks
@flamisz flamisz removed their assignment Dec 16, 2021
@michalkleiner
Copy link
Contributor

We currently have three actions to mark stale issues and ping core reviewers on PRs that need review and didn't have activity for some time.

I think the current set works ok for us at this stage. but it's also possible to add the automatic PR close, the actions/stale@v3 action supports that.

Is there something we want to do at the moment or can we close this, @matomo-org/core-reviewers / @tsteur?

@sgiehl
Copy link
Member

sgiehl commented Dec 29, 2023

I'd vote for closing this one for now. We can at a later point disucss further changes/improvements when we see any need for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Better processes Indicates an issue is about improving how we work. RFC Indicates the issue is a request for comments where the author is looking for feedback. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants