summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-24 15:58:21 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-24 15:58:21 +0200
commit01333d40882bfb1d05ba5d0cca2ded0c461aac9a (patch)
treef8af7b34ee94c788b8d931812327cdbc267c10e0
parent0df61acac6311fe637d92468c83e0bb868f4aa00 (diff)
downloadgitlab-ci-01333d40882bfb1d05ba5d0cca2ded0c461aac9a.tar.gz
Fix 500 error with badge for pending build
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--CHANGELOG3
-rw-r--r--VERSION2
-rw-r--r--app/services/image_for_build_service.rb6
3 files changed, 9 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5598b66..c9ac113 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+v5.4
+ - Fixed 500 error for badge if build is pending
+
v5.3
- Remove annoying 'Done' message from schedule_builds cron job
- Fix a style issue with the navbar
diff --git a/VERSION b/VERSION
index 03f488b..c5e1837 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.3.0
+5.4.0.pre
diff --git a/app/services/image_for_build_service.rb b/app/services/image_for_build_service.rb
index 7dfcfaa..382e969 100644
--- a/app/services/image_for_build_service.rb
+++ b/app/services/image_for_build_service.rb
@@ -24,6 +24,10 @@ class ImageForBuildService
def image_for_commit(commit)
return 'unknown.png' unless commit
- commit.status + ".png"
+ if commit.status == 'pending'
+ 'running.png'
+ else
+ commit.status + ".png"
+ end
end
end