-
Notifications
You must be signed in to change notification settings - Fork 2.7k
37 lines (33 loc) · 1.47 KB
/
issue-checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Issue Checker
on:
issues:
types: [opened, edited]
jobs:
check-permission:
runs-on: ubuntu-latest
outputs:
require-result: ${{ steps.checkUser.outputs.require-result }}
steps:
- uses: actions-cool/check-user-permission@v2
id: checkUser
with:
require: 'write'
check-open:
runs-on: ubuntu-latest
needs: check-permission
if: needs.check-permission.outputs.require-result == 'false' && github.event.issue.state == 'open' && contains(github.event.issue.title, '[Feature Request]') == false && contains(github.event.issue.body, 'https://github.com') == false && contains(github.event.issue.body, 'https://stackblitz.com') == false
steps:
- uses: actions-cool/maintain-one-comment@v3
with:
body: 由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供[最小重现](https://stackoverflow.com/help/minimal-reproducible-example)以重新开启。谢谢。
- uses: actions-cool/issues-helper@v3
with:
actions: close-issue
check-close:
runs-on: ubuntu-latest
needs: check-permission
if: needs.check-permission.outputs.require-result == 'false' && github.event.issue.state == 'closed' && (contains(github.event.issue.body, 'https://github.com') == true || contains(github.event.issue.body, 'https://stackblitz.com') == true)
steps:
- uses: actions-cool/issues-helper@v3
with:
actions: open-issue