Mark person that actually runs arc commit as committer instead of the author.
Summary: `arc commit` and `arc mark-committed` would only add comments <author> committed this revision, since now everyone can run this commands it makes more sense to show the actual committer instead of the author. Test Plan: Commit (or mark committed) not your revision, Phabricator should add <you> committed this revision comment instead of <author> committed this revision. Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: 1067
This commit is contained in:
@@ -62,7 +62,7 @@ class ConduitAPI_differential_markcommitted_Method extends ConduitAPIMethod {
|
|||||||
|
|
||||||
$editor = new DifferentialCommentEditor(
|
$editor = new DifferentialCommentEditor(
|
||||||
$revision,
|
$revision,
|
||||||
$revision->getAuthorPHID(),
|
$request->getUser()->getPHID(),
|
||||||
DifferentialAction::ACTION_COMMIT);
|
DifferentialAction::ACTION_COMMIT);
|
||||||
$editor->save();
|
$editor->save();
|
||||||
|
|
||||||
|
|||||||
@@ -240,9 +240,6 @@ class DifferentialCommentEditor {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DifferentialAction::ACTION_COMMIT:
|
case DifferentialAction::ACTION_COMMIT:
|
||||||
if (!$actor_is_author) {
|
|
||||||
throw new Exception('You can not commit a revision you do not own.');
|
|
||||||
}
|
|
||||||
$revision
|
$revision
|
||||||
->setStatus(DifferentialRevisionStatus::COMMITTED)
|
->setStatus(DifferentialRevisionStatus::COMMITTED)
|
||||||
->save();
|
->save();
|
||||||
|
|||||||
Reference in New Issue
Block a user