From 8941f92b7ab3e03d7021aaff517ca6951e9ea0d7 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Wed, 29 Mar 2023 14:34:11 +0900 Subject: [PATCH] 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"