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

A way to specify a task instead of a module in commit-msg #91

Open
elpaisa opened this issue Jun 24, 2016 · 1 comment
Open

A way to specify a task instead of a module in commit-msg #91

elpaisa opened this issue Jun 24, 2016 · 1 comment

Comments

@elpaisa
Copy link

elpaisa commented Jun 24, 2016

I have seen the code but what i find is that only modules can be used in the commit-msg configuration, however i need to parse the commit msg using a specific pattern in my company, so i would like to just create the task in the scripts section of my JSON and that commit-msg just run it, just like the way is done in pre-commit section:

"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "check-commit": "whatever pattern exit 1",

"pre-git": { "commit-msg": "npm run check-commit", "pre-commit": [ "npm run lint" ],

I can do that feature, just let me know if you are able to review and merge quickly.

@bahmutov
Copy link
Owner

sure, but that will be complicated pretty quickly. Why don't you write a module that checks commit message and use it as a script command instead?

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

No branches or pull requests

2 participants