From b28268d75688f971f39a24065797ff068cbf5f7b Mon Sep 17 00:00:00 2001 From: franck cuny Date: Mon, 2 May 2011 21:43:31 +0200 Subject: implement some of #12 for each project, check the status of the last build. If there is a FAIL on one version, the project name is in RED, else GREEN. Signed-off-by: franck cuny --- lib/jitterbug.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/jitterbug.pm') diff --git a/lib/jitterbug.pm b/lib/jitterbug.pm index 0febc01..dadfbe8 100644 --- a/lib/jitterbug.pm +++ b/lib/jitterbug.pm @@ -42,8 +42,16 @@ sub _get_projects { my $json = from_json($last_commit->content); $proj_desc->{last_build} = $json; $proj_desc->{last_build_author} = $json->{author}{name}; + # get the status of the last build + my $last_build_status = "PASS"; + foreach my $version (keys %{$json->{build}->{version}}){ + if ($json->{build}->{version}->{$version} eq "FAIL"){ + $last_build_status = "FAIL"; + last; + } + } + $proj_desc->{last_build_status} = $last_build_status; } - push @projects, $proj_desc; } -- cgit 1.4.1