ci: run the org pre-commit advisory workflow - #8
Merged
Conversation
pre-commit-hooks carries a .pre-commit-config.yaml but had no CI job running it, so only the hooks that CI happened to duplicate had any backstop. The rest — gitleaks and detect-private-key among them — were enforced only by whoever remembered to run `pre-commit install`; anyone who had not, or who used --no-verify, had nothing checking them. This calls the org's reusable pre-commit-advisory workflow, the same one covenant, dis, dispatch, herald, k4a, k5s, legate, magellan, quorum, replay, trader-tools, trading and understudy already use. It is advisory by design: scoped to the PR diff, posts a sticky comment, and is not in branch protection, so it surfaces a failure without blocking merge. No `private-modules`: no Go module here. Worth noting this repo *hosts* the org's own hooks, so running pre-commit against itself is dogfooding the thing it publishes. pre-commit run --all-files is clean on main (8 hooks all passing), so this starts green.
|
✅ pre-commit (advisory) — no issues on changed files. |
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.
pre-commit-hooks carries a .pre-commit-config.yaml but had no CI job running it, so only the hooks that CI happened to duplicate had any backstop. The rest — gitleaks and detect-private-key among them — were enforced only by whoever remembered to run
pre-commit install; anyone who had not, or who used --no-verify, had nothing checking them.This calls the org's existing reusable workflow,
pinpredict/.github/.github/workflows/pre-commit-advisory.yml, already used by covenant, dis, dispatch, herald, k4a, k5s, legate, magellan, quorum, replay, trader-tools, trading and understudy.It is deliberately advisory, per the reusable's own design: scoped to the PR diff via
--from-ref/--to-ref, posts a sticky PR comment, and is not in branch protection — so it shows a ❌ when a hook fails but never blocks merge. Hardening it later is a branch-protection change in the GitHub UI, not a YAML change.No
private-modules: no Go module here. Worth noting this repo hosts the org's own hooks, so running pre-commit against itself is dogfooding the thing it publishes.pre-commit run --all-filesis clean on main today (8 hooks, all passing), so this starts green rather than landing a repo that immediately reports violations.Part of a sweep wiring this up across every repo that had a
.pre-commit-config.yamlbut no CI job for it.fluxis excluded — it is a local-only checkout with no remote.