Skip to content

Instantly share code, notes, and snippets.

@ys
Created February 20, 2014 13:03
Show Gist options
  • Save ys/9113051 to your computer and use it in GitHub Desktop.
Save ys/9113051 to your computer and use it in GitHub Desktop.
#! /usr/bin/env ruby
origin_url = `git config --get remote.origin.url`
repo = origin_url.split(':')[1].split('.')[0]
`open https://github.com/#{repo}`
#! /usr/bin/env ruby
origin_url = `git config --get remote.origin.url`
repo = origin_url.split(':')[1].split('.')[0]
`open https://github.com/#{repo}/pull/#{ARGV[0]}`
#! /usr/bin/env ruby
origin_url = `git config --get remote.origin.url`
repo = origin_url.split(':')[1].split('.')[0]
`open https://github.com/#{repo}/pulls`
#! /usr/bin/env ruby
issue= ARGV.shift
current_branch = `git rev-parse --abbrev-ref HEAD`
origin_url = `git config --get remote.origin.url`
repo = origin_url.split(':')[1].split('.')[0]
command = "hub pull-request"
command = command + " -i #{issue}" if issue
command = command + " -b #{repo}:master -h #{repo}:#{current_branch}"
system command
#! /bin/sh
git tag production-$(date "+%Y%m%d%H%M") && git push production master && heroku run rake db:migrate -r production && heroku restart -r production
#! /usr/bin/env ruby
current_branch = `git rev-parse --abbrev-ref HEAD`.strip
`git push staging #{current_branch}:master`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment