1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +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:
Marek Sapota 2011-11-01 11:44:20 -07:00
parent 874ae4b7ee
commit f1de90d7ef
2 changed files with 1 additions and 4 deletions

View file

@ -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();

View file

@ -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();