Skip to content

feat(workflows): add ci-lint and the shared lefthook rules - #51

Merged
davidmoralesz merged 1 commit into
mainfrom
feat/ci-lint
Oct 9, 2026
Merged

davidmoralesz merged 1 commit into
mainfrom
feat/ci-lint

Conversation

@davidmoralesz

Copy link
Copy Markdown
Contributor

What

First of two. The org is standardizing on lefthook for hooks and mise for tool versions.

  • ci-lint.yml: reusable workflow. Installs the caller's mise-pinned tools (jdx/mise-action, SHA-pinned, --locked when a mise.lock exists) and runs its lefthook hook with --all-files. Replaces ci-pre-commit.yml for repos that move.
  • lefthook/org.yml and .lefthook/pre-push/: the branch-name and PR-size checks as a lefthook remote. The scripts are thin wrappers around the ones in .devtools/ that ci-pr runs, so there is still one implementation.

Nothing calls either yet. The next PR (feat/mise-toolchain) moves this repo onto both, and its self-lint run is the test of ci-lint.

Tested

  • lefthook/org.yml as a remote, from a scratch repository pointed at this branch: both jobs pass; BRANCH_NAME=Bad_Name lefthook run pre-push --job branch-name fails as it should.
  • Both hooks on a real git push of these branches. That found and fixed a bug: the wrappers forwarded git's pre-push arguments, so the remote name was checked as a branch name.
  • actionlint, zizmor, shellcheck, prettier, check-action-pins.sh: clean.
  • Not tested here: ci-lint.yml on a runner. That happens in the next PR.

@davidmoralesz
davidmoralesz added this pull request to stack #53 October 9, 2026 17:59
ci-lint is a reusable workflow that installs a repository's mise-pinned tools and runs
its lefthook hook over every file. lefthook/org.yml gives consumers the branch-name and
PR-size checks as a lefthook remote, from the scripts ci-pr already runs.

Nothing calls either yet; the next change moves this repo onto both.
@davidmoralesz
davidmoralesz merged commit 0001c1e into main Oct 9, 2026
5 checks passed
@davidmoralesz
davidmoralesz deleted the feat/ci-lint branch October 9, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant