Created
March 8, 2016 22:21
-
-
Save xanderdunn/4d8b7eba33a694fe4e5f to your computer and use it in GitHub Desktop.
GitHub Mirroring WebHook
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
require 'sinatra' | |
require 'json' | |
set :bind, '0.0.0.0' | |
post '/payload' do | |
# push = JSON.parse(request.body.read) | |
# puts "I got some JSON: #{push.inspect}" | |
system 'git fetch --all --prune' | |
system 'git push --mirror ssh://[email protected]:7999/odin/core.git' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment