From fd5c7c5b233a57bf146ebd0a6caa71c7b423de0d Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 13 Apr 2022 08:52:21 -0700 Subject: [PATCH] markdown link checker updates (#5804) --- .github/scripts/markdown-link-check-config.json | 14 +++++--------- .github/scripts/markdown-link-check-with-retry.sh | 13 ------------- .github/workflows/reusable-markdown-link-check.yml | 3 ++- 3 files changed, 7 insertions(+), 23 deletions(-) delete mode 100755 .github/scripts/markdown-link-check-with-retry.sh diff --git a/.github/scripts/markdown-link-check-config.json b/.github/scripts/markdown-link-check-config.json index d512916f8c..a458029d5d 100644 --- a/.github/scripts/markdown-link-check-config.json +++ b/.github/scripts/markdown-link-check-config.json @@ -1,11 +1,7 @@ { - "ignorePatterns": [ - { - "pattern": "^https://mvnrepository\\.com/artifact/io\\.opentelemetry$" - }, - { - "pattern": "^http://code\\.google\\.com/p/concurrentlinkedhashmap$" - } - ], - "retryOn429": true + "retryOn429": true, + "aliveStatusCodes": [ + 200, + 403 + ] } diff --git a/.github/scripts/markdown-link-check-with-retry.sh b/.github/scripts/markdown-link-check-with-retry.sh deleted file mode 100755 index 7570eb73a2..0000000000 --- a/.github/scripts/markdown-link-check-with-retry.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -e - -for file in "$@"; do - for i in 1 2 3; do - if markdown-link-check --config "$(dirname "$0")/markdown-link-check-config.json" \ - "$file"; then - break - elif [[ $i == 3 ]]; then - exit 1 - fi - sleep 5 - done -done diff --git a/.github/workflows/reusable-markdown-link-check.yml b/.github/workflows/reusable-markdown-link-check.yml index 2832088d43..52ffdc76cd 100644 --- a/.github/workflows/reusable-markdown-link-check.yml +++ b/.github/workflows/reusable-markdown-link-check.yml @@ -18,4 +18,5 @@ jobs: -name '*.md' \ -not -path './CHANGELOG.md' \ -not -path './licenses/*' \ - | xargs .github/scripts/markdown-link-check-with-retry.sh + | xargs markdown-link-check \ + --config .github/scripts/markdown-link-check-config.json