Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow extra hooks in local config #462

Merged

Conversation

fabn
Copy link
Contributor

@fabn fabn commented Mar 31, 2023

Without this patch is not possible to define extra hooks in local config, e.g.

# lefthook.yml
tests:
  commands:
    tests:
      run: go test ./...

and

# lefthook-local.yml
lints:
  scripts:
    "linter.sh":
      runner: bash

Won't work, it wont be possible to run lefthook run lints

⚡ Summary

Iterate against both global and local top level keys when adding custom hooks.

☑️ Checklist

  • Check locally
  • Add tests

@fabn fabn force-pushed the fix/allow-extra-hooks-in-local-config branch from 44cf715 to cf4abe0 Compare April 3, 2023 08:22
@mrexox mrexox changed the title Allow extra hooks in local config feat: allow extra hooks in local config Apr 4, 2023
@mrexox mrexox merged commit 4d679f7 into evilmartians:master Apr 4, 2023
@mrexox
Copy link
Member

mrexox commented Apr 4, 2023

Thank you for bringing this feature! I will release a new version this week.

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