Skip to content

Commit

Permalink
last fixes: mail view and commits order
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Sukrieh committed Jul 27, 2009
1 parent c28082c commit f23ac29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion github.cgi → github
Expand Up @@ -2,6 +2,7 @@

use strict;
use warnings;
use Template;
use Dancer;
use CGI;
use JSON;
Expand Down Expand Up @@ -52,7 +53,7 @@ post '/hook/:project' => sub {
my $tokens = {
subject => "New push submitted to ".$repo->{name},
repository => $repo,
commits => $commits,
commits => [reverse(@$commits)],
nb_commits => (scalar(@$commits)),
recipient => $repo_config->{recipient},
sender => $repo_config->{sender},
Expand Down
2 changes: 1 addition & 1 deletion views/layouts/mail.tt
@@ -1,5 +1,5 @@
To: <% recipient %>
From: <% sneder %>
From: <% sender %>
X-Mailer: github-webhook-perl <% version %>
X-github-project: <% params.project %>
Subject: <% subject %>
Expand Down
4 changes: 3 additions & 1 deletion views/mail.tt
@@ -1,8 +1,10 @@
New push submitted to <% repository.name %> (<% nb_commits %> commits)

<% foreach commit in commits %>
<% commit.timestamp %> - <% commit.author %>
<% commit.timestamp %> - <% commit.author.name %>

* <% commit.message %>

<% commit.url %>
<% end %>
--
Expand Down

0 comments on commit f23ac29

Please sign in to comment.