How can I pipe commit lint / commitizen commands i...
# how-do-i
b
How can I pipe commit lint / commitizen commands into graphite?
j
Did you end up using Git Hooks for this? We're thinking about ways to do this sort of thing, curious to hear more about what would be best for you here!
b
@Tao Bojlén hooked it up:
Copy code
and then added a .husky/prepare-commit-msg hook with the following:

#!/bin/bash

# We don't want to run commitizen when we are amending an existing commit,
# since it already has a commit message. We also don't want to run it when
# rebasing, since Graphite rebases under the hood often, and if there's an
# interactive step it will just freeze.
IS_AMEND_OR_REBASE=$(ps -ocommand= -p $PPID | grep -e '--amend' -e 'rebase');

if [ -n "$IS_AMEND_OR_REBASE" ]; then
  exit 0;
fi

(exec < /dev/tty && npx cz --hook) || true
but if graphite did a change log github action with some kind of commitizen hook that would be dope