summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/status/external/common.rb
blob: 4169f5b32100490f51d13582daa72ff4b000e878 (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
          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