Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix broken gitlab hooks in your project repositories
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