-
-
Save sunnycmf/c4d29a72ccf078992045 to your computer and use it in GitHub Desktop.
Fix broken gitlab hooks in your project repositories
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
Dir.glob('/home/git/repositories/**/*.git') do |item| | |
hook = "#{item}/hooks" | |
if not File.symlink?(hook) | |
puts "Updating #{hook}" | |
File.rename(hook, "#{hook}.old") | |
File.symlink("/home/git/gitlab-shell/hooks", hook) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment