From 8941f92b7ab3e03d7021aaff517ca6951e9ea0d7 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Wed, 29 Mar 2023 14:34:11 +0900 Subject: [PATCH 1/5] Revert "Stop GitHub Actions from closing tickets" This reverts commit d005002272e7e5b166d3150a5e544274e102c742. Signed-off-by: Takuro Ashie --- .github/workflows/issue-auto-closer.yml | 12 ++++++++++++ .github/workflows/stale-actions.yml | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/issue-auto-closer.yml create mode 100644 .github/workflows/stale-actions.yml diff --git a/.github/workflows/issue-auto-closer.yml b/.github/workflows/issue-auto-closer.yml new file mode 100644 index 0000000000..b8d9ad531f --- /dev/null +++ b/.github/workflows/issue-auto-closer.yml @@ -0,0 +1,12 @@ +name: Autocloser +on: [issues] +jobs: + autoclose: + runs-on: ubuntu-latest + steps: + - name: Autoclose issues that did not follow issue template + uses: roots/issue-closer-action@v1.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-close-message: "@${issue.user.login} this issue was automatically closed because it did not follow the issue template" + issue-pattern: "(.*Describe the bug.*)|(.*Is your feature request related to a problem.*)" diff --git a/.github/workflows/stale-actions.yml b/.github/workflows/stale-actions.yml new file mode 100644 index 0000000000..e0980d3340 --- /dev/null +++ b/.github/workflows/stale-actions.yml @@ -0,0 +1,22 @@ +name: "Mark or close stale issues and PRs" +on: + schedule: + - cron: "00 10 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 90 + days-before-close: 30 + stale-issue-message: "This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days" + stale-pr-message: "This PR has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this PR will be closed in 30 days" + close-issue-message: "This issue was automatically closed because of stale in 30 days" + close-pr-message: "This PR was automatically closed because of stale in 30 days" + stale-pr-label: "stale" + stale-issue-label: "stale" + exempt-issue-labels: "bug,enhancement,feature request,pending,work_in_progress,v1,v2" + exempt-pr-labels: "bug,enhancement,feature request,pending,work_in_progress,v1,v2" From 5846a07e343b8de7bda78b5f7d46475599c0e17f Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Wed, 29 Mar 2023 14:35:51 +0900 Subject: [PATCH 2/5] Remove auto closer for issues that don't follow template For opening normal issues we use issue form for now instead of template so that users no longer able to neglect the issue template. For this purpose auto closer isn't needed anymore. In addition fluentd maintainers might open issues which doesn't follow the template via other systems such as GitHub Projects. Signed-off-by: Takuro Ashie --- .github/workflows/issue-auto-closer.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .github/workflows/issue-auto-closer.yml diff --git a/.github/workflows/issue-auto-closer.yml b/.github/workflows/issue-auto-closer.yml deleted file mode 100644 index b8d9ad531f..0000000000 --- a/.github/workflows/issue-auto-closer.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Autocloser -on: [issues] -jobs: - autoclose: - runs-on: ubuntu-latest - steps: - - name: Autoclose issues that did not follow issue template - uses: roots/issue-closer-action@v1.1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-close-message: "@${issue.user.login} this issue was automatically closed because it did not follow the issue template" - issue-pattern: "(.*Describe the bug.*)|(.*Is your feature request related to a problem.*)" From 1129f9f38bc792fdd3c6e7d9a94e7da97e851b88 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Wed, 29 Mar 2023 14:48:40 +0900 Subject: [PATCH 3/5] GHA: Update stale action to v8 Signed-off-by: Takuro Ashie --- .github/workflows/stale-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-actions.yml b/.github/workflows/stale-actions.yml index e0980d3340..3378987cbf 100644 --- a/.github/workflows/stale-actions.yml +++ b/.github/workflows/stale-actions.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3 + - uses: actions/stale@v8 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 90 From 0f1cedcc9646cbbec96a79035835e24cd4661be1 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Thu, 30 Mar 2023 11:20:41 +0900 Subject: [PATCH 4/5] GHA: Don't close untriaged or assigned issues automatically In addition, shorten `days-before-stale` for triaged issues. Signed-off-by: Takuro Ashie --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + .github/ISSUE_TEMPLATE/feature_request.yaml | 1 + .github/workflows/stale-actions.yml | 10 ++++++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 4262292d1e..1e92168c2f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,6 @@ name: Bug Report description: Create a report with a procedure for reproducing the bug +labels: "waiting-for-triage" body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 005f0bf622..e7f6da8efc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -1,5 +1,6 @@ name: Feature request description: Suggest an idea for this project +labels: "waiting-for-triage" body: - type: markdown attributes: diff --git a/.github/workflows/stale-actions.yml b/.github/workflows/stale-actions.yml index 3378987cbf..f3f84c0ad8 100644 --- a/.github/workflows/stale-actions.yml +++ b/.github/workflows/stale-actions.yml @@ -10,13 +10,15 @@ jobs: - uses: actions/stale@v8 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 90 + days-before-stale: 30 days-before-close: 30 - stale-issue-message: "This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days" + stale-issue-message: "This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 30 days" stale-pr-message: "This PR has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this PR will be closed in 30 days" close-issue-message: "This issue was automatically closed because of stale in 30 days" close-pr-message: "This PR was automatically closed because of stale in 30 days" stale-pr-label: "stale" stale-issue-label: "stale" - exempt-issue-labels: "bug,enhancement,feature request,pending,work_in_progress,v1,v2" - exempt-pr-labels: "bug,enhancement,feature request,pending,work_in_progress,v1,v2" + exempt-issue-labels: "waiting-for-triage,bug,enhancement,feature request,pending,work_in_progress,v1,v2" + exempt-pr-labels: "waiting-for-triage,bug,enhancement,feature request,pending,work_in_progress,v1,v2" + exempt-all-assignees: true + exempt-all-milestones: true From 93a5cb2e7b927d3d3d68b5c1c0d996e1d65f4876 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Fri, 31 Mar 2023 11:33:15 +0900 Subject: [PATCH 5/5] GHA: Shorten `days-before-close` to 7 for issue auto closer Signed-off-by: Takuro Ashie --- .github/workflows/stale-actions.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/stale-actions.yml b/.github/workflows/stale-actions.yml index f3f84c0ad8..17823f0800 100644 --- a/.github/workflows/stale-actions.yml +++ b/.github/workflows/stale-actions.yml @@ -11,11 +11,11 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 30 - days-before-close: 30 - stale-issue-message: "This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 30 days" - stale-pr-message: "This PR has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this PR will be closed in 30 days" - close-issue-message: "This issue was automatically closed because of stale in 30 days" - close-pr-message: "This PR was automatically closed because of stale in 30 days" + days-before-close: 7 + stale-issue-message: "This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 7 days" + stale-pr-message: "This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 7 days" + close-issue-message: "This issue was automatically closed because of stale in 7 days" + close-pr-message: "This PR was automatically closed because of stale in 7 days" stale-pr-label: "stale" stale-issue-label: "stale" exempt-issue-labels: "waiting-for-triage,bug,enhancement,feature request,pending,work_in_progress,v1,v2"