Skip to content

ci: gate pull requests on conventional commits (cocogitto) - #18

Merged
drsamonline merged 1 commit into
mainfrom
ci/conventional-commits
Nov 10, 2026
Merged

drsamonline merged 1 commit into
mainfrom
ci/conventional-commits

Conversation

@drsamonline

Copy link
Copy Markdown
Owner

Adds the fourth of CLDR's reference links — cocogitto — as a CI-only gate.

What it does. cog check runs on pull_request over the commits the PR adds (base.sha..head.sha), against a cog.toml that declares the types this repo actually uses. licence: (12 commits) and sweep: are in the list alongside the standard set; without them the gate would have been red on history it was never meant to judge.

Advisory, not blocking. continue-on-error: true, matching how rustfmt and clippy are already gated here. Promote it once a few PRs have gone through clean.

Scope, stated plainly: it judges new commits only. The 82 commits already on main are not relitigated — 52 of them use a type outside the standard set, and rewriting history to satisfy a linter is not a change I would make to a shipped repo.

Dependency: cocogitto 7.0.0, pinned, downloaded from its GitHub release (musl x86_64, ~2 MB) and installed into the runner. It never touches the shipped binary: no crate, no runtime dependency, nothing added to Cargo.toml.

Evidence is the Conventional commits job on this PR itself — the first PR it has ever run on. Nothing else in the workflow changed.

Conventional commits are written by hand across this fleet and drift silently.
`cog check` now runs on pull requests over the range the PR adds, against the
types this repo actually uses — `licence` and `sweep` are declared alongside
the standard set, because 52 of the 82 commits written before this gate used a
type outside it and a gate that relitigated them would be red on arrival.

Advisory (`continue-on-error`) until a few PRs pass through it clean, matching
how rustfmt and clippy are already gated here.

Copy link
Copy Markdown
Owner Author

Negative test, run locally with the same pinned binary and this repo's cog.toml — a gate that only ever passes proves nothing:

$ cog check $BASE..HEAD
Found 1 non compliant commits in 73ad6bf..HEAD:

Errored commit: ce25c76 <t>
	Commit message: 'Fix the thing'
	Error: Missing commit type separator `:`
exit=1

In the same range, feat(units): a conforming subject and licence: PolyForm Noncommercial 1.0.0 (docs/index.html) both pass — which is the point of declaring licence in cog.toml rather than leaving the standard set to reject the repo's own vocabulary.

And on the PR itself, the job in 6s:

cog 7.0.0
cog check "aea2963..7960e89"
No errored commits

@drsamonline
drsamonline merged commit 4a75c0c into main Nov 10, 2026
12 checks passed
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