Skip to content

Keep required CI and CodeQL checks green while skipping heavy work for Markdown-only pull requests#1896

Merged
pmcelhaney merged 8 commits intomainfrom
copilot/skip-ci-checks-markdown-files
Apr 16, 2026
Merged

Keep required CI and CodeQL checks green while skipping heavy work for Markdown-only pull requests#1896
pmcelhaney merged 8 commits intomainfrom
copilot/skip-ci-checks-markdown-files

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

Summary

This PR now keeps required checks running (and passing) on every pull request, including docs-only PRs.

Instead of skipping entire workflows at the trigger level, CI and CodeQL now:

  • always run on pull requests, and
  • detect whether the PR changes only Markdown files via the GitHub PR files API (actions/github-script),
  • then skip expensive steps (lint/build/tests/analysis) only for Markdown-only PRs.

This preserves merge-required check behavior while still reducing unnecessary work for docs-only changes.

Original Prompt

Issue title: Skip CI checks when only Markdown files have changed

Issue description:
When the only changes are in Markdown files, most GitHub actions don't need to do anything. Only the ones that specifically deal with Markdown need to execute.

Skip steps like running unit tests when none of the files that would be tested have changed.

Manual acceptance tests

  • A pull request that changes only Markdown files still shows successful CI Checks and CodeQL required checks (not skipped).
  • A pull request that changes only Markdown files does not execute heavy CI steps (lint, unit tests, black-box tests, type tests).
  • A pull request that changes only Markdown files does not execute CodeQL initialization/autobuild/analysis steps.
  • A pull request that changes both Markdown and TypeScript files executes full CI and CodeQL step paths.
  • Existing non-PR triggers (for example, CodeQL scheduled runs) continue to behave unchanged.

Tasks

  • Reviewed workflow behavior against required-check merge constraints.
  • Replaced trigger-level Markdown skipping with in-workflow docs-only detection in .github/workflows/ci.yaml.
  • Replaced trigger-level Markdown skipping with in-workflow docs-only detection in .github/workflows/codeql.yml.
  • Added conditional execution so heavy steps are bypassed only for docs-only PRs.
  • Validated workflow updates and reran automated review/security validation.

Copilot AI changed the title [WIP] Skip CI checks when only Markdown files have changed Skip CI and CodeQL for Markdown-only pull requests Apr 16, 2026
Copilot AI requested a review from pmcelhaney April 16, 2026 12:28
Copy link
Copy Markdown
Collaborator

@pmcelhaney pmcelhaney left a comment

Choose a reason for hiding this comment

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

The CI checks are required for merge. The actions should pass rather than skip.

@pmcelhaney pmcelhaney marked this pull request as ready for review April 16, 2026 12:55
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

The CI checks are required for merge. The actions should pass rather than skip.

Updated so required checks no longer get skipped at the workflow trigger level. CI and CodeQL now always run on PRs, detect docs-only changes, and short-circuit heavy steps while returning successful required checks. Addressed in commit 1079b1d.

Copilot AI changed the title Skip CI and CodeQL for Markdown-only pull requests Keep required CI and CodeQL checks green while skipping heavy work for Markdown-only pull requests Apr 16, 2026
Copilot AI requested a review from pmcelhaney April 16, 2026 13:10
@pmcelhaney pmcelhaney enabled auto-merge April 16, 2026 13:11
@pmcelhaney pmcelhaney added this pull request to the merge queue Apr 16, 2026
Merged via the queue into main with commit b6b4aa2 Apr 16, 2026
8 of 10 checks passed
@pmcelhaney pmcelhaney deleted the copilot/skip-ci-checks-markdown-files branch April 16, 2026 14:02
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.

Skip CI checks when only Markdown files have changed

2 participants