git - How to create a GitLab hook to reject code pushed by 'root' user? -
I work with a disciplined team and one of the developers likes to push code as 'root' user . We need to add a gitlab hook which rejects the incoming 'root' user
I have read and neither feels like the right direction.
Can any of you gitlab master help me?
You need to create a server side or you can call it a ruby Create a version, to browse using your API pre-fetch hook Will investigate. You can do this with a script like: s <$ p>
refname = "$ 1" oldrev = "$ 2" newrev = "$ 3" $ $ (git rev-list $ { oldrev} .. $ {newrev}) git log $ {sha} --format = "% ae% ce" -1 Grep 'root @' if [$? -Ece 0] then echo "Root $ {sha}" to a root email address. Please use your user credentials! "Git log $ {sha} - format ="% ae% ce "-1 exit 1fi:
Comments
Post a Comment