mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
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:
parent
874ae4b7ee
commit
f1de90d7ef
2 changed files with 1 additions and 4 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue