From d79bcce39c52bf7baffcf09c5cbb7089bdab0be1 Mon Sep 17 00:00:00 2001 From: Stephen Lang Date: Mon, 2 Sep 2024 14:56:40 +0100 Subject: [PATCH 1/2] ci: use stale action to apply needs-attention label --- .github/workflows/stale.yml | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 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 000000000..8dce6f0c3 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,49 @@ +name: Check whether issues or PRs need attention +on: + workflow_dispatch: {} + schedule: + - cron: "0 0 * * *" +permissions: + issues: write + pull-requests: write +jobs: + needs-attention: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-stale: 30 + days-before-close: -1 # never close automatically + stale-issue-message: > + This issue has not had any activity in the past 30 days, so the + `needs-attention` label has been added to it. + + If the opened issue is a bug, check to see if a newer release fixed + your issue. If it is no longer relevant, please feel free to close + this issue. + + The `needs-attention` label signals to maintainers that something + has fallen through the cracks. No action is needed by you; your issue + will be kept open and you do not have to respond to this comment. The + label will be removed the next time this job runs if there is new + activity. + + Thank you for your contributions! + stale-pr-message: > + This PR has not had any activity in the past 30 days, so the + `needs-attention` label has been added to it. + + If you do not have enough time to follow up on this PR or you think + it's no longer relevant, consider closing it. + + The `needs-attention` label signals to maintainers that something + has fallen through the cracks. No action is needed by you; your PR + will be kept open and you do not have to respond to this comment. + The label will be removed the next time this job runs if there is + new activity. + + Thank you for your contributions! + stale-issue-label: needs-attention + stale-pr-label: needs-attention + exempt-issue-labels: keepalive + exempt-pr-labels: keepalive From 9fe1b3497a5e7257a8e95c76f4b7d0f35110a5e1 Mon Sep 17 00:00:00 2001 From: Stephen Lang Date: Tue, 3 Sep 2024 10:33:42 +0100 Subject: [PATCH 2/2] ci: apply stale label and auto-close after 7 days --- .github/workflows/stale.yml | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8dce6f0c3..1f0e854f0 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,43 +7,32 @@ permissions: issues: write pull-requests: write jobs: - needs-attention: + stale: runs-on: ubuntu-latest steps: - uses: actions/stale@v9 with: days-before-stale: 30 - days-before-close: -1 # never close automatically + days-before-close: 7 stale-issue-message: > This issue has not had any activity in the past 30 days, so the - `needs-attention` label has been added to it. + `stale` label has been added to it. - If the opened issue is a bug, check to see if a newer release fixed - your issue. If it is no longer relevant, please feel free to close - this issue. - - The `needs-attention` label signals to maintainers that something - has fallen through the cracks. No action is needed by you; your issue - will be kept open and you do not have to respond to this comment. The - label will be removed the next time this job runs if there is new - activity. + * The `stale` label will be removed if there is new activity + * The issue will be closed in 2 days if there is no new activity + * Add the `keepalive` label to exempt this issue from the stale check action Thank you for your contributions! stale-pr-message: > - This PR has not had any activity in the past 30 days, so the - `needs-attention` label has been added to it. - - If you do not have enough time to follow up on this PR or you think - it's no longer relevant, consider closing it. + This PR has been automatically marked as stale because it has not + had any activity in the past 30 days. - The `needs-attention` label signals to maintainers that something - has fallen through the cracks. No action is needed by you; your PR - will be kept open and you do not have to respond to this comment. - The label will be removed the next time this job runs if there is - new activity. + The next time this stale check runs, the stale label will be + removed if there is new activity. The issue will be closed in 7 + days if there is no new activity. Thank you for your contributions! - stale-issue-label: needs-attention - stale-pr-label: needs-attention + stale-issue-label: stale + stale-pr-label: stale exempt-issue-labels: keepalive exempt-pr-labels: keepalive