From abdf73fff46d9e46804b567bba2c0a0a3e3fcb2e Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 30 May 2020 05:32:36 +0800 Subject: [PATCH] Added issues cleaner. --- .github/workflows/ci.yml | 2 +- .github/workflows/issues-cleaner.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/issues-cleaner.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e4a485..40fef08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: build +name: 'Continuous Integration' on: push: branches-ignore: diff --git a/.github/workflows/issues-cleaner.yml b/.github/workflows/issues-cleaner.yml new file mode 100644 index 0000000..db61052 --- /dev/null +++ b/.github/workflows/issues-cleaner.yml @@ -0,0 +1,23 @@ +name: "Close stale issues" +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - env: + DAYS_TO_STALE: ${{ 5 }} + DAYS_TO_CLOSE: ${{ 2 }} + uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue is stale because it has been open ${{ env.DAYS_TO_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.DAYS_TO_STALE }} days' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-activity' + exempt-issue-labels: 'pending,in-progress' + stale-pr-label: 'no-activity' + exempt-pr-labels: 'pending,in-progress' + days-before-stale: ${{ env.DAYS_TO_STALE }} + days-before-close: ${{ env.DAYS_TO_CLOSE }}