class Gitlab::QA::Report::ResultsInIssues

def report_test(test)

def report_test(test)
  puts "Reporting test: #{test.file} | #{test.name}"
  issue = find_issue(test)
  if issue
    puts "Found existing issue: #{issue.web_url}"
  else
    # Don't create new issues for skipped tests
    return if test.skipped
    issue = create_issue(test)
    puts "Created new issue: #{issue.web_url}"
  end
  test.testcase ||= issue.web_url
  labels_updated = update_labels(issue, test)
  note_posted = note_status(issue, test)
  if labels_updated || note_posted
    puts "Issue updated."
  else
    puts "Test passed, no update needed."
  end
end