forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(NA): removes auto install of pre-commit hook (elastic#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 <[email protected]>
- Loading branch information
1 parent
b63d0a6
commit 2f754ac
Showing
7 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
source src/dev/ci_setup/setup_env.sh | ||
|
||
# Runs pre-commit hook script for the files touched in the last commit. | ||
# That way we can ensure a set of quick commit checks earlier as we removed | ||
# the pre-commit hook installation by default. | ||
# If files are more than 200 we will skip it and just use | ||
# the further ci steps that already check linting and file casing for the entire repo. | ||
checks-reporter-with-killswitch "Quick commit checks" \ | ||
"$(dirname "${0}")/commit_check_runner.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
run_quick_commit_checks() { | ||
echo "!!!!!!!! ATTENTION !!!!!!!! | ||
That check is intended to provide earlier CI feedback after we remove the automatic install for the local pre-commit hook. | ||
If you want, you can still manually install the pre-commit hook locally by running 'node scripts/register_git_hook locally' | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
" | ||
|
||
node scripts/precommit_hook.js --ref HEAD~1..HEAD --max-files 200 --verbose | ||
} | ||
|
||
run_quick_commit_checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters