Skip to content

Commit

Permalink
Addressed review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert (Bobby) Evans committed Jul 11, 2014
1 parent e3b9d46 commit 1ce42cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 9 additions & 3 deletions dev-tools/jira-github-join.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,22 @@ def main():

now = datetime.utcnow()
print "Pull requests that need a JIRA:"
print "Pull URL\tPull Title\tPull Age\tPull Update Age"
for pull in pullWithoutJira:
print ("%s\t%s\t%s\t%s"%(pull.html_url(), pull.title(), daydiff(now, pull.created_at()), daydiff(now, pull.updated_at()))).encode("UTF-8")

print "\nPull with bad JIRA:"
print "\nPull with bad or closed JIRA:"
print "Pull URL\tPull Title\tPull Age\tPull Update Age"
for pull in pullWithBadJira:
print ("%s\t%s\t%s\t%s"%(pull.html_url(), pull.title(), daydiff(now, pull.created_at()), daydiff(now, pull.updated_at()))).encode("UTF-8")

print "\nOpen JIRA to Pull Requests and Votes:"
print "\nOpen JIRA to Pull Requests and Possible Votes, vote detection is very approximate:"
print "JIRA\tPull Requests\tJira Summary\tJIRA Age\tPull Age\tJIRA Update Age\tPull Update Age"
print "\tComment Vote\tComment Author\tPull URL\tComment Age"
for key, value in jira2Pulls.items():
print ("%s\t%s\t%s\t%s\t%s"%(key, mstr(value),openJiras[key].getSummary(), daydiff(now, openJiras[key].getCreated()), daydiff(now, value[0].created_at()))).encode("UTF-8")
print ("%s\t%s\t%s\t%s\t%s\t%s\t%s"%(key, mstr(value), openJiras[key].getSummary(),
daydiff(now, openJiras[key].getCreated()), daydiff(now, value[0].created_at()),
daydiff(now, openJiras[key].getUpdated()), daydiff(now, value[0].updated_at()))).encode("UTF-8")
for comment in openJiras[key].getComments():
#print comment.raw()
if comment.hasVote():
Expand Down
3 changes: 3 additions & 0 deletions dev-tools/jira/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def getProject(self):

def getCreated(self):
return jiratime(self.fields['created'])

def getUpdated(self):
return jiratime(self.fields['updated'])

def getComments(self):
if self.comments == None:
Expand Down

0 comments on commit 1ce42cc

Please sign in to comment.