about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan "Duke" Leto <jonathan@leto.net>2011-04-28 14:19:00 -0700
committerJonathan "Duke" Leto <jonathan@leto.net>2011-04-28 14:19:00 -0700
commitde44fb9427035c2684d5b0882ae9caa4c621d86f (patch)
tree3cfb4b5a1c7b8f3f77baf4867c58561bb11ef4db
parentAdd a link from the project page back to the dashboard, fixes #39 (diff)
downloadjitterbug-de44fb9427035c2684d5b0882ae9caa4c621d86f.tar.gz
Show the author of the latest commit on the dashboard, fixes #40
-rw-r--r--lib/jitterbug.pm4
-rw-r--r--views/index.tt2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/jitterbug.pm b/lib/jitterbug.pm
index 1bf3aab..0febc01 100644
--- a/lib/jitterbug.pm
+++ b/lib/jitterbug.pm
@@ -39,7 +39,9 @@ sub _get_projects {
 
         if ($last_commit) {
             # XXX see what data to store here
-            $proj_desc->{last_build} = from_json($last_commit->content);
+            my $json = from_json($last_commit->content);
+            $proj_desc->{last_build}        = $json;
+            $proj_desc->{last_build_author} = $json->{author}{name};
         }
 
         push @projects, $proj_desc;
diff --git a/views/index.tt b/views/index.tt
index 727a95c..a6e0919 100644
--- a/views/index.tt
+++ b/views/index.tt
@@ -24,7 +24,7 @@
           <div class="repo-body">
             <p class="desc"><: $project.description :></p>
             :if $project.last_build.timestamp {
-            <p class="updated-at">last updated at <: $project.last_build.timestamp :></p>
+            <p class="updated-at">last updated at <: $project.last_build.timestamp :> by <: $project.last_build_author :></p>
             :}
             <div class="last-builds">
               :for $project.last_build.version.keys() -> $version {