Skip to content

Commit 3741533

Browse files
heiskrCopilot
andauthored
Re-enable link checker workflows; gate PR checker on check-links label (#59715)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ba009fb commit 3741533

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

.github/workflows/link-check-external.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
name: Check External Links
2-
3-
# Runs weekly (Wednesday) at 16:20 UTC
4-
# Validates external URLs in content files
1+
name: 'Link Check: External'
52

63
on:
74
schedule:
@@ -56,6 +53,15 @@ jobs:
5653
run: |
5754
if [ -f "artifacts/external-link-report.md" ]; then
5855
echo "has_report=true" >> $GITHUB_OUTPUT
56+
# Prepend disclaimer banner
57+
tmp=$(mktemp)
58+
{
59+
echo "> [!NOTE]"
60+
echo "> **No action needed right now.** The link checker is being actively worked on and may produce false positives. You can safely ignore this report for now. We'll let you know when it's reliable."
61+
echo ""
62+
cat "artifacts/external-link-report.md"
63+
} > "$tmp"
64+
mv "$tmp" "artifacts/external-link-report.md"
5965
else
6066
echo "has_report=false" >> $GITHUB_OUTPUT
6167
echo "No broken link report generated - all links valid!"

.github/workflows/check-broken-links-github-github.yml renamed to .github/workflows/link-check-github-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Broken Docs Links in github/github
1+
name: 'Link Check: github/github'
22

33
# **What it does**: This checks for any broken docs.github.com links in github/github
44
# **Why we have it**: Make sure all docs in github/github are up to date

.github/workflows/link-check-internal.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
name: Check Internal Links
2-
3-
# Runs weekly (Tuesday) at 16:20 UTC
4-
# On schedule: checks English free-pro-team and latest enterprise-server
5-
# On workflow_dispatch: run any version/language combo
1+
name: 'Link Check: Internal'
62

73
on:
84
schedule:
@@ -129,6 +125,9 @@ jobs:
129125
# Combine all markdown reports
130126
echo "# Internal Links Report" > combined-report.md
131127
echo "" >> combined-report.md
128+
echo "> [!NOTE]" >> combined-report.md
129+
echo "> **No action needed right now.** The link checker is being actively worked on and may produce false positives. You can safely ignore this report for now. We'll let you know when it's reliable." >> combined-report.md
130+
echo "" >> combined-report.md
132131
echo "Generated: $(date -u +'%Y-%m-%d %H:%M UTC')" >> combined-report.md
133132
echo "[Action run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> combined-report.md
134133
echo "" >> combined-report.md

.github/workflows/link-check-on-pr.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
name: 'Link Checker: On PR'
1+
name: 'Link Check: On PR'
22

33
# **What it does**: Checks internal links in changed content files.
44
# **Why we have it**: To catch broken links before they're merged.
55
# **Who does it impact**: Docs content.
66

77
on:
88
workflow_dispatch:
9-
merge_group:
9+
# merge_group:
1010
pull_request:
11+
types: [labeled, opened, synchronize, reopened]
1112

1213
permissions:
1314
contents: read
@@ -23,7 +24,9 @@ jobs:
2324
check-links:
2425
name: Check links
2526
runs-on: ubuntu-latest
26-
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
27+
if: |
28+
(github.repository == 'github/docs-internal' || github.repository == 'github/docs') &&
29+
(github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'check-links'))
2730
steps:
2831
- name: Checkout
2932
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

src/links/lib/link-report.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ ${errors
131131

132132
return `## 🔗 Link Check Results
133133
134+
> [!NOTE]
135+
> **This check is being actively worked on** and may produce false positives. If something looks wrong, you can safely ignore it for now.
136+
134137
${errorSection}${warningSection}${detailsLink}
135138
<!-- link-checker-pr-comment -->`
136139
},

0 commit comments

Comments
 (0)