Sha256: 9cdad586e48431e00403321020698a2bc06dccc2953e628904abd8aa07d9c6a6
Contents?: true
Size: 842 Bytes
Versions: 17
Compression:
Stored size: 842 Bytes
Contents
# frozen_string_literal: true require 'table_print' module GitlabQuality module TestTooling module FailedJobsTable class << self # Create table with formatted list of failed jobs # # @param [Array<Gitlab::ObjectifiedHash>] jobs # @return [String] def create(jobs:) "```\n#{TablePrint::Printer.table_print(collect_results(jobs))}\n```\n" end private # Format list of failed jobs # # @param [Array<Gitlab::ObjectifiedHash>] jobs # @return [Array] def collect_results(jobs) jobs.sort_by(&:stage).map do |job| { "Job" => job.name, "Stage" => job.stage, "Failure Reason" => job.failure_reason } end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems