diff --git a/.github/workflows/issue-check-inactive.yml b/.github/workflows/issue-check-inactive.yml new file mode 100644 index 0000000000..6ca5f9f3e8 --- /dev/null +++ b/.github/workflows/issue-check-inactive.yml @@ -0,0 +1,16 @@ +name: Issue Check Inactive + +on: + schedule: + - cron: "0 0 */15 * *" + +jobs: + issue-check-inactive: + runs-on: ubuntu-latest + steps: + - name: check-inactive + uses: actions-cool/issues-helper@v2 + with: + actions: 'check-inactive' + inactive-label: 'Inactive' + inactive-day: 30 diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml new file mode 100644 index 0000000000..f9e692d2f3 --- /dev/null +++ b/.github/workflows/issue-close-require.yml @@ -0,0 +1,27 @@ +name: Issue Close Require + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + issue-close-require: + runs-on: ubuntu-latest + steps: + - name: need reproduce + uses: actions-cool/issues-helper@v2 + with: + actions: 'close-issues' + labels: '状态:待反馈' + inactive-day: 7 + body: | + 由于该 issue 被标记为 状态:待反馈,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 + - name: needs more info + uses: actions-cool/issues-helper@v2 + with: + actions: 'close-issues' + labels: 'needs-more-info' + inactive-day: 7 + body: | + Since the issue was labeled with `needs-more-info`, but no response in 7 days. This issue will be closed. If you have any questions, you can comment and reply. + diff --git a/.github/workflows/issue-comment.yml b/.github/workflows/issue-comment.yml new file mode 100644 index 0000000000..414cb42845 --- /dev/null +++ b/.github/workflows/issue-comment.yml @@ -0,0 +1,38 @@ +on: + issue_comment: + types: [created] + +name: Add issues workflow labels + +jobs: + add-label-if-is-author: + runs-on: ubuntu-latest + if: ${{ github.event.comment.pull_request.user.id == github.event.comment.user.id }} && ${{ !github.event.comment.pull_request.pull_request }} + steps: + - name: Add require handle label + uses: actions-cool/issues-helper@v2 + with: + actions: 'add-labels' + labels: '状态:待处理' + + - name: Remove require reply label + uses: actions-cool/issues-helper@v2 + with: + actions: 'remove-labels' + labels: '状态:待反馈' + + add-label-if-not-author: + runs-on: ubuntu-latest + if: ${{ github.event.comment.pull_request.user.id != github.event.comment.user.id }} && ${{ !github.event.comment.pull_request.pull_request }} + steps: + - name: Add require replay label + uses: actions-cool/issues-helper@v2 + with: + actions: 'add-labels' + labels: '状态:待反馈' + + - name: Remove require handle label + uses: actions-cool/issues-helper@v2 + with: + actions: 'remove-labels' + labels: '状态:待处理' diff --git a/.github/workflows/issue-inactive-alert.yml b/.github/workflows/issue-inactive-alert.yml new file mode 100644 index 0000000000..bff516bbcd --- /dev/null +++ b/.github/workflows/issue-inactive-alert.yml @@ -0,0 +1,17 @@ +on: + schedule: + - cron: "0 9 * * 1" + +name: Check inactive issues + +jobs: + check-inactive-issues: + runs-on: ubuntu-latest + steps: + - name: Check inactive issues and send msg + uses: jumpserver/action-issues-alert@master + with: + hook: ${{ secrets.WECHAT_GROUP_WEB_HOOK }} + type: inactive + env: + GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} diff --git a/.github/workflows/issue-open.yml b/.github/workflows/issue-open.yml new file mode 100644 index 0000000000..4d8bd425b7 --- /dev/null +++ b/.github/workflows/issue-open.yml @@ -0,0 +1,16 @@ +name: Issue Open Check + +on: + issues: + types: [opened] + +jobs: + issue-open-add-labels: + runs-on: ubuntu-latest + steps: + - name: Add labels + uses: actions-cool/issues-helper@v2 + if: ${{ !github.event.comment.pull_request.pull_request }} + with: + actions: 'add-labels' + labels: '状态:待处理' diff --git a/.github/workflows/issue-recent-alert.yml b/.github/workflows/issue-recent-alert.yml new file mode 100644 index 0000000000..1c751a820c --- /dev/null +++ b/.github/workflows/issue-recent-alert.yml @@ -0,0 +1,17 @@ +on: + schedule: + - cron: "0 9 * * *" + +name: Check recent handle issues + +jobs: + check-recent-issues-not-handle: + runs-on: ubuntu-latest + steps: + - name: Check recent issues and send msg + uses: jumpserver/action-issues-alert@master + with: + hook: ${{ secrets.WECHAT_GROUP_WEB_HOOK }} + type: recent + env: + GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}