mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Don't add author and reviewers to CCs in Herald
Summary: Herald rules are adding CC also for Author and Reviewer. See also D1397. I was considering also just don't displaying the extra CC but this is probably better. There are still cases where there could be reviewer in CC (e.g. by making reviewer from CC or by direct edit) but I think it's not a big problem. Beeing both Reviewer and CC can be actually useful (e.g. if you resign than you still are in CC) but it's not that useful to justify this: Author: vrana Reviewers: epriestley CCs: vrana, epriestley Test Plan: Comment on revision where I am author. Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2057
This commit is contained in:
parent
b38047006b
commit
62053a39e3
2 changed files with 5 additions and 3 deletions
|
@ -431,9 +431,7 @@ final class DifferentialCommentEditor {
|
|||
// top of the action list.
|
||||
$revision->save();
|
||||
|
||||
if ($action != DifferentialAction::ACTION_RESIGN &&
|
||||
$this->actorPHID != $revision->getAuthorPHID() &&
|
||||
!in_array($this->actorPHID, $revision->getReviewers())) {
|
||||
if ($action != DifferentialAction::ACTION_RESIGN) {
|
||||
DifferentialRevisionEditor::addCC(
|
||||
$revision,
|
||||
$this->actorPHID,
|
||||
|
|
|
@ -546,6 +546,10 @@ final class DifferentialRevisionEditor {
|
|||
array $add_phids,
|
||||
$reason_phid) {
|
||||
|
||||
$dont_add = $revision->getReviewers();
|
||||
$dont_add[] = $revision->getAuthorPHID();
|
||||
$add_phids = array_diff($add_phids, $dont_add);
|
||||
|
||||
return self::alterRelationships(
|
||||
$revision,
|
||||
$stable_phids,
|
||||
|
|
Loading…
Reference in a new issue