Sha256: 44256b8d707e7c499219a51baaff9c6c8233ceae94253f953a5cc0ec44b20d33

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

#!/usr/bin/env ruby

if ARGV.empty?
  puts 'Usage:'
  puts 'git wip [branch-name] [issue-number]'
  exit 2
end

if ARGV[1]
  branch_name = "#{ARGV[0]}/#{ARGV[1]}"
  issue_number = "##{ARGV[1]}"
  issue_title = `hub issue | grep #{ARGV[1]} | xargs`
else
  branch_name = ARGV[0]
  issue_number = ''
  issue_title = "Fix #{branch_name}"
end

<<`SHELL`
  git pull --rebase origin develop
  git checkout -b #{branch_name}
  git commit --allow-empty -m "#{issue_number} [ci skip][init]"
  git push -u origin HEAD
SHELL
`open $(echo "#{issue_title}" | hub pull-request --draft --file -)`

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git-wip-0.4 exe/git-wip