Differential D8889 Diff 21115 src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | private function applyHeraldRules( | ||||
$description = $data->getCommitMessage(); | $description = $data->getCommitMessage(); | ||||
$commit_uri = PhabricatorEnv::getProductionURI($commit_handle->getURI()); | $commit_uri = PhabricatorEnv::getProductionURI($commit_handle->getURI()); | ||||
$differential = $revision | $differential = $revision | ||||
? PhabricatorEnv::getProductionURI('/D'.$revision->getID()) | ? PhabricatorEnv::getProductionURI('/D'.$revision->getID()) | ||||
: 'No revision.'; | : 'No revision.'; | ||||
$limit = 1000; | |||||
$files = $adapter->loadAffectedPaths(); | $files = $adapter->loadAffectedPaths(); | ||||
sort($files); | sort($files); | ||||
if (count($files) > $limit) { | |||||
array_splice($files, $limit); | |||||
$files[] = '(This commit affected more than 1000 files. '. | |||||
'Only 1000 are shown here and additional ones are truncated.)'; | |||||
} | |||||
$files = implode("\n", $files); | $files = implode("\n", $files); | ||||
$xscript_id = $xscript->getID(); | $xscript_id = $xscript->getID(); | ||||
$why_uri = '/herald/transcript/'.$xscript_id.'/'; | $why_uri = '/herald/transcript/'.$xscript_id.'/'; | ||||
$reply_handler = PhabricatorAuditCommentEditor::newReplyHandlerForCommit( | $reply_handler = PhabricatorAuditCommentEditor::newReplyHandlerForCommit( | ||||
$commit); | $commit); | ||||
▲ Show 20 Lines • Show All 324 Lines • Show Last 20 Lines |