chore(NA): removes auto install of pre-commit hook (#83566)

* chore(NA): remove kibana pre-commit hook installation from bootstrap

* chore(NA): add support for git ref flag on run precommit hook script

* chore(NA): integrate quick commit checks within the CI

* chore(NA): introduce logging trap to warn about quick commit checks failure and how to reproduce it

* chore(NA): update quick commit checks message

* fix(NA): quick commit checks function def

* chore(NA): fix quick commit checks message quotes

* chore(NA): fix functional call

* chore(NA): fix script to run

* chore(NA): add unexpected debugger statement to test quick commit checks

* chore(NA): update message to log before quick commit checks

* chore(NA): remove extra debugger statement

* chore(NA): add echo message inline with script execution

* chore(NA): add unexpected debugger statement to test quick commit checks

* chore(NA): remove extra usage of debug statement

* chore(NA): wrapping quick commit checks in a func

* chore(NA): export function to use later

* chore(NA): export function to use later

* chore(NA): use child bash script on github checks reporter

* chore(NA): define dir context for commit_check_runner.sh

* fix(NA): permissions for commit_check_runner.sh

* fix(NA): permissions for commit.sh

* chore(NA): format message to log

* chore(NA): add unexpected debugger statement to test quick commit checks

* chore(NA): remove extra usage of debug statement

* chore(NA): format runner message

* chore(NA): replace log.info by log.warning

* docs(NA): include docs for removing the pre-commit hook auto installation

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Tiago Costa 2020-12-04 14:43:33 +00:00 committed by GitHub
parent a6bd1aa5de
commit 9c3ca2023e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 64 additions and 8 deletions

View file

@ -110,6 +110,20 @@ View all available options by running `yarn start --help`
Read about more advanced options for <<running-kibana-advanced>>.
[discrete]
=== Install pre-commit hook (optional)
In case you want to run a couple of checks like linting or check the file casing of the files to commit, we provide
a way to install a pre-commit hook. To configure it you just need to run the following:
[source,bash]
----
node scripts/register_git_hook
----
After the script completes the pre-commit hook will be created within the file `.git/hooks/pre-commit`.
If you choose to not install it, don't worry, we still run a quick ci check to provide feedback earliest as we can about the same checks.
[discrete]
=== Code away!