mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Didn't work if backport field is empty
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c9a1f7a42b
commit
0256fa8890
1 changed files with 2 additions and 2 deletions
|
@ -479,7 +479,7 @@ eom
|
||||||
res = http.get(uri.path)
|
res = http.get(uri.path)
|
||||||
data = JSON(res.body)
|
data = JSON(res.body)
|
||||||
h = data["issue"]["custom_fields"].find{|x|x["id"]==5}
|
h = data["issue"]["custom_fields"].find{|x|x["id"]==5}
|
||||||
if h and val = h["value"]
|
if h and val = h["value"] and val != ""
|
||||||
case val[/(?:\A|, )#{Regexp.quote TARGET_VERSION}: ([^,]+)/, 1]
|
case val[/(?:\A|, )#{Regexp.quote TARGET_VERSION}: ([^,]+)/, 1]
|
||||||
when 'REQUIRED', 'UNKNOWN', 'DONTNEED', 'WONTFIX'
|
when 'REQUIRED', 'UNKNOWN', 'DONTNEED', 'WONTFIX'
|
||||||
val[$~.offset(1)[0]...$~.offset(1)[1]] = 'DONE'
|
val[$~.offset(1)[0]...$~.offset(1)[1]] = 'DONE'
|
||||||
|
@ -492,7 +492,7 @@ eom
|
||||||
raise "unknown status '#$1'"
|
raise "unknown status '#$1'"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
val = '#{TARGET_VERSION}: DONE'
|
val = "#{TARGET_VERSION}: DONE"
|
||||||
end
|
end
|
||||||
|
|
||||||
data = { "issue" => { "custom_fields" => [ {"id"=>5, "value" => val} ] } }
|
data = { "issue" => { "custom_fields" => [ {"id"=>5, "value" => val} ] } }
|
||||||
|
|
Loading…
Reference in a new issue