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

feature: Add remote config support #343

Merged
merged 13 commits into from
Nov 3, 2022
Merged

Conversation

mrexox
Copy link
Member

@mrexox mrexox commented Oct 27, 2022

Closes #155, #323

⚡ Summary

Remotes allow to share lefthook configurations without a need to maintain one lefthook.yml in all repos where you need it to be unique.

For example:

remotes:
  git_url: git@github.com:evilmartians/lefthook # Repo URL (https:// or git@)
  ref: v1.2.0                                   # Optional reference (tag or branch)
  config: examples/ruby-linters.yml             # Optional file path (default is lefthook.yml)

🍅 This PR tasks

  • Support remote option
    • Support custom config name option
    • Support custom ref option for referencing branches or tags
  • Sync or clone repo on lefthook install
  • Merge with remote configuration
  • Support scripts from remote
  • Support extends from remote
  • Add tests
  • Provide some config examples
  • Update docs

oatovar and others added 6 commits November 1, 2022 11:54
Signed-off-by: Oscar Alberto Tovar <oscar.alberto.tovar@gmail.com>
Signed-off-by: Oscar Alberto Tovar <oscar.alberto.tovar@gmail.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
@mrexox mrexox force-pushed the feature/add-lefthook-remotes branch from bd64523 to 95811e7 Compare November 1, 2022 08:56
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
@mrexox mrexox force-pushed the feature/add-lefthook-remotes branch 2 times, most recently from 225389c to 3f1e044 Compare November 2, 2022 08:25
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
@mrexox mrexox force-pushed the feature/add-lefthook-remotes branch from 3f1e044 to cab9772 Compare November 2, 2022 08:26
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
@mrexox mrexox marked this pull request as ready for review November 3, 2022 09:00
@mrexox
Copy link
Member Author

mrexox commented Nov 3, 2022

Hey @oatovar! I am going to merge this PR into master. I have a few tasks to do before releasing v1.2.0, but remotes support will be the main feature I think.

If you have the desire and time, please, test this feature. I'll be glad to see some feedback. I marked this feature as beta, so we can change its behavior slightly in future releases.

@mrexox mrexox changed the title Add lefthook remotes feature: Add remote config support Nov 3, 2022
@mrexox mrexox merged commit ac42122 into master Nov 3, 2022
@mrexox mrexox deleted the feature/add-lefthook-remotes branch November 3, 2022 09:04
@oatovar
Copy link
Contributor

oatovar commented Nov 3, 2022

@mrexox Thank you so much for working on this feature! 🙇 I'll begin testing this out today and create any issues I come across.

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.

Shared hooks
2 participants