From d6c796b4ab41dd862597cce6dd892021a595e249 Mon Sep 17 00:00:00 2001 From: Phillip Johnsen Date: Wed, 29 Jul 2020 20:30:18 +0200 Subject: [PATCH] build: close stalled issues and PRs with github action 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 https://github.com/nodejs/github-bot/issues/261 PR-URL: https://github.com/nodejs/node/pull/34555 Reviewed-By: James M Snell Reviewed-By: Mary Marchini Reviewed-By: Denys Otrishko Reviewed-By: Gus Caplan Reviewed-By: Zeyu Yang Reviewed-By: Michael Dawson Reviewed-By: Shelley Vohr --- .github/workflows/close-stalled.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/close-stalled.yml diff --git a/.github/workflows/close-stalled.yml b/.github/workflows/close-stalled.yml new file mode 100644 index 00000000000000..89861c6445263a --- /dev/null +++ b/.github/workflows/close-stalled.yml @@ -0,0 +1,21 @@ +name: Close stalled issues and PRs +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-close: 30 + stale-pr-label: stalled + stale-issue-label: stalled + close-issue-message: Closing this because it has stalled. Feel free to reopen if this issue is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. + close-pr-message: Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. + # deactivates automatic removal of stalled label if issue gets any activity + remove-stale-when-updated: false + # deactivates automatic stale labelling as we prefer to do that manually + days-before-stale: -1