mozreview: Use r=username instead of r=me when rewriting commit descriptions (
bug 1299071) r?smacleod
When the submitter is the same as the reviewer, use "r=username" instead of
"r=me".
MozReview-Commit-ID: JauNknu7jP3
--- a/pylib/mozreview/mozreview/resources/commit_rewrite.py
+++ b/pylib/mozreview/mozreview/resources/commit_rewrite.py
@@ -67,19 +67,18 @@ class CommitRewriteResource(WebAPIResour
r.ship_it and
r.user != child_request.submitter
]
if not reviewers and child_request.approved:
# This review request is approved (the repeated check is
# to ensure this is guaranteed if other parts of the code
# change) but we have an empty list of reviewers. We'll
- # assume the author has just approved this themself and
- # set r=me
- reviewers.append('me')
+ # assume the author has just approved this themself.
+ reviewers.append(child_request.submitter.username)
# Detect if the commit has been changed since the last review.
shipit_carryforward = has_shipit_carryforward(child_request)
result.append({
'commit': child[0],
'id': child[1],
'reviewers': reviewers,