From 6e7337818d483af358685914bcddc5e750b5d9a3 Mon Sep 17 00:00:00 2001 From: Miki Date: Thu, 11 Apr 2024 23:18:55 -0700 Subject: [PATCH] Update link-checker and clean up ignore-list Signed-off-by: Miki --- .github/workflows/links_checker.yml | 16 +--- .lycheeexclude | 129 ---------------------------- .lycheeignore | 44 ++++++++++ 3 files changed, 48 insertions(+), 141 deletions(-) delete mode 100644 .lycheeexclude create mode 100644 .lycheeignore diff --git a/.github/workflows/links_checker.yml b/.github/workflows/links_checker.yml index c02921d96f91..ce590fe53b28 100644 --- a/.github/workflows/links_checker.yml +++ b/.github/workflows/links_checker.yml @@ -11,21 +11,13 @@ on: jobs: linkchecker: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Load Excludes - run: | - LYCHEE_EXCLUDE=$(sed -e :a -e 'N;s/\n/ --exclude /;ta' .lycheeexclude) - echo "LYCHEE_EXCLUDE=$LYCHEE_EXCLUDE" >> $GITHUB_ENV + - uses: actions/checkout@v4 - name: Lychee Link Checker - id: lychee - uses: lycheeverse/lychee-action@v1.0.9 + uses: lycheeverse/lychee-action@v1 with: - args: --accept=200,403,429 --exclude ${{ env.LYCHEE_EXCLUDE }} --exclude-mail "**/*.html" "**/*.md" "**/*.txt" "**/*.json" "**/*.js" "**/*.ts" "**/*.tsx" + fail: true + args: --accept=200,403,429 --base . "**/*.html" "**/*.md" "**/*.txt" "**/*.json" "**/*.js" "**/*.ts" "**/*.tsx" env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Fail if there were link errors - run: exit ${{ steps.lychee.outputs.exit_code }} \ No newline at end of file diff --git a/.lycheeexclude b/.lycheeexclude deleted file mode 100644 index e8e86359b462..000000000000 --- a/.lycheeexclude +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright OpenSearch Contributors -# SPDX-License-Identifier: Apache-2.0 - -# Local or predefined end points -http://localhost -https://localhost -http://127.0.0.1/ -https://127.0.0.1/ -http://127.0.0.1:10002/bar -http://127.0.0.1:10002/ -http://opensearch -https://opensearch -https://opensearch-dashboards -http://opensearch-dashboards -https://opensearch.internal.org/ -https://maps.search-services.aws.a2z.com/ -https://tiles.maps.search-services.aws.a2z.com/ -https://telemetry.opensearch.org/ -https://telemetry-staging.opensearch.org/ -https://api.github.com/repos/opensearch-project/OpenSearch-Dashboards/ -https://www.quandl.com/api/v1/datasets/ -file:///* -git://* - -# Dummy urls in tests -http://domain. -http://www.domain. -http://somehost -https://somehost -http://some.host -https://some-host.com/ -https://other.some-host.com/ -http://test:user@somehost/ -https://some.another.host/ -http://noone.nowhere.none/ -http://bar -http://foo -http://test.com/ -https://test.com/ -https://manifest.foobar -https://files.foobar/ -https://tiles.foobar/ -https://1.1.1.1:9200/ -http://192.168.1.1:1234/ -http://9.8.7.6/ -http://1.2.3.4/ -http://8.8.8.8/ -https://path.to/ -https://example.com/ -http://example.com/ -https://example.org/ -http://some-url/ -http://buildurl/ -https://dryrun/ -https://url/ -http://url/ -http://notfound.svg/ -https://validurl/ -https://myopensearch-dashboardsdomain.com -http://myopensearch-dashboardsdomain.com -https://other-opensearch-dashboards.external:8080/ -http://myotherdomain.com:5601/ -http://myopensearch-dashboardsdomain.com:5601/ -https://your-cdn-host.com/ -http://not-your-opensearch-dashboards.com/ -http://www.mysite.com/ -http://myserver.mydomain.com:5601/ -https://myexternaldep.com/ -http://notlocalhost/ -http://site.com/ -http://node-b/ -http://node-a:9200/ -https://node-c/ -https://elsewhere -https://opensearch:changeme@example.com:9200 -http://test:user@somehost/ -https://mycloudinstance:9200/ -https://dev-url.co/ -https://extenal.org/_search -http://plugins.example.com/ -https://build-url/ -http://test.com/ -https://path.to/ -http://site.com/ -http://not-your-opensearch-dashboards.com/ -http://evil.com/ -https://opensearch.org/cool/path -https://opensearch.org/redirect -http://www.opensearch.org/painlessDocs -https://www.hostedgraphite.com/ -https://connectionurl.com -http://169.254.169.254/latest/meta-data/ -http://company.net/* -http://fakenews.co/opensearch-dashboards-test/v6.8.2.json - -# External urls -https://www.zeek.org/ -http://google.com/ -https://api.worldbank.org/ -https://vega.github.io/ -http://twitter.com/ -https://twitter.com/ -https://storage.googleapis.com/ -http://tools.ietf.org/ -https://github.com/ -http://github.com/ -http://jsperf -https://jsperf -https://gist.githubusercontent.com/ -https://codeload.github.com/gist/ -https://nodejs.org/ -https://www.npmjs.com/ -https://microsoft.github.io/ -http://api.worldbank.org/ -https://f1542b814f674090afd914960583265f.apm.us-central1.gcp.cloud.es.io/ -http://www.matthewcopeland.me/ -http://threedubmedia.googlecode.com/* -https://developer.mozilla.org/ -https://a.tile.openstreetmap.org/ -http://www.creedthoughts.gov -https://media-for-the-masses.theacademyofperformingartsandscience.org/ -https://yarnpkg.com/latest.msi -https://forum.opensearch.org/ -https://facebook.github.io/jest/* -http://helpmenow.com/problem2 -https://sass-lang.com/* -http://api.jquery.com/* -http://brandonaaron.net -https://www.circl.lu/doc/misp/ diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 000000000000..e647b070e068 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,44 @@ +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 + +# Local or predefined end points +http://localhost +https://localhost +http://127.0.0.1 +https://127.0.0.1 +http://opensearch +https://opensearch +https://telemetry.opensearch.org/ +https://telemetry-staging.opensearch.org/ +https://api.github.com/repos/opensearch-project/OpenSearch-Dashboards/ +https://www.quandl.com/api/v1/datasets/ +file:///* +git://* + +# Dummy urls in tests + + +# External urls +http://google.com/ +https://api.worldbank.org/ +https://vega.github.io/ +http://twitter.com/ +https://twitter.com/ +https://storage.googleapis.com/ +http://tools.ietf.org/ +https://github.com/ +http://github.com/ +http://jsperf +https://jsperf +https://nodejs.org/ +https://www.npmjs.com/ +https://microsoft.github.io/ +http://api.worldbank.org/ +https://f1542b814f674090afd914960583265f.apm.us-central1.gcp.cloud.es.io/ +http://threedubmedia.googlecode.com/ +https://developer.mozilla.org/ +https://a.tile.openstreetmap.org/ +https://media-for-the-masses.theacademyofperformingartsandscience.org/ +https://forum.opensearch.org/ +http://api.jquery.com/* +http://brandonaaron.net