Skip to content

Add automated broken link checker workflow - #23

Closed
tuanductran with Copilot wants to merge 7 commits into
mainfrom
copilot/configure-broken-link-checker
Closed

Add automated broken link checker workflow#23
tuanductran with Copilot wants to merge 7 commits into
mainfrom
copilot/configure-broken-link-checker

Conversation

Copilot AI commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Configures automated link validation for markdown files using scheduled workflow and PR checks.

Implementation

  • Action: Uses lycheeverse/lychee-action@v2.7.0 (SHA-pinned). The originally requested technote-space/broken-link-checker-action was archived in Nov 2022.
  • Issue creation: Uses peter-evans/create-issue-from-file@v6.0.0 (SHA-pinned)
  • Triggers: Monthly cron (0 0 1 * *), manual dispatch, PRs to main/develop
  • Scope: All markdown files ('./**/*.md')
  • Reliability: 3 retries, 30s timeout for flaky external links
  • Issue creation: On schedule/manual runs only (suppressed for PRs via github.event_name != 'pull_request')

Configuration

permissions:
  contents: read
  issues: write

- uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0  # v2.7.0
  with:
    args: >-
      --verbose --no-progress
      --max-retries 3 --timeout 30
      './**/*.md'
    output: ./lychee/out.md
    fail: true

- uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710  # v6.0.0

Issues are automatically created with labels bug and documentation when broken links are detected.

Original prompt

Configuration Github Action: https://github.com/marketplace/actions/broken-link-checker-action


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 29, 2026 09:14
Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com>
Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com>
@tuanductran
tuanductran marked this pull request as ready for review January 29, 2026 09:17
Copilot AI review requested due to automatic review settings January 29, 2026 09:17
Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to automatically check for broken links and open labeled issues when failures are found.

Changes:

  • Introduces a new Broken Link Check workflow with a monthly cron schedule.
  • Enables manual triggering via workflow_dispatch.
  • Configures technote-space/broken-link-checker-action with recursive crawling and issue metadata (labels/title).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +19 to +20
jobs:
check:

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For supply-chain hardening, consider pinning the third-party action to a commit SHA instead of a floating major tag (@v2). Using only a major tag allows upstream changes to affect your workflow without review.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +22
name: Check Broken Links
runs-on: ubuntu-latest

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description/checklist says the target should be the repository’s GitHub Pages, but the workflow currently targets the GitHub repo web UI (https://github.com/${{ github.repository }}). Update TARGET to the published Pages URL (typically https://${{ github.repository_owner }}.github.io//) so the check runs against the intended site.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +16
schedule:
# Run monthly on the 1st at midnight UTC
- cron: '0 0 1 * *'
workflow_dispatch: # Allow manual triggering
pull_request:

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow configures issue creation via the action (LABELS/TITLE), but the job doesn’t declare token permissions. To make issue creation reliably work across repo/org settings, add an explicit permissions: block (at least issues: write, and contents: read if needed) rather than relying on the repository default GITHUB_TOKEN permissions.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10

name: Broken Link Check

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repository_dispatch isn’t mentioned in the PR description/checklist (only schedule + manual trigger). If it’s not required, consider removing it to reduce the number of ways this workflow can be triggered; otherwise, document the intended external trigger use-case.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +4
---
# Note: The original broken-link-checker-action
# (technote-space/broken-link-checker-action) was archived in Nov 2022
# and is no longer maintained. This workflow uses lychee-action,

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow starts with a YAML document marker (---) and quotes the on key ("on"). Other workflows in this repo use on: unquoted and omit --- (e.g., .github/workflows/validate-rules.yml:1-4). Consider aligning formatting for consistency.

Copilot uses AI. Check for mistakes.
…nfig

Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure GitHub Action for broken link checker Add automated broken link checker workflow Jan 29, 2026
Copilot AI requested a review from tuanductran January 29, 2026 09:23
@tuanductran

Copy link
Copy Markdown
Owner

@copilot use lycheeverse/lychee-action@v2.7.0 and peter-evans/create-issue-from-file@v6.0.0

Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com>

Copilot AI commented Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot use lycheeverse/lychee-action@v2.7.0 and peter-evans/create-issue-from-file@v6.0.0

Updated to lychee-action v2.7.0 and create-issue-from-file v6.0.0 (both SHA-pinned) in commit 5f73c36.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/lycheeverse/lychee-action/git/refs/tags/v2.7.0
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: tuanductran <69758022+tuanductran@users.noreply.github.com>
@tuanductran
tuanductran deleted the copilot/configure-broken-link-checker branch January 29, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants