mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
16 lines
599 B
PHP
16 lines
599 B
PHP
<?php
|
|
|
|
$app->get('{repo}/{branch}/rss/', function($repo, $branch) use($app) {
|
|
$repository = $app['git']->getRepository($app['git.repos'] . $repo);
|
|
$commits = $repository->getCommits($branch);
|
|
|
|
$html = $app['twig']->render('rss.twig', array(
|
|
'baseurl' => $app['baseurl'],
|
|
'repo' => $repo,
|
|
'branch' => $branch,
|
|
'commits' => $commits,
|
|
));
|
|
|
|
return new Symfony\Component\HttpFoundation\Response($html, 200, array('Content-Type' => 'application/rss+xml'));
|
|
})->assert('repo', '[\w-._]+')
|
|
->assert('branch', '[\w-._]+'); |