summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/jitterbug/Project.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/jitterbug/Project.pm b/lib/jitterbug/Project.pm
index 0a3f984..db921e7 100644
--- a/lib/jitterbug/Project.pm
+++ b/lib/jitterbug/Project.pm
@@ -18,8 +18,15 @@ get '/:project' => sub {
my $builds = _sorted_builds($project);
+ my $commits;
+ foreach (@$builds) {
+ my $t = $_->{timestamp};
+ (my $d) = $t =~ /^(\d{4}-\d{2}-\d{2})/;
+ push @{$commits->{$d}}, $_;
+ }
+
template 'project/index',
- { project => $project, builds => $builds, %$desc };
+ { project => $project, builds => $commits, %$desc };
};
get '/:project/feed' => sub {