As mentioned in the gitlab document, I have a simple webhook server running. Is there a way I can parse the request body output and terminate git operation there ? something like if "ref": is "refs/heads/master", just terminate the push ? I know we may be able to acheive this through standard git hooks or custom gitlab hooks. But just wanted to know if this can achieved on a web server as well ?
require 'webrick' server = WEBrick::HTTPServer.new(:Port => ARGV.first) server.mount_proc '/' do |req, res| # puts req.body instance_hash = JSON.parse(req.body) unless req.body.nil? #if [instance_hash].include? 'abc" #can i reject push ? # end end trap 'INT' do server.shutdown end server.start Thanks, Maneesh -- You received this message because you are subscribed to the Google Groups "GitLab" group. To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/5a11f287-eab3-4eca-8c0c-1a52fa20b3be%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.