diff options
| author | franck cuny <franck@lumberjaph.net> | 2011-05-02 21:43:31 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2011-05-09 16:42:15 +0200 |
| commit | e4a521e5c0d6621edeb27df6d0c73e5648ae756a (patch) | |
| tree | 16cfa6ec511daaf79e4c55128858a75ae80c04a2 /lib/jitterbug.pm | |
| parent | Try again to unuglify the commit description (diff) | |
| download | jitterbug-e4a521e5c0d6621edeb27df6d0c73e5648ae756a.tar.gz | |
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 <franck@lumberjaph.net>
Diffstat (limited to '')
| -rw-r--r-- | lib/jitterbug.pm | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |
