diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-24 04:26:18 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-24 04:26:18 +0000 |
commit | a64443987c8e8b8ae6d3558549cc75f4748df973 (patch) | |
tree | 87db6420bd73c7db780a54361f5801b615e52370 /tool/redmine-backporter.rb | |
parent | 5b4ff7d6f9fe12af5a14c09c1509490a4c6a318b (diff) |
* tool/redmine-backporter.rb: require view_changesets permission.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/redmine-backporter.rb')
-rwxr-xr-x | tool/redmine-backporter.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index c09fa186a7..121aa3e718 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -261,6 +261,9 @@ while true uri = URI(uri+".json?include=children,attachments,relations,changesets,journals") res = JSON(uri.read(openuri_options)) i = res["issue"] + unless i["changesets"] + abort "You don't have view_changesets permission" + end id = "##{i["id"]}".color(*PRIORITIES[i["priority"]["name"]]) sio = StringIO.new sio.puts <<eom @@ -276,14 +279,12 @@ eom #end sio.puts i["description"] sio.puts - if i["changesets"] - sio.puts "= changesets" - @changesets = [] - i["changesets"].each do |x| - @changesets << x["revision"] - sio.puts "== #{x["revision"]} #{x["committed_on"]} #{x["user"]["name"] rescue nil}" - sio.puts x["comments"] - end + sio.puts "= changesets" + @changesets = [] + i["changesets"].each do |x| + @changesets << x["revision"] + sio.puts "== #{x["revision"]} #{x["committed_on"]} #{x["user"]["name"] rescue nil}" + sio.puts x["comments"] end if i["journals"] && !i["journals"].empty? sio.puts "= journals" |