Skip to content

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

Description

@jasnell

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.

Activity

  1. phillipj commented on Jun 25, 2020

    @phillipj
    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 🤷‍♂️

  2. mmarchini commented on Jun 27, 2020

    @mmarchini
    Contributor

    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.

  3. phillipj commented on Jun 28, 2020

    @phillipj
    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.'
  4. phillipj commented on Jul 5, 2020

    @phillipj
    Member

    @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?

  5. jasnell commented on Jul 5, 2020

    @jasnell
    MemberAuthor

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

  6. phillipj commented on Jul 5, 2020

    @phillipj
    Member

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

    Thx for the quick reply!

  7. mmarchini commented on Jul 5, 2020

    @mmarchini
    Contributor

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

  8. phillipj commented on Jul 7, 2020

    @phillipj
    Member

    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.

  9. mmarchini commented on Jul 7, 2020

    @mmarchini
    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.

  10. phillipj commented on Jul 8, 2020

    @phillipj
    Member

    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.

  11. mmarchini commented on Jul 10, 2020

    @mmarchini
    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 🤷

  12. phillipj commented on Jul 22, 2020

    @phillipj
    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.

  13. phillipj commented on Sep 21, 2020

    @phillipj
    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions