Skip to content
Browse files

README, make sure checkout doesn't create branch on accident

  • Loading branch information...
1 parent b3fb5f9 commit 6efa304bca4b2b7b6e333b74ff416507bae0a3a3 @winton committed Mar 1, 2012
Showing with 8 additions and 3 deletions.
  1. +2 −1 README.md
  2. +6 −2 lib/gitcycle.rb
View
3 README.md
@@ -174,4 +174,5 @@ $ gitc st - shortcut
* [issue number] it marks it pending-qa and failed.. not correct. I'll take a look at this over the weekend -Tung
* gitc qa clean # to clean up old branches
* gitc qa pass # if ticket resolved, it should stay resolved
-* gitc ready # if pull requests already created, it should prompt and explain that a new branch and issue is being created, consider effect of multiple developers
+* gitc ready # if pull requests already created, it should prompt and explain that a new branch and issue is being created, consider effect of multiple developers
+* If feature branch changed between QA branch creation and QA merge, alert QA engineer
View
8 lib/gitcycle.rb
@@ -123,8 +123,12 @@ def checkout(*args)
if args.length == 1 && args[0] =~ /^https?:\/\//
puts "\nRetrieving branch information from gitcycle.\n".green
- branch = get('branch', 'branch[lighthouse_url]' => args[0])
- checkout_or_track(:name => branch['name'], :remote => 'origin')
+ branch = get('branch', 'branch[lighthouse_url]' => args[0], 'create' => 0)
+ if branch
+ checkout_or_track(:name => branch['name'], :remote => 'origin')
+ else
+ puts "\nBranch not found!\n".red
+ end
else
remote, branch = args
remote, branch = nil, remote if branch.nil?

0 comments on commit 6efa304

Please sign in to comment.
Something went wrong with that request. Please try again.