Browse files

Version bump (0.1.6)

  • Loading branch information...
1 parent b893709 commit 71543d8a6d30b105f4d02e69526256d7b7d6568f @winton committed Jan 19, 2012
Showing with 30 additions and 1 deletion.
  1. +1 −1 gitcycle.gemspec
  2. +29 −0 lib/gitcycle.rb
View
2 gitcycle.gemspec
@@ -6,7 +6,7 @@ $:.unshift lib unless $:.include?(lib)
Gem::Specification.new do |s|
s.name = "gitcycle"
- s.version = '0.1.5'
+ s.version = '0.1.6'
s.platform = Gem::Platform::RUBY
s.authors = [ 'Winton Welsh' ]
s.email = [ 'mail@wintoni.us' ]
View
29 lib/gitcycle.rb
@@ -61,6 +61,14 @@ def create_branch(url_or_title)
branch['home'] = @git_login
branch['source'] = branches(:current => true)
+ unless yes?("Would you like to eventually merge this feature into #{branch['source']}?")
+ branch['source'] = q("What branch would you like to eventually merge this feature into?")
+ end
+
+ unless branches(:match => branch['source'])
+
+ end
+
unless yes?("Would you like to name your branch '#{name}'?")
name = q("\nWhat would you like to name your branch?")
name = name.gsub(/[\s\W]/, '-')
@@ -332,6 +340,27 @@ def branches(options={})
end
end
+ def checkout_remote_branch(options={})
+ owner = options[:owner]
+ repo = options[:repo]
+ branch = options[:branch]
+
+ $remotes ||= {}
+
+ unless $remotes[owner]
+ $remotes[owner] = true
+ puts "Adding remote repo '#{owner}/#{repo}'.\n".green
+ run("git remote rm #{owner}") if remotes(:match => owner)
+ run("git remote add #{owner} git@github.com:#{owner}/#{repo}.git")
+ end
+
+ puts "\nFetching remote branch '#{branch}'.\n".green
+ run("git fetch #{owner}")
+
+ puts "\nMerging remote branch '#{branch}' from '#{owner}/#{repo}'.\n".green
+ run("git merge #{owner}/#{branch}")
+ end
+
def create_pull_request
puts "\nRetrieving branch information from gitcycle.\n".green

0 comments on commit 71543d8

Please sign in to comment.