-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update linters (Retire node 16)
Signed-off-by: kingthorin <[email protected]>
- Loading branch information
1 parent
59a29e1
commit c1fa403
Showing
3 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,14 +23,13 @@ jobs: | |
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '16' | ||
node-version: '20' | ||
- name: Install dependencies | ||
run: npm install -g [email protected] | ||
- name: Changed Files Exporter | ||
if: github.event_name == 'pull_request_target' | ||
id: files | ||
# This uses the SHA for 4.0.1 - https://github.com/umani/changed-files/releases/tag/v4.0.1 | ||
uses: umani/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0 | ||
uses: umani/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: PR link check | ||
|
@@ -67,7 +66,7 @@ jobs: | |
path: brokenlinks.txt | ||
- name: Comment Broken Links | ||
if: ${{ failure() && github.event_name == 'pull_request_target' }} | ||
uses: actions/github-script@v6 | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,23 +16,28 @@ jobs: | |
textlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
- name: Checkout PR | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
path: pr | ||
- name: Checkout Base | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: OWASP/wstg | ||
path: base | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '16' | ||
node-version: '20' | ||
- name: Install dependencies | ||
run: | | ||
npm install -g textlint | ||
npm install -g textlint-rule-terminology | ||
- name: Changed Files Exporter | ||
id: files | ||
# This uses the SHA for 4.0.1 - https://github.com/umani/changed-files/releases/tag/v4.0.1 | ||
uses: umani/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0 | ||
uses: umani/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
pattern: '^.*\.(md)$' | ||
|
@@ -43,7 +48,7 @@ jobs: | |
touch log.txt | ||
# All markdown files, excluding .github | ||
# Use fix flag so that it goes through all files | ||
for FILE in $FILES; do echo $FILE | grep -v \.github && textlint --config .github/configs/.textlintrc --fix --rule terminology $FILE | tee -a log.txt; done | ||
for FILE in $FILES; do echo 'pr/'"$FILE" | grep -v \.github && textlint --config base/.github/configs/.textlintrc --fix --rule terminology 'pr/'"$FILE" | tee -a log.txt; done | ||
if grep -q 'Incorrect usage' log.txt ; then exit 1 ; else echo -e \"No terminology issues found.\"; fi | ||
- name: Show Mistakes | ||
if: failure() | ||
|