From eac6d1bdb9f4b1e04b663dbc8b211f1ffd9217cf Mon Sep 17 00:00:00 2001 From: EricZhou Date: Wed, 24 Jun 2020 16:20:12 +0800 Subject: [PATCH] issue --- .github/labeler.yml | 6 ++++++ .github/workflows/issue.yml | 15 +++++++++++++++ .github/workflows/issue_stale.yml | 19 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/issue.yml create mode 100644 .github/workflows/issue_stale.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..d96bafa0 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,6 @@ +# Add/remove 'critical' label if issue contains the words 'urgent' or 'critical' +HasGormPlaygroundTestCase: + - '(github.com/go-gorm/playground/pull/\d)' + +NoTestCase: + - '(change this to your link)' diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml new file mode 100644 index 00000000..0759782c --- /dev/null +++ b/.github/workflows/issue.yml @@ -0,0 +1,15 @@ +name: "Issue-Labeler" +on: + issues: + types: [opened, edited] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v2.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: ".github/labeler.yml" + not-before: "2020-01-15T02:54:32Z" + enable-versioned-regex: 0 \ No newline at end of file diff --git a/.github/workflows/issue_stale.yml b/.github/workflows/issue_stale.yml new file mode 100644 index 00000000..fadfb522 --- /dev/null +++ b/.github/workflows/issue_stale.yml @@ -0,0 +1,19 @@ +name: Issue cleanup +on: + schedule: + - cron: '0 1 * * *' # At 01:00, everyday +jobs: + triage_issues: + name: Issue triage + runs-on: ubuntu-latest + steps: + - name: Find old issues and mark them stale + uses: Krizzu/issue-triage-action@v1.0.0 + with: + ghToken: ${{ secrets.GITHUB_TOKEN }} + staleAfter: 7 + closeAfter: 14 + staleLabel: "STALE 📺" + staleComment: "This issue is %DAYS_OLD% days old, marking as stale! cc: @%AUTHOR%" + closeComment: "Issue last updated %DAYS_OLD% days ago! Closing down!" + showLogs: true \ No newline at end of file