summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/status/bridge/failed.rb
blob: b0ab09925947d9eb4c8e5fee2c3a013b2416a070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Gitlab
  module Ci
    module Status
      module Bridge
        class Failed < Status::Build::Failed
          private

          def failure_reason_message
            [
              self.class.reasons.fetch(subject.failure_reason.to_sym),
              subject.options[:downstream_errors]
            ].flatten.compact.join(', ')
          end
        end
      end
    end
  end
end