Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-07-30 18:05:50 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-08-01 13:25:19 +0300
commit8ce4bf20e737482db33f9ad1d37ad8212c6330a0 (patch)
tree4d04ade2163f56baf4fccfe985692806828e317f /app/presenters
parent8ce03988b9a29d34016052be2dd8641fa7b9efbe (diff)
Improve CommitStatusPresenter
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/commit_status_presenter.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/presenters/commit_status_presenter.rb b/app/presenters/commit_status_presenter.rb
index 3ac9c00602c..20a133ec8a2 100644
--- a/app/presenters/commit_status_presenter.rb
+++ b/app/presenters/commit_status_presenter.rb
@@ -2,18 +2,19 @@
class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
CALLOUT_FAILURE_MESSAGES = {
- unknown_failure: 'There is an unknown failure, please try again',
- api_failure: 'There has been an API failure, please try again',
- stuck_or_timeout_failure: 'There has been a timeout failure or the job got stuck. Check your timeout limits or try again',
- runner_system_failure: 'There has been a runner system failure, please try again',
- missing_dependency_failure: 'There has been a missing dependency failure',
- # COMMENTED to check if tests gonna fail: runner_unsupported: 'Your runner is unsupported. Upgrade runner to use new features of your Pipeline',
+ unknown_failure: 'There is an unknown failure, please try again',
+ script_failure: nil,
+ api_failure: 'There has been an API failure, please try again',
+ stuck_or_timeout_failure: 'There has been a timeout failure or the job got stuck. Check your timeout limits or try again',
+ runner_system_failure: 'There has been a runner system failure, please try again',
+ missing_dependency_failure: 'There has been a missing dependency failure',
+ runner_unsupported: 'Your runner is outdated, please upgrade your runner'
}.freeze
presents :build
def callout_failure_message
- CALLOUT_FAILURE_MESSAGES[failure_reason.to_sym]
+ CALLOUT_FAILURE_MESSAGES.fetch(failure_reason.to_sym)
end
def recoverable?