Skip to content

feat: add a shared checks.yml workflow for commit, format, lint, type and knip checks - #30

Merged
christianhg merged 2 commits into
mainfrom
ci/check-commits-shared
Nov 11, 2026
Merged

christianhg merged 2 commits into
mainfrom
ci/check-commits-shared

Conversation

@christianhg

Copy link
Copy Markdown
Member

Adds checks.yml, a reusable workflow that runs the commit, format, lint, type and knip checks for a calling repository. A caller adds one job named checks that uses it, so the checks report as checks / commits, checks / format, checks / lint, checks / types and checks / knip, and the pull request row reads Checks / checks / commits (pull_request).

The format, lint, types and knip jobs install with pnpm and run the repository's own pnpm check:* script. Format and types read TURBO_TOKEN and TURBO_TEAM when the caller passes them. The commits job runs only on pull requests. It checks out scripts/check-commits/check-commits.sh from the commit of this workflow the caller resolved, so a caller pinned to a commit runs that commit's script.

The script keeps the three commit checks the editor and plugin-sdk-value carried as copies: no unsquashed fixup!/squash!/amend! commits, each added changeset opens with a commit subject, and each fix:/feat: commit ships a changeset. It adds one rule. A commit whose subject is not fix: or feat: fails when it adds a changeset. Editing or renaming an existing changeset passes under any type, as do bot commits, merge commits and reverts. It reads unreleased scopes and new packages from a monorepo layout or from a single package at the repository root.

scripts/check-commits/test/run.sh runs the script against fixture pull requests through a stubbed gh, including a copy of the old workflow logic to show the new rule's cases passed there.

…pe and knip checks

`checks.yml` runs five jobs a caller gets under one `checks` job:
`commits`, `format`, `lint`, `types` and `knip`. The last four install
with pnpm and run the matching `pnpm check:*` script. `commits` runs
`scripts/check-commits/check-commits.sh`, checked out from the commit
of this workflow the caller resolved, against the caller's pull
request.

The script carries the three commit checks callers had as copies:
no unsquashed `fixup!`/`squash!`/`amend!` commits, each added changeset
opens with a commit subject, and each `fix:`/`feat:` commit ships a
changeset. It adds a fourth: a commit whose subject is not `fix:` or
`feat:` fails when it adds a changeset. Editing or renaming an existing
changeset passes under any type, as do bot commits, merge commits and
reverts. Unreleased scopes and new packages are read from a monorepo
layout or from a single package at the repository root.
@christianhg
christianhg marked this pull request as draft November 11, 2026 14:03
@christianhg
christianhg marked this pull request as ready for review November 11, 2026 14:15
@christianhg
christianhg merged commit 0e4b137 into main Nov 11, 2026
3 checks passed
@christianhg
christianhg deleted the ci/check-commits-shared branch November 11, 2026 14:45
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