summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/status/external/common.rb
blob: 5471b0092edf03fd69600b7f67fca2441133c201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module Gitlab
  module Ci
    module Status
      module External
        module Common
          def label
            subject.description || super
          end

          def has_details?
            subject.target_url.present? &&
              can?(user, :read_commit_status, subject)
          end

          def details_path
            subject.target_url
          end

          def has_action?
            false
          end
        end
      end
    end
  end
end