Skip to content

Commit 69df346

Browse files
Create removed-ids.txt & use PR *head* tools
1 parent 1c777fd commit 69df346

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/reusable-check-html-ids.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,22 @@ jobs:
3030
run: make -C Doc/ venv
3131
- name: 'Build HTML documentation'
3232
run: make -C Doc/ SPHINXOPTS="--quiet" html
33+
- name: 'Check out PR head tools'
34+
uses: actions/checkout@v6
35+
with:
36+
persist-credentials: false
37+
sparse-checkout: |
38+
Doc/tools/check-html-ids.py
39+
Doc/tools/removed-ids.txt
40+
sparse-checkout-cone-mode: false
41+
path: /tmp/tools
42+
- name: 'Use PR head tools'
43+
run: |
44+
cp /tmp/tools/Doc/tools/check-html-ids.py Doc/tools/check-html-ids.py
45+
[ -f /tmp/tools/Doc/tools/removed-ids.txt ] && cp /tmp/tools/Doc/tools/removed-ids.txt Doc/tools/removed-ids.txt
3346
- name: 'Collect HTML IDs'
3447
run: python Doc/tools/check-html-ids.py collect Doc/build/html -o /tmp/html-ids-base.json.gz
35-
- name: 'Download PR base HTML IDs'
48+
- name: 'Download PR head HTML IDs'
3649
uses: actions/download-artifact@v8
3750
with:
3851
name: html-ids-head.json.gz
@@ -41,5 +54,4 @@ jobs:
4154
run: >-
4255
python Doc/tools/check-html-ids.py -v check
4356
/tmp/html-ids-base.json.gz /tmp/html-ids-head.json.gz
44-
# XXX: When an exclude file is added, update this to use it:
45-
# --exclude-file Doc/tools/removed-ids.txt
57+
$([ -f Doc/tools/removed-ids.txt ] && echo "--exclude-file Doc/tools/removed-ids.txt")

Doc/tools/removed-ids.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# HTML IDs excluded from the check-html-ids.py check.

0 commit comments

Comments
 (0)