From dc910ad7bd39b1a8b0bfb48407977d0d6255c49f Mon Sep 17 00:00:00 2001 From: Alec Edgington <54802828+cqc-alec@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:56:28 +0100 Subject: [PATCH] Add workflow to mark stale issues and PRs. (#1437) --- .github/workflows/stale.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..ac2786780a --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,35 @@ +# This workflow adds a "stale" label to issues and PRs that have had no activity +# for a specified amount of time, adding a comment to the issue or PR. It does +# not close the issue or PR. +# +# You can adjust the behaviour by modifying this file. +# +# For more information, see: https://github.com/actions/stale + +name: Mark stale issues and PRs + +on: + schedule: + - cron: '15 5 * * *' + +jobs: + stale: + # Don't run on forks + if: github.repository == 'CQCL/tket' + + runs-on: ubuntu-latest + + permissions: + pull-requests: write + issues: write + + steps: + - uses: actions/stale@v9 + with: + days-before-issue-stale: 120 + days-before-pr-stale: 30 + days-before-close: -1 + stale-issue-label: 'stale' + stale-pr-label: 'stale' + stale-issue-message: 'This issue has been automatically marked as stale.' + stale-pr-message: 'This pull request has been automatically marked as stale.'