File tree 4 files changed +17
-24
lines changed
4 files changed +17
-24
lines changed Original file line number Diff line number Diff line change 1
1
name : Comment
2
2
3
3
on :
4
- workflow_call :
4
+ workflow_run :
5
+ workflows : ['Markdown Link Check', 'Markdown Lint Check', 'Markdown Terminology Lint Check']
6
+ types :
7
+ - completed
8
+
9
+ permissions :
10
+ contents : read
11
+ pull-requests : write
5
12
6
13
jobs :
7
14
comment :
8
15
runs-on : ubuntu-latest
16
+ if : ${{ github.event.workflow_run.conclusion == 'failure' }}
9
17
steps :
10
18
- name : Download Artifact
11
19
uses : actions/download-artifact@v4
12
20
with :
13
21
name : artifact
22
+ github-token : ${{ secrets.GITHUB_TOKEN }}
23
+ run-id : ${{ github.event.workflow_run.id }}
14
24
- name : Comment on PR
15
25
uses : actions/github-script@v7
16
26
with :
17
- github-token : ${{ secrets.WSTG_BOT_COMMENT }}
27
+ github-token : ${{ secrets.GITHUB_TOKEN }}
18
28
script : |
19
29
let fs = require('fs');
20
30
const issue_number = Number(fs.readFileSync('./pr_number'));
Original file line number Diff line number Diff line change 75
75
path : |
76
76
artifact.txt
77
77
pr_number
78
- comment :
79
- needs : link-check
80
- if : failure()
81
- uses : OWASP/wstg/.github/workflows/comment.yml@master
82
- permissions :
83
- pull-requests : write
84
- contents : read
Original file line number Diff line number Diff line change 8
8
- ' **.md'
9
9
- ' !.github/**'
10
10
11
+ permissions :
12
+ contents : read
13
+
11
14
jobs :
12
15
lint :
13
16
runs-on : ubuntu-latest
48
51
path : |
49
52
artifact.txt
50
53
pr_number
51
- comment :
52
- needs : lint
53
- if : failure()
54
- uses : OWASP/wstg/.github/workflows/comment.yml@master
55
- permissions :
56
- pull-requests : write
57
- contents : read
54
+
Original file line number Diff line number Diff line change 48
48
- name : Run textlint Check
49
49
env :
50
50
FILES : ' ${{ steps.files.outputs.files_updated }} ${{ steps.files.outputs.files_created }}'
51
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52
51
run : |
53
52
touch log.txt
54
53
# All markdown files, excluding .github
74
73
path : |
75
74
artifact.txt
76
75
pr_number
77
- comment :
78
- needs : textlint
79
- if : failure()
80
- uses : OWASP/wstg/.github/workflows/comment.yml@master
81
- permissions :
82
- pull-requests : write
83
- contents : read
76
+
You can’t perform that action at this time.
0 commit comments