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

job_trace_type.rb « ci « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a68e26106b8687938ac247b1f1a707a1236e7797 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

# rubocop: disable Graphql/AuthorizeTypes
module Types
  module Ci
    class JobTraceType < BaseObject
      graphql_name 'CiJobTrace'

      field :html_summary, GraphQL::Types::String, null: false,
        alpha: { milestone: '15.11' }, # As we want the option to change from 10 if needed
        description: "HTML summary containing the last 10 lines of the trace."

      def html_summary
        object.html(last_lines: 10).html_safe
      end
    end
  end
end
# rubocop: enable Graphql/AuthorizeTypes