Skip to content

Skip running lefthook on master

Brian Williams requested to merge bwill/skip-lefthook-on-master into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Relates to: gitlab-development-kit#1584 (closed)

Use the new global skip option added in Lefthook 1.2.2 (https://github.com/evilmartians/lefthook/issues/354) to skip Lefthook on master. When someone is working on GitLab from a fork and tries to rebase their fork on upstream, currently lefthook runs checks on all of the changes. This takes a long time as there are usually a ton of changes, and it often fails due to the volume of changes. This causes a lot of friction for contributors, and it doesn't add any value since changes on master have already gone through all QA checks (pipelines, code review, etc).

Before

$ git push fork master
Lefthook v1.2.2
RUNNING HOOK: pre-push
gettext: (SKIP BY SETTINGS)
vale: (SKIP. NO FILES FOR INSPECTION)
docs-removals: (SKIP. NO FILES FOR INSPECTION)
docs-metadata: (SKIP. NO FILES FOR INSPECTION)
haml-lint: (SKIP. NO FILES FOR INSPECTION)
yamllint: (SKIP. NO FILES FOR INSPECTION)
rubocop: (SKIP. NO FILES FOR INSPECTION)
docs-deprecations: (SKIP. NO FILES FOR INSPECTION)
stylelint: (SKIP. NO FILES FOR INSPECTION)
eslint: (SKIP. NO FILES FOR INSPECTION)
docs-trailing_spaces: (SKIP. NO FILES FOR INSPECTION)
markdownlint: (SKIP. NO FILES FOR INSPECTION)
jsonlint: (SKIP. NO FILES FOR INSPECTION)
prettier: (SKIP. NO FILES FOR INSPECTION)
graphql_docs: (SKIP. NO FILES FOR INSPECTION)

  EXECUTE > danger
refs/heads/master 66da41db19bae6a0147c43eea1e8d91a7db96f67 refs/heads/master c879ed52672095fe965897280d1fc7ef5ac023d6
Results:

Markdown:



SUMMARY: (done in 17.93 seconds)
✔️  danger
Enumerating objects: 89370, done.
Counting objects: 100% (48582/48582), done.
Delta compression using up to 10 threads
Compressing objects: 100% (18318/18318), done.
Writing objects: 100% (38500/38500), 12.46 MiB | 19.54 MiB/s, done.
Total 38500 (delta 28964), reused 27760 (delta 19583), pack-reused 0
remote: Resolving deltas: 100% (28964/28964), completed with 4291 local objects.
To gitlab.com:bwill/gitlab.git
   c879ed526720..66da41db19ba  master -> master

After

$ git push fork master                   
Lefthook v1.2.2
RUNNING HOOK: pre-push
pre-push: (SKIP BY HOOK SETTING)

SUMMARY: (SKIP EMPTY)
Enumerating objects: 9, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 10 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 648 bytes | 648.00 KiB/s, done.
Total 5 (delta 3), reused 0 (delta 0), pack-reused 0
To gitlab.com:bwill/gitlab.git
   66da41db19ba..391afbe4ccec  master -> master

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brian Williams

Merge request reports

Loading