From 1e4a8ee19b1c5d43f93b2c0dea5c6bd92a9e4f83 Mon Sep 17 00:00:00 2001 From: Zhenxu Ke Date: Thu, 18 Feb 2021 12:31:22 +0800 Subject: [PATCH] Fix dead links and add checker to detect them (#6394) --- .dlc.json | 18 +++++++++++ .github/actions/skip/action.yml | 2 ++ .github/workflows/dead-link-checker.yaml | 32 +++++++++++++++++++ CODE_OF_CONDUCT.md | 2 +- README.md | 2 +- changes/changes-8.4.0.md | 2 +- .../probe-introduction.md | 2 +- .../guides/Java-Plugin-Development-Guide.md | 2 +- .../en/protocols/Browser-HTTP-API-Protocol.md | 2 +- docs/en/protocols/JVM-Protocol.md | 2 +- .../en/setup/envoy/metrics_service_setting.md | 4 +-- .../setup/service-agent/java-agent/README.md | 2 +- .../java-agent/Supported-list.md | 2 +- 13 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 .dlc.json create mode 100644 .github/workflows/dead-link-checker.yaml diff --git a/.dlc.json b/.dlc.json new file mode 100644 index 000000000..f2b124ebc --- /dev/null +++ b/.dlc.json @@ -0,0 +1,18 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http://localhost" + }, + { + "pattern": "^https://github.com/apache/skywalking/blob/master/changes/changes-x.y.z.md$" + } + ], + "timeout": "10s", + "retryOn429": true, + "retryCount": 10, + "fallbackRetryDelay": "1000s", + "aliveStatusCodes": [ + 200, + 401 + ] +} diff --git a/.github/actions/skip/action.yml b/.github/actions/skip/action.yml index 44536a81c..2e6de66d1 100644 --- a/.github/actions/skip/action.yml +++ b/.github/actions/skip/action.yml @@ -28,6 +28,8 @@ inputs: "*.md" "skywalking-ui" ".asf.yaml" + ".dlc.yaml" + ".licenserc.yaml" runs: using: "composite" steps: diff --git a/.github/workflows/dead-link-checker.yaml b/.github/workflows/dead-link-checker.yaml new file mode 100644 index 000000000..d58181030 --- /dev/null +++ b/.github/workflows/dead-link-checker.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Dead Link Checker + +on: + pull_request: + +jobs: + CheckDeadLinks: + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - run: sudo npm install -g markdown-link-check + - run: | + for file in $(find . -name "*.md"); do + markdown-link-check -c .dlc.json -q "$file" + done diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 220f9b4cc..e45fd4af1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -71,7 +71,7 @@ This statement thanks the following, on which it draws for content and inspirati * [CouchDB Project Code of conduct](http://couchdb.apache.org/conduct.html) * [Fedora Project Code of Conduct](http://fedoraproject.org/code-of-conduct) -* [Speak Up! Code of Conduct](http://speakup.io/coc.html) +* [Speak Up! Code of Conduct](https://code-of-conduct.roche.com/en/speak-up.html) * [Django Code of Conduct](https://www.djangoproject.com/conduct/) * [Debian Code of Conduct](http://www.debian.org/vote/2014/vote_002) * [Twitter Open Source Code of Conduct](https://github.com/twitter/code-of-conduct/blob/master/code-of-conduct.md) diff --git a/README.md b/README.md index 4cfe97c82..c275be426 100644 --- a/README.md +++ b/README.md @@ -101,4 +101,4 @@ SkyWalking enriches the