Skip to content

ci: check only changed markdown links on PRs - #405

Open
mogul wants to merge 1 commit into
mainfrom
optimize/pr-391-pattern
Open

ci: check only changed markdown links on PRs#405
mogul wants to merge 1 commit into
mainfrom
optimize/pr-391-pattern

Conversation

@mogul

@mogul mogul commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Context

The Link Check job in `.github/workflows/markdown-quality.yml` scanned the entire repository on every pull request, even when a PR only touched a handful of files. This made PR runs slower than necessary.

Change

Mirror the optimization from GSA-TTS/agentic-coding-patterns#391:

  • On pull requests: check only Markdown files modified relative to the `main` base branch (`check-modified-files-only: yes`).
  • On push to main: keep the full repository scan (`check-modified-files-only: no`).

This reduces PR link-check runtime while preserving periodic full coverage on merges to main.

Verification

  • `git diff` confirms the two-line addition to the Link Check step (`check-modified-files-only` + `base-branch`).
  • No behavior change to the markdown-lint job.

Rollback

Revert this commit / remove the two added keys from the `tcort/github-action-markdown-link-check` step.

Security Impact

None. CI-only change; does not affect authentication, authorization, data handling, or attack surface.

AI-assisted (OpenCode).

Limit Link Check runs to Markdown files modified relative to main on
pull requests, while keeping full repository scans on pushes to main.
This reduces PR link-check runtime without losing periodic full
coverage.

Co-authored-by: OpenCode <bret.mogilefsky@gsa.gov>
@mogul
mogul requested a review from wz-gsa August 27, 2026 02:25
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.

1 participant