-
Notifications
You must be signed in to change notification settings - Fork 33
🌱 Remove legacy typo and link checker workflows #730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a659346
07bf3d8
5774f7d
8053f51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,130 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AI-powered link checker for pull requests. Checks only changed markdown files, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| distinguishes real broken links from transient failures, and posts actionable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PR comments instead of failing CI on flaky external URLs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "**/*.md" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: read-all | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| network: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| allowed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - defaults | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - github | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| safe-outputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| add-comment: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| add-labels: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| allowed: [broken-links] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tools: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolsets: [repos, pull_requests] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| web-fetch: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bash: [ ":*" ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeout-minutes: 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Link Checker | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Job Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Your name is ${{ github.workflow }}. You are an **AI-Powered Link Checker** for the repository `${{ github.repository }}`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Mission | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Check markdown links in changed files on pull requests. Distinguish real broken links from transient network issues. Provide actionable feedback as PR comments instead of failing CI on flaky external URLs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Your Workflow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### Step 1: Identify Changed Markdown Files | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get the list of changed markdown files in this PR: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gh pr diff ${{ github.event.pull_request.number }} --name-only | grep '\.md$' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| If no markdown files changed, exit cleanly with a message: "No markdown files changed in this PR." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### Step 2: Extract and Check Links | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| For each changed markdown file: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Extract all links (both `[text](url)` and bare URLs) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. Categorize links: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Internal links**: relative paths to files in the repo (e.g., `./docs/foo.md`, `../README.md`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Anchor links**: `#section-name` references | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **External links**: `https://...` URLs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. Check each link: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Internal links**: verify the target file exists in the repo using `ls` or `test -f` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Anchor links**: verify the heading exists in the target file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **External links**: use `curl -sL -o /dev/null -w '%{http_code}' --max-time 10` to check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - For external URLs that return 4xx: mark as **definitely broken** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - For external URLs that return 5xx or timeout: retry once after 5 seconds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - For external URLs that still fail after retry: mark as **possibly transient** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### Step 3: Classify Results | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Group results into categories: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Broken** (fail): Internal links to non-existent files, 404 external URLs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Possibly transient** (warn): External URLs returning 5xx, timeouts, DNS failures | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **OK**: All links that resolve successfully | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+63
to
+79
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **External links**: `https://...` URLs | |
| 3. Check each link: | |
| - **Internal links**: verify the target file exists in the repo using `ls` or `test -f` | |
| - **Anchor links**: verify the heading exists in the target file | |
| - **External links**: use `curl -sL -o /dev/null -w '%{http_code}' --max-time 10` to check | |
| - For external URLs that return 4xx: mark as **definitely broken** | |
| - For external URLs that return 5xx or timeout: retry once after 5 seconds | |
| - For external URLs that still fail after retry: mark as **possibly transient** | |
| #### Step 3: Classify Results | |
| Group results into categories: | |
| - **Broken** (fail): Internal links to non-existent files, 404 external URLs | |
| - **Possibly transient** (warn): External URLs returning 5xx, timeouts, DNS failures | |
| - **OK**: All links that resolve successfully | |
| - **GitHub-hosted links**: `https://github.com/...`, `https://raw.githubusercontent.com/...`, or `https://*.githubusercontent.com/...` | |
| - **Other external links**: any other `http://` or `https://` URLs that are not GitHub-hosted | |
| 3. Check each link: | |
| - **Internal links**: verify the target file exists in the repo using `ls` or `test -f` | |
| - **Anchor links**: verify the heading exists in the target file | |
| - **GitHub-hosted links**: use `curl -sL -o /dev/null -w '%{http_code}' --max-time 10` to check | |
| - For GitHub-hosted URLs that return 4xx: mark as **definitely broken** | |
| - For GitHub-hosted URLs that return 5xx or timeout: retry once after 5 seconds | |
| - For GitHub-hosted URLs that still fail after retry: mark as **possibly transient** | |
| - **Other external links**: do **not** `curl` these, since the AWF firewall blocks arbitrary external domains. Record them as **not validated (network-restricted)** but do not fail the check based on their status. | |
| #### Step 3: Classify Results | |
| Group results into categories: | |
| - **Broken** (fail): Internal links to non-existent files, 404 GitHub-hosted URLs | |
| - **Possibly transient** (warn): GitHub-hosted URLs returning 5xx, timeouts, DNS failures | |
| - **Not validated (network-restricted)**: External URLs that are not GitHub-hosted and therefore cannot be checked due to the firewall allowlist | |
| - **OK**: All links that resolve successfully within the allowed network scope |
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rules say “post at most ONE comment per PR run (update existing if re-running)”, but the configured safe output is only add-comment (no edit/update capability). As written, reruns will add additional comments rather than updating an existing one; adjust the instructions to match the available capabilities (or enable an edit/update comment safe output if supported).
| 2. Always post at most ONE comment per PR run (update existing if re-running) | |
| 2. Post at most ONE summary comment per workflow run (reruns may create additional comments; do not attempt to edit existing comments) |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow instructs the agent to use
gh pr diff ..., but gh-aw’s compiled prompt says theghCLI is not authenticated for GitHub operations. This is likely to fail; please update the instructions to use the GitHub MCP tool (repos/pull_requests) for changed-file discovery instead of theghCLI.