Repository navigation
new tool: git hooks (pre-push, pre-commit) #160
Description
Activity
- addednew toolNew tool that could be added to node-core-utilsNew tool that could be added to node-core-utilsfeature requestNew features for node-core-utilsNew features for node-core-utils
on Jan 27, 2018 I worked on creating pre-push hook before, we can surely implement it. Alternatively we can also have
pre-committhat runs linter only if the user wants.Questions:
- This hook will be only for node-core-utils project, it will be a tool for collaborators of all Node.js projects, or a tool for any contributor?
- Language of the script? Bash, Node...?
I can work of it if you don't have any inconveniences.
This hook will be only for node-core-utils project, it will be a tool for collaborators of all Node.js projects, or a tool for any contributor?
For node core, I think. It's just a script that people can symlink to, we can ask the users if they want to symlink that during the npm
post-installhook. People can also symlink to other repos if they want.Language of the script? Bash, Node...?
Well I guess it'll need to read the
.ncu/configat some point, which is JSON (also might need to read the global~/.ncurc), so it'll be easier to write that in NodeLanguage of the script? Bash, Node...?
Yep, agreed that it should be in node. But the symlinked script must be in bash, since windows also supports bash in git hooks.
And furthermore in the
.git/hooksfolder you need to make sure that you remove the.samplefile for the hook since sometimes this causes the hook to not run.Lastly, the hook should output info about using
--no-verifyflag to skip this hook.- changed the title
[-]new tool: pre-push git hook[/-][+]new tool: git hooks (pre-push, pre-commit)[/+]on Mar 11, 2018 Should this be its own
ncu-git-hooksor be part of git nodegit node hooks? (This will be used to install/uninstall hooks)What should it run
make -j4 testandmake lintforpre-commitandcore-validate-commitforpre-push?(I plan to work on this, After some issues, labeled bugs are fixed).
- added a commit that references this issue
on Aug 21, 2018 This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
.git/hooks/pre-push