From fda4db71bf1da35dbb599f9f109f1dcf40307d2e Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Wed, 10 Aug 2022 20:05:39 +0800 Subject: [PATCH] ci: new issue bot --- .github/workflows/issue_check_inactive.yml | 16 ++++++++++++++++ .github/workflows/issue_check_question.yml | 3 ++- .github/workflows/issue_duplicate.yml | 2 +- .github/workflows/issue_invalid.yml | 2 +- .github/workflows/issue_similarity.yml | 18 ++++++++++++++++++ .github/workflows/issue_translate.yml | 13 +++++++++++++ .github/workflows/issue_wontfix.yml | 2 +- 7 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/issue_check_inactive.yml create mode 100644 .github/workflows/issue_similarity.yml create mode 100644 .github/workflows/issue_translate.yml diff --git a/.github/workflows/issue_check_inactive.yml b/.github/workflows/issue_check_inactive.yml new file mode 100644 index 00000000..f4233ca9 --- /dev/null +++ b/.github/workflows/issue_check_inactive.yml @@ -0,0 +1,16 @@ +name: Check inactive + +on: + schedule: + - cron: "0 0 1 * *" + +jobs: + check-inactive: + runs-on: ubuntu-latest + steps: + - name: check-inactive + uses: actions-cool/issues-helper@v3 + with: + actions: 'check-inactive' + token: ${{ secrets.GITHUB_TOKEN }} + inactive-day: 30 \ No newline at end of file diff --git a/.github/workflows/issue_check_question.yml b/.github/workflows/issue_check_question.yml index 3c281fe9..5b2ddbb2 100644 --- a/.github/workflows/issue_check_question.yml +++ b/.github/workflows/issue_check_question.yml @@ -9,12 +9,13 @@ jobs: runs-on: ubuntu-latest steps: - name: close-issues - uses: actions-cool/issues-helper@v2 + uses: actions-cool/issues-helper@v3 with: actions: 'close-issues' token: ${{ secrets.GITHUB_TOKEN }} labels: 'question' inactive-day: 7 + close-reason: 'not_planned' body: | Hello @${{ github.event.issue.user.login }}, this issue was closed due to no activities in 7 days. 你好 @${{ github.event.issue.user.login }},此issue因超过7天未回复被关闭。 \ No newline at end of file diff --git a/.github/workflows/issue_duplicate.yml b/.github/workflows/issue_duplicate.yml index 232c1072..4b547f36 100644 --- a/.github/workflows/issue_duplicate.yml +++ b/.github/workflows/issue_duplicate.yml @@ -19,7 +19,7 @@ jobs: Hello @${{ github.event.issue.user.login }}, your issue is a duplicate and will be closed. 你好 @${{ github.event.issue.user.login }},你的issue是重复的,将被关闭。 - name: Close issue - uses: Xhofe/issues-helper@main + uses: actions-cool/issues-helper@v3 with: actions: 'close-issue' token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/issue_invalid.yml b/.github/workflows/issue_invalid.yml index dee081ff..8e0b9777 100644 --- a/.github/workflows/issue_invalid.yml +++ b/.github/workflows/issue_invalid.yml @@ -19,7 +19,7 @@ jobs: Hello @${{ github.event.issue.user.login }}, your issue is invalid and will be closed. 你好 @${{ github.event.issue.user.login }},你的issue无效,将被关闭。 - name: Close issue - uses: Xhofe/issues-helper@main + uses: actions-cool/issues-helper@v3 with: actions: 'close-issue' token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/issue_similarity.yml b/.github/workflows/issue_similarity.yml new file mode 100644 index 00000000..78e82b9b --- /dev/null +++ b/.github/workflows/issue_similarity.yml @@ -0,0 +1,18 @@ +name: Issues Similarity Analysis + +on: + issues: + types: [opened, edited] + +jobs: + similarity-analysis: + runs-on: ubuntu-latest + steps: + - name: analysis + uses: actions-cool/issues-similarity-analysis@v1 + with: + filter-threshold: 0.5 + comment-title: '### See' + comment-body: '${index}. ${similarity} #${number}' + show-footer: false + show-mentioned: true \ No newline at end of file diff --git a/.github/workflows/issue_translate.yml b/.github/workflows/issue_translate.yml new file mode 100644 index 00000000..f7c5a997 --- /dev/null +++ b/.github/workflows/issue_translate.yml @@ -0,0 +1,13 @@ +name: Translation Helper + +on: + pull_request_target: + types: [opened] + issues: + types: [opened] + +jobs: + translate: + runs-on: ubuntu-latest + steps: + - uses: actions-cool/translation-helper@v1.2.0 \ No newline at end of file diff --git a/.github/workflows/issue_wontfix.yml b/.github/workflows/issue_wontfix.yml index a5fbff6f..cdf3507a 100644 --- a/.github/workflows/issue_wontfix.yml +++ b/.github/workflows/issue_wontfix.yml @@ -19,7 +19,7 @@ jobs: Hello @${{ github.event.issue.user.login }}, this issue will not be worked on and will be closed. 你好 @${{ github.event.issue.user.login }},这不会被处理,将被关闭。 - name: Close issue - uses: Xhofe/issues-helper@main + uses: actions-cool/issues-helper@v3 with: actions: 'close-issue' token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file