Using git-hooks will prevent us from pushing a bad commit.
it will run
npm run lint && npm test before you push the commit,
and we can add there whatever we want.
I used the husky library.
To prevent it, you can add the variable
HUSKY_SKIP_HOOKS=1 git push origin branch_name
Link to the PR - https://github.com/theforeman/foreman/pull/7087