Skip to content

Add lefthook to gitlab-qa

George Koltsov requested to merge jmd-add-lefthook-to-gitlab-qa into master

What does this MR do and why?

  • Adds lefthook support to gitlab-qa
  • Adds a lefthook rule to run rubocop in pre-push rules

NB - These configurations were taken directly from gitlab-org/gitlab - lefthook.yml

How to set up and validate locally

  1. Install and setup lefthook
      bundle install  
     
      bundle exec lefthook install  
     SYNCING  
     SERVED HOOKS: pre-push  
     
      bundle exec lefthook run pre-push    
     Lefthook v1.2.6  
     RUNNING HOOK: pre-push  
     rubocop: (SKIP. NO FILES FOR INSPECTION)  
                      
     SUMMARY: (SKIP EMPTY) 
  2. Verify git hook exists at .git/hooks/pre-push

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 George Koltsov

Merge request reports

Loading