You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/08/16 02:46:41 UTC
[arrow] branch master updated: ARROW-6262: [Developer] Show JIRA
issue before merging
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 884ed65 ARROW-6262: [Developer] Show JIRA issue before merging
884ed65 is described below
commit 884ed654e26114798fca486e3742caa97a544b7b
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Thu Aug 15 21:46:31 2019 -0500
ARROW-6262: [Developer] Show JIRA issue before merging
It's useful to confirm whehter the associated JIRA issue is right or
not.
We couldn't find wrong associated JIRA issue after we merge
the pull request https://github.com/apache/arrow/pull/5050 .
Closes #5097 from kou/dev-merge-show-jira-issue-before-merge and squashes the following commits:
6c9ad5be9 <Sutou Kouhei> Show JIRA issue before merging
Authored-by: Sutou Kouhei <ko...@clear-code.com>
Signed-off-by: Wes McKinney <we...@apache.org>
---
dev/merge_arrow_pr.py | 47 +++++++++++++++++++++++------------------------
1 file changed, 23 insertions(+), 24 deletions(-)
diff --git a/dev/merge_arrow_pr.py b/dev/merge_arrow_pr.py
index dfe9e33..7588fef 100755
--- a/dev/merge_arrow_pr.py
+++ b/dev/merge_arrow_pr.py
@@ -187,12 +187,6 @@ class JiraIssue(object):
self.cmd.fail("JIRA issue %s already has status '%s'"
% (self.jira_id, cur_status))
- console_output = format_resolved_issue_status(self.jira_id, cur_status,
- fields.summary,
- fields.assignee,
- fields.components)
- print(console_output)
-
resolve = [x for x in self.jira_con.transitions(self.jira_id)
if x['name'] == "Resolve Issue"][0]
self.jira_con.transition_issue(self.jira_id, resolve["id"],
@@ -201,27 +195,31 @@ class JiraIssue(object):
print("Successfully resolved %s!" % (self.jira_id))
+ self.issue = self.jira_con.issue(self.jira_id)
+ self.show()
-def format_resolved_issue_status(jira_id, status, summary, assignee,
- components):
- if assignee is None:
- assignee = "NOT ASSIGNED!!!"
- else:
- assignee = assignee.displayName
+ def show(self):
+ fields = self.issue.fields
- if len(components) == 0:
- components = 'NO COMPONENTS!!!'
- else:
- components = ', '.join((x.name for x in components))
+ assignee = fields.assignee
+ if assignee is None:
+ assignee = "NOT ASSIGNED!!!"
+ else:
+ assignee = assignee.displayName
+
+ components = fields.components
+ if len(components) == 0:
+ components = 'NO COMPONENTS!!!'
+ else:
+ components = ', '.join((x.name for x in components))
- return """=== JIRA {} ===
-Summary\t\t{}
-Assignee\t{}
-Components\t{}
-Status\t\t{}
-URL\t\t{}/{}""".format(jira_id, summary, assignee, components, status,
- '/'.join((JIRA_API_BASE, 'browse')),
- jira_id)
+ print("=== JIRA {} ===".format(self.jira_id))
+ print("Summary\t\t{}".format(fields.summary))
+ print("Assignee\t{}".format(assignee))
+ print("Components\t{}".format(components))
+ print("Status\t\t{}".format(fields.status.name))
+ print("URL\t\t{}/{}".format('/'.join((JIRA_API_BASE, 'browse')),
+ self.jira_id))
class GitHubAPI(object):
@@ -293,6 +291,7 @@ class PullRequest(object):
print("\n=== Pull Request #%s ===" % self.number)
print("title\t%s\nsource\t%s\ntarget\t%s\nurl\t%s"
% (self.title, self.description, self.target_ref, self.url))
+ self.jira_issue.show()
@property
def is_merged(self):