4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/gitcycle/review.rb', line 4
def review(pass_fail, *issues)
require_git && require_config
if pass_fail == 'fail'
label = 'Fail'
else
label = 'Pending QA'
end
if issues.empty?
puts "\nLabeling issue as '#{label}'.\n".green
get('label',
'branch[name]' => branches(:current => true),
'labels' => [ label ]
)
else
puts "\nLabeling issues as '#{label}'.\n".green
get('label',
'issues' => issues,
'labels' => [ label ],
'scope' => 'repo'
)
end
end
|