1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 02:12:41 +01:00

made DiffusionHomeController use commit summaries

Summary: Latest commit in repositories are displayed together with their summaries if available

Test Plan:
Diffusion did not crash - a good sign

commit summaries also only appear on Diffusion Home //only// - as expected

Reviewers: epriestley, btrahan, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5117
This commit is contained in:
Anh Nhan Nguyen 2013-02-26 07:12:44 -08:00 committed by epriestley
parent 5de7774412
commit 58ef3be1c6
2 changed files with 9 additions and 7 deletions

View file

@ -130,7 +130,6 @@ final class DiffusionHomeController extends DiffusionController {
'href' => '/diffusion/'.$repository->getCallsign().'/',
),
$repository->getName()),
$repository->getDetail('description'),
PhabricatorRepositoryType::getNameForRepositoryType(
$repository->getVersionControlSystem()),
$size,
@ -138,7 +137,8 @@ final class DiffusionHomeController extends DiffusionController {
$commit
? DiffusionView::linkCommit(
$repository,
$commit->getCommitIdentifier())
$commit->getCommitIdentifier(),
$commit->getSummary())
: '-',
$date,
$time,
@ -166,7 +166,6 @@ final class DiffusionHomeController extends DiffusionController {
$table->setHeaders(
array(
'Repository',
'Description',
'VCS',
'Commits',
'Lint',
@ -177,11 +176,10 @@ final class DiffusionHomeController extends DiffusionController {
$table->setColumnClasses(
array(
'pri',
'wide',
'',
'n',
'n',
'n',
'wide',
'',
'right',
));
@ -190,7 +188,6 @@ final class DiffusionHomeController extends DiffusionController {
true,
true,
true,
true,
$show_lint,
true,
true,

View file

@ -113,11 +113,16 @@ abstract class DiffusionView extends AphrontView {
final public static function linkCommit(
PhabricatorRepository $repository,
$commit) {
$commit,
$summary = '') {
$commit_name = self::nameCommit($repository, $commit);
$callsign = $repository->getCallsign();
if (strlen($summary)) {
$commit_name .= ': ' . $summary;
}
return phutil_tag(
'a',
array(