summaryrefslogtreecommitdiff
path: root/tool/redmine-backporter.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 18:31:38 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 18:31:38 +0000
commit0256fa889039295742448ad72634fec4ea638684 (patch)
treec4a4f9474d1ae02918cd08022f96b586914a78ef /tool/redmine-backporter.rb
parentc9a1f7a42beebdd42c88fb427b6ca4ea6d5df89f (diff)
downloadruby-0256fa889039295742448ad72634fec4ea638684.tar.gz
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
Diffstat (limited to 'tool/redmine-backporter.rb')
-rwxr-xr-xtool/redmine-backporter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb
index 4be41b407a..b3ed96d3d2 100755
--- a/tool/redmine-backporter.rb
+++ b/tool/redmine-backporter.rb
@@ -479,7 +479,7 @@ eom
res = http.get(uri.path)
data = JSON(res.body)
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]
when 'REQUIRED', 'UNKNOWN', 'DONTNEED', 'WONTFIX'
val[$~.offset(1)[0]...$~.offset(1)[1]] = 'DONE'
@@ -492,7 +492,7 @@ eom
raise "unknown status '#$1'"
end
else
- val = '#{TARGET_VERSION}: DONE'
+ val = "#{TARGET_VERSION}: DONE"
end
data = { "issue" => { "custom_fields" => [ {"id"=>5, "value" => val} ] } }