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

Autoclosing issues/PRs labeled "stalled" after 30 days #261

Closed
jasnell opened this issue Jun 25, 2020 · 13 comments
Closed

Autoclosing issues/PRs labeled "stalled" after 30 days #261

jasnell opened this issue Jun 25, 2020 · 13 comments

Comments

@jasnell
Copy link
Member

jasnell commented Jun 25, 2020

Would it be possible for the bot to automatically close issues/prs 30 days after they have manually been labeled "stalled", along with a comment added as to why it is being closed. I don't want to get into auto-labeling stalled issues just yet but automatically cleaning up those that have been labeled would be good.

@phillipj
Copy link
Member

Cool idea. I would assume it's possible for us to resolve PRs by that label once a day or similar.

Has there been any discussion in core to use GitHub Actions for things like this? I stumbled upon the stale actions recently. Taking some inspiration from that to close PRs with a specific label might not be too far fetched 🤷‍♂️

@mmarchini
Copy link
Contributor

mmarchini commented Jun 27, 2020

We use an action for that on nodejs/build: https://github.com/nodejs/build/blob/master/.github/workflows/stale.yml. I don't think implementing this in the bot is worth the effort + maintenance cost.

@phillipj
Copy link
Member

That stale action' only-labels option seems to be what we're looking for?

only-labels:
  description: 'Only issues or pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels.'

@phillipj
Copy link
Member

phillipj commented Jul 5, 2020

@jasnell would it be valuable if I confirmed the stale GitHub Action indeed solves what you're asking? Or are we shying away from Actions use in core for some reason?

@jasnell
Copy link
Member Author

jasnell commented Jul 5, 2020

@phillipj ... That would be great. The one caveat is that we really ought to avoid automatic stale marking.

@phillipj
Copy link
Member

phillipj commented Jul 5, 2020

Noted. I'll setup a test repo to see how it behaves and report back.

Thx for the quick reply!

@mmarchini
Copy link
Contributor

@phillipj you can also use nodejs/node-auto-test if you want

@phillipj
Copy link
Member

phillipj commented Jul 7, 2020

TLDR; it works.

Had to fork the stale Action and make minor modifications, primarily because we want to perform the stalled labelling ourselfs rather automatic via the Action.

I agree with @mmarchini on his point using an Action for this vs our beloved github-bot. Feels a lot simpler to grasp due to the reduced code base, more focused, and likely easier for core collaborators to tweak or throw away when not wanted anymore.

Other than doing a few example runs in nodejs/node-auto-test, does the idea of using an action for this sound reasonable?

Refs: stale Action modifications, Action config, closed issue and not closed issue.

@mmarchini
Copy link
Contributor

imo if you can show an issue getting closed and one not getting closed/labeled in any repository (and you already did that) that's good enough to send a PR to nodejs/node. Also, I don't see a problem with forked Actions, they were built so they could be forked.

@phillipj
Copy link
Member

phillipj commented Jul 8, 2020

Cool!

I'll see if I can find different set of changes that could land into the upstream stale Action project, as opposed to forking in and deleting a few lines we don't want to run.

Will open a PR against nodejs/node afterwards.

@mmarchini
Copy link
Contributor

Worst case we could use a really big number (like 9999999, which is more than two thousand years) of days to mark an issue as stale 🤷

@phillipj
Copy link
Member

Latest update on this; changes has landed in the upstream stale action project. That means we can use that GitHub Action out of the box.

Awaiting them to build & push a new version, before opening a PR to nodejs/node.

mmarchini pushed a commit to nodejs/node that referenced this issue Sep 3, 2020
This introduces a GitHub Action workflow to close issues and PRs
which has been labelled `stalled` 30 days ago (or more).

`stale` labelling and unlabelling of issues and PRs are still done
manually by collaborators.

Refs nodejs/github-bot#261

PR-URL: #34555
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
richardlau pushed a commit to nodejs/node that referenced this issue Sep 3, 2020
This introduces a GitHub Action workflow to close issues and PRs
which has been labelled `stalled` 30 days ago (or more).

`stale` labelling and unlabelling of issues and PRs are still done
manually by collaborators.

Refs nodejs/github-bot#261

PR-URL: #34555
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
@phillipj
Copy link
Member

Closing this as it feels like we've settled for realising this with a GitHub Action in nodejs/node instead of our beloved @nodejs-github-bot.

addaleax pushed a commit to nodejs/node that referenced this issue Sep 22, 2020
This introduces a GitHub Action workflow to close issues and PRs
which has been labelled `stalled` 30 days ago (or more).

`stale` labelling and unlabelling of issues and PRs are still done
manually by collaborators.

Refs nodejs/github-bot#261

PR-URL: #34555
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
addaleax pushed a commit to nodejs/node that referenced this issue Sep 22, 2020
This introduces a GitHub Action workflow to close issues and PRs
which has been labelled `stalled` 30 days ago (or more).

`stale` labelling and unlabelling of issues and PRs are still done
manually by collaborators.

Refs nodejs/github-bot#261

PR-URL: #34555
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
joesepi pushed a commit to joesepi/node that referenced this issue Jan 8, 2021
This introduces a GitHub Action workflow to close issues and PRs
which has been labelled `stalled` 30 days ago (or more).

`stale` labelling and unlabelling of issues and PRs are still done
manually by collaborators.

Refs nodejs/github-bot#261

PR-URL: nodejs#34555
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants