ci: skip the gates on a documentation-only change - #303
Merged
Conversation
No job here reads markdown. There is no markdownlint, no remark, no prettier over `.md` and no link check anywhere in this fleet, and Biome does not format markdown. A `.md`-only pull request therefore paid for a full run that never opened the file that changed. A new `changes` job computes the diff, and the gates turn themselves off with `if:`. `paths-ignore:` on the trigger would have been simpler and is wrong. These gates are required status checks. A job skipped by `if:` still posts its context - GitHub records `skipped` and counts it as success, and Forgejo posts `skipped` and keeps the combined state green. A workflow that never STARTED posts nothing at all, so a required check stays pending and the pull request can never merge, with no failure to explain why. Verified end to end on portly-controllers#17, which merged with `CI / check (pull_request)` skipped. Two files that look like documentation are not: `.changeset/*.md` is a release input, and `.mdx` is Storybook source. The match is `.md$`, never `.md*`. The detector fails safe - no usable base commit runs the whole suite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No job in this workflow reads markdown. There is no markdownlint, no remark, no prettier over
.mdand no link check anywhere in this fleet, and Biome does not format markdown. A.md-only pull request therefore paid for a full run that never opened the file that changed, and merging one rebuilt and pushed a byte-identical image.A new
changesjob computes the diff. The gates turn themselves off withif:.Why not
paths-ignore:These gates are required status checks. The difference matters:
if:skipped, counted as successpaths-ignore:)Verified end to end on
portly-controllers#17, which merged withCI / check (pull_request)reportingskippedand the branch protection satisfied.Two files that look like documentation are not
.changeset/*.mdis a release input..mdxis Storybook source and it compiles.So the match is
.md$, never.md*.Fails safe
Anything the job cannot diff — a
workflow_dispatch, a tag, a new branch whosebeforeis all zeros, a base commit the fetch missed — runs the whole suite.Scope
Fleet-wide change, one pull request per repository. This pull request is not documentation-only, so CI must run in full here.