@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Put a limit on the number of files showing in herald emails

Summary:
Sometimes a commit can be huge (like a branch cut in FB www which could have more than half a million files touched). It will generate some emails with size more than 30M, and it will take quite a while to just sort the files and to send out.
Put a hard limit here to avoid such cases. Probably only matters for FB right now, but still even for a small repo with several thousand files, it is a waste to send them all out. Not sure if there is any cleaner way to do it though.

Test Plan: Tried it in FB installtion.

Reviewers: lifeihuang, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D8889

authored by

Peng Li and committed by
epriestley
3a069454 cafd2dd6

+6
+6
src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
··· 138 138 ? PhabricatorEnv::getProductionURI('/D'.$revision->getID()) 139 139 : 'No revision.'; 140 140 141 + $limit = 1000; 141 142 $files = $adapter->loadAffectedPaths(); 142 143 sort($files); 144 + if (count($files) > $limit) { 145 + array_splice($files, $limit); 146 + $files[] = '(This commit affected more than 1000 files. '. 147 + 'Only 1000 are shown here and additional ones are truncated.)'; 148 + } 143 149 $files = implode("\n", $files); 144 150 145 151 $xscript_id = $xscript->getID();