| Index: dashboard/dashboard/services/issue_tracker_service.py
|
| diff --git a/dashboard/dashboard/services/issue_tracker_service.py b/dashboard/dashboard/services/issue_tracker_service.py
|
| index 887b0da159cb2169b315250ad439ad4137ca3f8e..a4c3f51301c7bf5182ed103f34bf8893423b9ff8 100644
|
| --- a/dashboard/dashboard/services/issue_tracker_service.py
|
| +++ b/dashboard/dashboard/services/issue_tracker_service.py
|
| @@ -170,6 +170,26 @@ class IssueTrackerService(object):
|
| logging.error('Failed to create new bug; response %s', response)
|
| return None
|
|
|
| + def GetIssueComments(self, bug_id):
|
| + """Gets all the comments for the given bug.
|
| +
|
| + Args:
|
| + bug_id: Bug ID of the issue to update.
|
| +
|
| + Returns:
|
| + A list of comments
|
| + """
|
| + if not bug_id or bug_id < 0:
|
| + return None
|
| + response = self._MakeGetCommentsRequest(bug_id)
|
| + if not response:
|
| + return None
|
| + return [{
|
| + 'author': r['author'].get('name'),
|
| + 'content': r['content'],
|
| + 'published': r['published']
|
| + } for r in response.get('items')]
|
| +
|
| def GetLastBugCommentsAndTimestamp(self, bug_id):
|
| """Gets last updated comments and timestamp in the given bug.
|
|
|
|
|