Index: src/applications/audit/editor/PhabricatorAuditCommentEditor.php =================================================================== --- src/applications/audit/editor/PhabricatorAuditCommentEditor.php +++ src/applications/audit/editor/PhabricatorAuditCommentEditor.php @@ -8,6 +8,8 @@ private $auditors = array(); private $ccs = array(); + private $noEmail; + public function __construct(PhabricatorRepositoryCommit $commit) { $this->commit = $commit; return $this; @@ -28,6 +30,11 @@ return $this; } + public function setNoEmail($no_email) { + $this->noEmail = $no_email; + return $this; + } + public function addComment(PhabricatorAuditComment $comment) { $commit = $this->commit; @@ -297,7 +304,9 @@ id(new PhabricatorSearchIndexer()) ->indexDocumentByPHID($commit->getPHID()); - $this->sendMail($comment, $other_comments, $inline_comments, $requests); + if (!$this->noEmail) { + $this->sendMail($comment, $other_comments, $inline_comments, $requests); + } } Index: src/applications/diffusion/conduit/ConduitAPI_diffusion_createcomment_Method.php =================================================================== --- src/applications/diffusion/conduit/ConduitAPI_diffusion_createcomment_Method.php +++ src/applications/diffusion/conduit/ConduitAPI_diffusion_createcomment_Method.php @@ -21,6 +21,7 @@ 'phid' => 'required string', 'action' => 'optional string', 'message' => 'required string', + 'silent' => 'optional bool', ); } @@ -73,6 +74,7 @@ id(new PhabricatorAuditCommentEditor($commit)) ->setActor($request->getUser()) + ->setNoEmail($request->getValue('silent')) ->addComment($comment); return true;