Permalink
Browse files

gitc reviewed pass|fail

  • Loading branch information...
1 parent e01b340 commit ff86f35a95aa94f5d28e845e44ddc2de284c7d36 @tongueroo tongueroo committed Jan 21, 2012
Showing with 12 additions and 4 deletions.
  1. +12 −4 lib/gitcycle.rb
View
@@ -297,17 +297,25 @@ def ready(*issues)
def reviewed(*issues)
require_git && require_config
+ if issues.include?("fail")
+ issues = issues.reject{|x| x=='fail'}
+ label = 'Fail'
+ else
+ issues = issues.reject{|x| x=='pass'}
+ label = 'Pending QA'
+ end
+
if issues.empty?
- puts "\nLabeling issue as 'Pending QA'.\n".green
+ puts "\nLabeling issue as '#{label}'.\n".green
get('label',
'branch[name]' => branches(:current => true),
- 'labels' => [ 'Pending QA' ]
+ 'labels' => [ label ]
)
else
- puts "\nLabeling issues as 'Pending QA'.\n".green
+ puts "\nLabeling issues as '#{label}'.\n".green
get('label',
'issues' => issues,
- 'labels' => [ 'Pending QA' ],
+ 'labels' => [ label ],
'scope' => 'repo'
)
end

0 comments on commit ff86f35

Please sign in to comment.