getObject(); try { $merges = DiffusionPathChange::newFromConduit( id(new ConduitCall('diffusion.mergedcommitsquery', array( 'commit' => $commit->getCommitIdentifier(), 'limit' => $limit + 1, 'callsign' => $commit->getRepository()->getCallsign(), ))) ->setUser($this->getViewer()) ->execute()); if (count($merges) > $limit) { $merges = array_slice($merges, 0, $limit); $merges_caption = pht("This commit merges more than %d changes. Only the first ". "%d are shown.\n", $limit, $limit); } if ($merges) { $merge_commits = array(); foreach ($merges as $merge) { $merge_commits[] = $merge->getAuthorName(). ': '. $merge->getSummary(); } $body->addTextSection( pht('MERGED COMMITS'), $merges_caption.implode("\n", $merge_commits)); } } catch (ConduitException $ex) { // Log the exception into the email body $body->addTextSection( pht('MERGED COMMITS'), pht('Error generating merged commits: ').$ex->getMessage()); } } }