Skip to content

Instantly share code, notes, and snippets.

@xanderdunn
Created March 8, 2016 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xanderdunn/4d8b7eba33a694fe4e5f to your computer and use it in GitHub Desktop.
Save xanderdunn/4d8b7eba33a694fe4e5f to your computer and use it in GitHub Desktop.
GitHub Mirroring WebHook
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://git@stash.osaro.net:7999/odin/core.git'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment