mozreview: Use r=username instead of r=me when rewriting commit descriptions (bug 1299071) r?smacleod draft
authorbyron jones <glob@mozilla.com>
Wed, 21 Sep 2016 01:25:04 +0800
changeset 9599 87f2d03fd12739059889bc4b33f4cf8af6b97bcc
parent 9590 a9c757ddf57a23b479d8919445e64d804633321e
child 9600 cafa6584f1982129226c7b1ed6eb8eab487436c6
push id1236
push userbjones@mozilla.com
push dateWed, 21 Sep 2016 05:49:36 +0000
reviewersusername, me, smacleod
bugs1299071
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
pylib/mozreview/mozreview/resources/commit_rewrite.py
--- 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,