Skip to content

Commit 1285efb

Browse files
authored
Various linkcheck fixes and improvements (#6460)
* Use a GitHub token with less dangerous scope. * Ignore GitHub blob URLs. * Reduce chance of rate limiting by reducing concurrency.
1 parent 75e09f5 commit 1285efb

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/ci-linkchecks.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,13 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: "Generate token"
17-
uses: actions/create-github-app-token@v2
18-
id: generate-token
19-
with:
20-
app-id: ${{ secrets.AUTH_APP_ID }}
21-
private-key: ${{ secrets.AUTH_APP_PRIVATE_KEY }}
22-
2316
- name: Link Checker
2417
id: lychee
2518
uses: lycheeverse/lychee-action@1d97d84f0bc547f7b25f4c2170d87d810dc2fb2c
2619
with:
27-
token: ${{ steps.generate-token.outputs.token }}
20+
token: ${{secrets.GITHUB_TOKEN}}
2821
fail: false
29-
args: "--verbose './docs/**/*.rst' './docs/**/*.inc' './lib/**/*.py'"
22+
args: "--verbose --max-concurrency 1 './docs/**/*.rst' './docs/**/*.inc' './lib/**/*.py'"
3023

3124
- name: Create Issue From File
3225
if: steps.lychee.outputs.exit_code != 0

.lycheeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ https://geoport.whoi.edu:80/thredds/
2626
# catch (at least) github userids, of which many in whatsnews, too many --> "too many requests" failures
2727
https://github.com/[^/]*$
2828

29+
# GitHub seems especially keen to rate-limit "blob" URLs.
30+
# (maybe because these are especially associated with abuse?)
31+
https://github.com/[^/]*/[^/]*/blob/.*
32+
2933
# nonfunctional example, used in docs/src/developers_guide/gitwash/development_workflow.rst
3034
https://github.com/your-user-name/iris
3135

0 commit comments

Comments
 (0)