diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml index 3bf157681..f3d2da171 100644 --- a/.github/workflows/issue-close-require.yml +++ b/.github/workflows/issue-close-require.yml @@ -13,15 +13,15 @@ jobs: with: actions: 'close-issues' labels: '状态:待反馈' - inactive-day: 7 + inactive-day: 30 body: | - 由于该 issue 被标记为 状态:待反馈,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 + 由于该 issue 被标记为 状态:待反馈,30 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 - name: needs more info uses: actions-cool/issues-helper@v2 with: actions: 'close-issues' labels: 'needs-more-info' - inactive-day: 7 + inactive-day: 30 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. + Since the issue was labeled with `needs-more-info`, but no response in 30 days. This issue will be closed. If you have any questions, you can comment and reply. diff --git a/.github/workflows/issue-close.yml b/.github/workflows/issue-close.yml new file mode 100644 index 000000000..d9ed4bab4 --- /dev/null +++ b/.github/workflows/issue-close.yml @@ -0,0 +1,16 @@ +name: Issue Close Check + +on: + issues: + types: [closed] + +jobs: + issue-close-remove-labels: + runs-on: ubuntu-latest + steps: + - name: Remove labels + uses: actions-cool/issues-helper@v2 + if: ${{ !github.event.issue.pull_request }} + with: + actions: 'remove-labels' + labels: '状态:待处理,状态:待反馈' \ No newline at end of file diff --git a/.github/workflows/issue-comment.yml b/.github/workflows/issue-comment.yml index 414cb4284..5388111d7 100644 --- a/.github/workflows/issue-comment.yml +++ b/.github/workflows/issue-comment.yml @@ -7,7 +7,7 @@ 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 }} + if: (github.event.issue.user.id == github.event.comment.user.id) && !github.event.issue.pull_request && (github.event.issue.state == 'open') steps: - name: Add require handle label uses: actions-cool/issues-helper@v2 @@ -23,7 +23,7 @@ jobs: 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 }} + if: (github.event.issue.user.id != github.event.comment.user.id) && !github.event.issue.pull_request && (github.event.issue.state == 'open') steps: - name: Add require replay label uses: actions-cool/issues-helper@v2 diff --git a/.github/workflows/issue-open.yml b/.github/workflows/issue-open.yml index f4a6d16ec..232d5da29 100644 --- a/.github/workflows/issue-open.yml +++ b/.github/workflows/issue-open.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Add labels uses: actions-cool/issues-helper@v2 - if: ${{ !github.event.comment.pull_request.pull_request }} + if: ${{ !github.event.issue.pull_request }} with: actions: 'add-labels' labels: '状态:待处理' \ No newline at end of file