Skip to content

chore(hooks): run push checks from one lefthook config - #169

Merged
williamrusdyputra merged 2 commits into
mainfrom
chore/hooks-lefthook
Sep 23, 2026
Merged

williamrusdyputra merged 2 commits into
mainfrom
chore/hooks-lefthook

Conversation

@angelicawill

@angelicawill angelicawill commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR moves pre-push hooks to lefthook and updates DEV-380 so all repos use the same setup.

partially resolves holdex/marketing#1155

Why

The old setup manually figured out which files changed in a push, with the same logic duplicated across multiple files and repos.

lefthook already handles this with {push_files}, including a branch's first push.

What changes

  • lefthook.yml now runs the markdown, authoring, and rules checks.
  • hooks.yml runs the same setup in CI.
  • .githooks/pre-push and rules_audit.yml are removed.
  • markdown_lint.yml still checks commit and PR titles.
  • DEV-380 now requires lefthook instead of .githooks.

Known limit

lefthook skips hooks on delete-only pushes. Since deleting a rule can still break dependencies, CI also runs check-rules.mjs --rules separately.

After merge

Run npm install once to remove the old core.hooksPath setting and install lefthook.

Testing

Tested locally:

  • Bad markdown: blocked
  • Broken rule ID: blocked
  • No markdown changes: passes
  • Delete-only push: caught by the separate rules check

This will be the first run of hooks.yml on GitHub.

@angelicawill angelicawill self-assigned this Sep 23, 2026
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e5be9862-8f30-429c-a0c0-50e5ed97e998


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@holdex

holdex Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Time Submission Status

Member # Time Running Total Status Last Update
angelicawill 15min ✅ Submitted Sep 23, 2026, 10:10 AM
williamrusdyputra 14min ✅ Submitted Sep 23, 2026, 11:44 AM

Submit or update total time with:

@holdex pr submit-time 2h

Add time on top of previous submission with:

@holdex pr add-time 1h30m

See available commands to help comply with our Guidelines.

@angelicawill
angelicawill marked this pull request as ready for review September 23, 2026 10:09
@angelicawill

Copy link
Copy Markdown
Contributor Author

@holdex pr add-time 15m

@angelicawill
angelicawill requested review from zolotokrylin and removed request for zolotokrylin September 23, 2026 10:17
@angelicawill

Copy link
Copy Markdown
Contributor Author

@williamrusdyputra @teodorus-nathaniel @zolotokrylin ready for review

@williamrusdyputra

Copy link
Copy Markdown
Contributor

log: reviewing

@williamrusdyputra

Copy link
Copy Markdown
Contributor

@holdex pr add-time 14m

@williamrusdyputra
williamrusdyputra merged commit 476e1b3 into main Sep 23, 2026
5 checks passed
@williamrusdyputra
williamrusdyputra deleted the chore/hooks-lefthook branch September 23, 2026 11:44
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.

2 participants