Skip to content

Commit

Permalink
chore: Update linters (Retire node 16)
Browse files Browse the repository at this point in the history
Signed-off-by: kingthorin <[email protected]>
  • Loading branch information
kingthorin committed Jun 6, 2024
1 parent 59a29e1 commit c1fa403
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/md-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/md-lint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Install dependencies
run: npm install -g markdownlint-cli
- name: Run linter
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/md-textlint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)$'
Expand All @@ -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()
Expand Down

0 comments on commit c1fa403

Please sign in to comment.