From 84a41254717edd0e37c0f9b4e56358737013ed85 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 16 Jan 2015 09:48:57 +0000 Subject: [PATCH] * tool/redmine-backporter.rb: support adding related revisions to issues. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ tool/redmine-backporter.rb | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3dc56f74d7..72546e9e97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jan 16 18:42:58 2015 NARUSE, Yui + + * tool/redmine-backporter.rb: support adding related revisions + to issues. + Fri Jan 16 17:20:33 2015 Koichi Sasada vm.c, vm_core.h: constify VM_CF_LEP, VM_CF_PREV_EP, VM_CF_BLOCK_PTR diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index b3e8ea53c9..918584a904 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -298,7 +298,18 @@ eom end more(sio) + when /\Arel +(\d+)\z/ + # this feature requires custom redmine which allows add_related_issue API + rev = $1.to_i + uri = URI("#{REDMINE_BASE}/projects/ruby-trunk/repository/revisions/#{rev}/issues.json") + Net::HTTP.start(uri.host, uri.port, http_options) do |http| + res = http.post(uri.path, "issue_id=#@issue", + 'X-Redmine-API-Key' => REDMINE_API_KEY) + puts res.body + end + when 's' + # this feature implies backport command which wraps tool/merger.rb unless @issue puts "ticket not selected" next