Page MenuHomePhabricator

D7916.id17916.diff
No OneTemporary

D7916.id17916.diff

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;

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 6, 10:40 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7239692
Default Alt Text
D7916.id17916.diff (1 KB)

Event Timeline