From 7c105e8c0e8dbadd6af188b6c73849b4ff68f272 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Tue, 19 Nov 2024 15:20:42 -0500 Subject: [PATCH 1/4] Add action to auto close inactive issues as per our triage policy --- .github/workflows/stale.yml | 19 +++++++++++++++++++ sign.sln | 1 + 2 files changed, 20 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 00000000..bdd0ffeb --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: 'Close stale issues and PRs' + +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is stale because it has been open 7 days with no activity after asking for more info. Comment or this will be closed in 4 days.' + close-issue-message: 'This issue was closed because it has been stalled for 10 days with no activity. This can be reopened if additional information is provided.' + days-before-issue-stale: 10 + days-before-issue-close: 4 + days-before-pr-stale: -1 + days-before-pr-close: -1 + any-of-labels: "needs-more-info" diff --git a/sign.sln b/sign.sln index bcd6c440..e7de19ae 100644 --- a/sign.sln +++ b/sign.sln @@ -20,6 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution NuGet.Config = NuGet.Config SdkTools.props = SdkTools.props SECURITY.md = SECURITY.md + .github\workflows\stale.yml = .github\workflows\stale.yml EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sign.Core", "src\Sign.Core\Sign.Core.csproj", "{8781DB2C-CF89-456D-BE9D-D7EF8333F5EC}" From 7693508caffc7ddd52ec6cf9aced53ee098d4249 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Tue, 19 Nov 2024 15:24:43 -0500 Subject: [PATCH 2/4] Specified action's permissions as default is r/o --- .github/workflows/stale.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bdd0ffeb..35990204 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,5 +1,9 @@ name: 'Close stale issues and PRs' +permissions: + issues: write + pull-requests: write + on: schedule: - cron: '30 1 * * *' From 821a87fe572e236b08e3537c51bcfb65aa67104d Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Tue, 19 Nov 2024 15:46:39 -0500 Subject: [PATCH 3/4] Fix time values --- .github/workflows/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 35990204..90ab3ac4 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -14,8 +14,8 @@ jobs: steps: - uses: actions/stale@v9 with: - stale-issue-message: 'This issue is stale because it has been open 7 days with no activity after asking for more info. Comment or this will be closed in 4 days.' - close-issue-message: 'This issue was closed because it has been stalled for 10 days with no activity. This can be reopened if additional information is provided.' + stale-issue-message: 'This issue is stale because it has been open 10 days with no activity after asking for more info. Comment or this will be closed in 4 days.' + close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity. This can be reopened if additional information is provided.' days-before-issue-stale: 10 days-before-issue-close: 4 days-before-pr-stale: -1 From bc0f38340b58de9714a3c7e24572ca08688a84f9 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Tue, 19 Nov 2024 15:46:57 -0500 Subject: [PATCH 4/4] Only focus on issues --- .github/workflows/stale.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 90ab3ac4..a3451739 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,8 +1,7 @@ -name: 'Close stale issues and PRs' +name: 'Close stale issues' permissions: issues: write - pull-requests: write on: schedule: