class Gitlab::QA::Report::GenerateTestSession

def run!

rubocop:disable Metrics/AbcSize
def run!
  puts "Generating test results in `#{files.join(',')}` as issues in project `#{project}` via the API at `#{Runtime::Env.gitlab_api_base}`."
  tests = Dir.glob(files).flat_map do |path|
    puts "Loading tests in #{path}"
    Report::JsonTestResults.new(path).to_a
  end
  issue = gitlab.create_issue(
    title: "Test session report | #{pipeline}",
    description: generate_description(tests),
    labels: ['Quality', 'QA', 'triage report', pipeline_name_label]
  )
  File.write('REPORT_ISSUE_URL', issue.web_url)
end