-
-
Notifications
You must be signed in to change notification settings - Fork 192
88 lines (78 loc) · 3.01 KB
/
opened_edited_issue.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: issue opened and edited
on:
issues:
types: [ opened,edited ]
jobs:
check-issues:
runs-on: ubuntu-latest
env:
PAYLOAD: ${{toJSON(github.event)}}
if: contains(github.event.issue.title,'[') && contains(github.event.issue.title,']')
steps:
- name: Check out code
uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 0
- name: Install ObserverWard
run: |
curl -L https://github.com/0x727/ObserverWard_0x727/releases/download/default/observer_ward_amd64 --output ~/.config/observer_ward/observer_ward_amd64 --create-dirs -s
chmod +x ~/.config/observer_ward/observer_ward_amd64
- name: Check Issue
id: issue_helper
run: |
python .github/scripts/issue_helper.py > /tmp/verify.log
- name: Read Verify.log
id: verify_log
uses: juliangruber/read-file-action@v1
with:
path: /tmp/verify.log
- name: Create Verify Comment
id: create_comment
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
## 验证过程:
<details><summary>点击展开查看</summary>
<p>
```bash
${{ steps.verify_log.outputs.content }}
```
</p>
</details>
## 验证结果:
- 是否识别成功: ${{ contains(steps.verify_log.outputs.content,'WebFingerPrintMatch') }}
- name: Create Verified Label
if: contains(steps.verify_log.outputs.content,'WebFingerPrintMatch')
uses: actions-cool/issues-helper@v3
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: 'Verified'
- name: Create Not Verified Comment
if: contains(steps.verify_log.outputs.content,'WebFingerPrintMatch') == 'false'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
## 验证失败:
- 请在本地测试识别成功后重新修改当前Issue的Yaml内容。
```bash
➜ ~ ./observer_ward_amd64 --verify 0x727/FingerprintHub/fingerprint/swagger.yaml -t http://httpbin.org
```
- name: Create Pending Review Comment
if: contains(steps.verify_log.outputs.content,'WebFingerPrintMatch') == 'true'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
## 等待管理员审核:
- 指纹识别成功,请等待管理员审核,感谢提交。