##// END OF EJS Templates
comments: extend API data with references to commit_id or pull_request_id for audit-logs.
marcink -
r4304:a588c9e6 default
parent child Browse files
Show More
@@ -60,7 +60,10 b' class TestGetPullRequestComments(object)'
60 'comment_text': 'Auto status change to |new_status|\n\n.. |new_status| replace:: *"Under Review"*',
60 'comment_text': 'Auto status change to |new_status|\n\n.. |new_status| replace:: *"Under Review"*',
61 'comment_type': 'note',
61 'comment_type': 'note',
62 'comment_resolved_by': None,
62 'comment_resolved_by': None,
63 'pull_request_version': None}
63 'pull_request_version': None,
64 'comment_commit_id': None,
65 'comment_pull_request_id': pull_request.pull_request_id
66 }
64 ]
67 ]
65 assert_ok(id_, expected, response.body)
68 assert_ok(id_, expected, response.body)
66
69
@@ -379,7 +379,9 b' def get_pull_request_comments('
379 },
379 },
380 "comment_text": "Example text",
380 "comment_text": "Example text",
381 "comment_type": null,
381 "comment_type": null,
382 "pull_request_version": null
382 "pull_request_version": null,
383 "comment_commit_id": None,
384 "comment_pull_request_id": <pull_request_id>
383 }
385 }
384 ],
386 ],
385 error : null
387 error : null
@@ -1655,7 +1655,7 b' def comment_commit('
1655 except StatusChangeOnClosedPullRequestError:
1655 except StatusChangeOnClosedPullRequestError:
1656 log.exception(
1656 log.exception(
1657 "Exception occurred while trying to change repo commit status")
1657 "Exception occurred while trying to change repo commit status")
1658 msg = ('Changing status on a changeset associated with '
1658 msg = ('Changing status on a commit associated with '
1659 'a closed pull request is not allowed')
1659 'a closed pull request is not allowed')
1660 raise JSONRPCError(msg)
1660 raise JSONRPCError(msg)
1661
1661
@@ -3815,7 +3815,9 b' class ChangesetComment(Base, BaseModel):'
3815 'comment_lineno': comment.line_no,
3815 'comment_lineno': comment.line_no,
3816 'comment_author': comment.author,
3816 'comment_author': comment.author,
3817 'comment_created_on': comment.created_on,
3817 'comment_created_on': comment.created_on,
3818 'comment_resolved_by': self.resolved
3818 'comment_resolved_by': self.resolved,
3819 'comment_commit_id': comment.revision,
3820 'comment_pull_request_id': comment.pull_request_id,
3819 }
3821 }
3820 return data
3822 return data
3821
3823
General Comments 0
You need to be logged in to leave comments. Login now