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

Built-in "Hooks" support akin to Git Hooks #603

Open
marcoonroad opened this issue Dec 30, 2018 · 2 comments
Open

Built-in "Hooks" support akin to Git Hooks #603

marcoonroad opened this issue Dec 30, 2018 · 2 comments
Labels
type/feature Introduce a new feature

Comments

@marcoonroad
Copy link

marcoonroad commented Dec 30, 2018

Hi, folks! First and foremost, thanks by this amazing library!

I'm here to ask for a desirable feature, and if I'm allowed as well, to implement a PR for that.

Git Hooks are executable scripts called by the Git CLI. There are many tools which generate such scripts, such as Node's Husky package. Git hook scripts are often used for CI/CD & third-party webhook notifications, and they can be triggered on either developer's machine or on the hosted Git repository itself (see https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks).

The major rationale/argument for such kind of feature is to enforce custom invariants on the Irmin's performed operations (such as read, write, merge, pull and push). For instance, it could be used to check for GPG signed commits (as suggested on #555), or even to verify commits carrying proof-of-work nonces. If the commits aren't valid following written invariants described by some OCaml modules here and there, the Irmin storage functor instance would reject/refuse them.

I'm looking forward for further discussion. Thanks in advance. 👋

@marcoonroad
Copy link
Author

(The default hooks, if not provided during functor application, could be no-op hooks.)

@zshipko
Copy link
Contributor

zshipko commented Jan 9, 2019

This sounds like it could be interesting -- as far as I know, this idea has not been banned from Irmin, so you should go ahead and work on a PR if you'd like to 😃

I don't have anything else to add to the discussion at this point, but I'm curious to see what you come up with!

@samoht samoht added the type/feature Introduce a new feature label Apr 8, 2019
@maiste maiste removed the unschedule label Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Introduce a new feature
Projects
None yet
Development

No branches or pull requests

4 participants