Class: Gitlab::QA::Report::RelateFailureIssue

Inherits:
ReportAsIssue show all
Defined in:
lib/gitlab/qa/report/relate_failure_issue.rb

Overview

Uses the API to create or update GitLab issues with the results of tests from RSpec report files.

Constant Summary collapse

DEFAULT_MAX_DIFF_RATIO_FOR_DETECTION =
0.05
STACKTRACE_REGEX =
%r{### Stack trace\s*(```)\s*.*(Failure/Error:.+)(\1)}m.freeze
NEW_ISSUE_LABELS =
Set.new(%w[QA Quality test failure::investigating priority::2]).freeze
MultipleIssuesFound =
Class.new(StandardError)

Constants inherited from ReportAsIssue

Gitlab::QA::Report::ReportAsIssue::MAX_TITLE_LENGTH

Instance Method Summary collapse

Methods inherited from ReportAsIssue

#invoke!

Constructor Details

#initialize(max_diff_ratio: DEFAULT_MAX_DIFF_RATIO_FOR_DETECTION, **kwargs) ⇒ RelateFailureIssue

Returns a new instance of RelateFailureIssue.



18
19
20
21
# File 'lib/gitlab/qa/report/relate_failure_issue.rb', line 18

def initialize(max_diff_ratio: DEFAULT_MAX_DIFF_RATIO_FOR_DETECTION, **kwargs)
  super
  @max_diff_ratio = max_diff_ratio.to_f
end