Skip to content

Commit 4313a11

Browse files
authored
Rollback (#1203)
* Rollback workflow_call 😞 * Pin changed-files
1 parent 65eabcd commit 4313a11

File tree

4 files changed

+17
-24
lines changed

4 files changed

+17
-24
lines changed

.github/workflows/comment.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
name: Comment
22

33
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
512

613
jobs:
714
comment:
815
runs-on: ubuntu-latest
16+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
917
steps:
1018
- name: Download Artifact
1119
uses: actions/download-artifact@v4
1220
with:
1321
name: artifact
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
run-id: ${{ github.event.workflow_run.id }}
1424
- name: Comment on PR
1525
uses: actions/github-script@v7
1626
with:
17-
github-token: ${{ secrets.WSTG_BOT_COMMENT }}
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
1828
script: |
1929
let fs = require('fs');
2030
const issue_number = Number(fs.readFileSync('./pr_number'));

.github/workflows/md-link-check.yml

-7
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,3 @@ jobs:
7575
path: |
7676
artifact.txt
7777
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

.github/workflows/md-lint-check.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- '**.md'
99
- '!.github/**'
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
lint:
1316
runs-on: ubuntu-latest
@@ -48,10 +51,4 @@ jobs:
4851
path: |
4952
artifact.txt
5053
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+

.github/workflows/md-textlint-check.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
- name: Run textlint Check
4949
env:
5050
FILES: '${{ steps.files.outputs.files_updated }} ${{ steps.files.outputs.files_created }}'
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5251
run: |
5352
touch log.txt
5453
# All markdown files, excluding .github
@@ -74,10 +73,4 @@ jobs:
7473
path: |
7574
artifact.txt
7675
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+

0 commit comments

Comments
 (0)