Skip to content

feat: skip the stack jobs of docs-only pull requests, when asked - #70

Merged
vannt-dev merged 1 commit into
mainfrom
feat/skip-docs-only-prs
Oct 17, 2026
Merged

vannt-dev merged 1 commit into
mainfrom
feat/skip-docs-only-prs

Conversation

@vannt-dev

Copy link
Copy Markdown
Owner

What

A new, opt-in key:

github:
  ci:
    skip_when_only: ["*.md", "docs/**"]

With it, ci.yml gets a changes job that reads the pull request's files from the API (no checkout, works for forks). When every file matches a glob, the stack jobs are skipped, and GitHub counts a skipped job as passed.

  • commits and the drift check are never gated, so the preset's required check commits / commitlint is always reported.
  • Fails open: on a push, or if the API call fails, code=true and the stack jobs run.
  • A required check on a stack job (for example node / test (22)) is refused while the key is set, because a skipped job that calls a reusable workflow never reports its inner checks.
  • GitHub only. GitLab's rules:changes cannot say "only these changed".
  • Off by default: generated files and lock entries are unchanged for every repository that does not set it.

Checked

  • npm test (485 tests, including new glob, config and CI module tests), npm run typecheck, npm run lint.
  • repokeeper update on a copy of repokeeper-demo-go with the key set: the generated ci.yml passes actionlint 1.7.7.
  • The generated script, run against a stub gh: docs only gives false; a code file, a nested sub/README.md, a failing API call or a push all give true.

`github.ci.skip_when_only` lists globs. A pull request that changes only
matching paths skips the stack jobs; the commit message and drift checks
still run, pushes run everything, and if the files cannot be read the jobs
run. A required check on a skipped stack job is refused. GitHub only.
@vannt-dev
vannt-dev merged commit d4796f4 into main Oct 17, 2026
5 checks passed
@vannt-dev
vannt-dev deleted the feat/skip-docs-only-prs branch October 17, 2026 01:16
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