mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Limit number of affected files in Differential e-mails
Summary: This triggers mainly for SVN branch copy. Test Plan: Ran this code separately. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5126
This commit is contained in:
parent
5e11eb7f72
commit
40d453d6aa
1 changed files with 8 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
abstract class DifferentialReviewRequestMail extends DifferentialMail {
|
||||
|
||||
const MAX_AFFECTED_FILES = 1000;
|
||||
|
||||
protected $comments;
|
||||
|
||||
private $patch;
|
||||
|
@ -58,7 +60,12 @@ abstract class DifferentialReviewRequestMail extends DifferentialMail {
|
|||
$changesets = $this->getChangesets();
|
||||
if ($changesets) {
|
||||
$body[] = 'AFFECTED FILES';
|
||||
foreach ($changesets as $changeset) {
|
||||
$max = self::MAX_AFFECTED_FILES;
|
||||
foreach (array_values($changesets) as $i => $changeset) {
|
||||
if ($i == $max) {
|
||||
$body[] = ' ('.(count($changesets) - $max).' more files)';
|
||||
break;
|
||||
}
|
||||
$body[] = ' '.$changeset->getFilename();
|
||||
}
|
||||
$body[] = null;
|
||||
|
|
Loading…
Reference in a new issue