Class: Gitlab::QA::Report::GitlabIssueDryClient

Inherits:
GitlabIssueClient show all
Defined in:
lib/gitlab/qa/report/gitlab_issue_dry_client.rb

Constant Summary

Constants inherited from GitlabIssueClient

Gitlab::QA::Report::GitlabIssueClient::MAINTAINER_ACCESS_LEVEL, Gitlab::QA::Report::GitlabIssueClient::MAX_RETRY_ATTEMPTS, Gitlab::QA::Report::GitlabIssueClient::RETRY_BACK_OFF_DELAY

Instance Method Summary collapse

Methods inherited from GitlabIssueClient

#assert_user_permission!, #edit_issue_note, #find_issue_discussions, #find_issue_notes, #find_issues, #handle_gitlab_client_exceptions, #ignore_gitlab_client_exceptions, #initialize, #upload_file

Constructor Details

This class inherits a constructor from Gitlab::QA::Report::GitlabIssueClient

Instance Method Details

#add_note_to_issue_discussion_as_thread(iid:, discussion_id:, body:) ⇒ Object



22
23
24
# File 'lib/gitlab/qa/report/gitlab_issue_dry_client.rb', line 22

def add_note_to_issue_discussion_as_thread(iid:, discussion_id:, body:)
  puts "The following discussion note would have been posted on #{project}##{iid} (discussion #{discussion_id}) issue: #{body}"
end

#create_issue(title:, description:, labels:, issue_type: 'issue') ⇒ Object



7
8
9
10
11
12
# File 'lib/gitlab/qa/report/gitlab_issue_dry_client.rb', line 7

def create_issue(title:, description:, labels:, issue_type: 'issue')
  attrs = { description: description, labels: labels }

  puts "The following #{issue_type} would have been created:"
  puts "project: #{project}, title: #{title}, attrs: #{attrs}"
end

#create_issue_note(iid:, note:) ⇒ Object



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

def create_issue_note(iid:, note:)
  puts "The following note would have been posted on #{project}##{iid} issue: #{note}"
end

#edit_issue(iid:, options: {}) ⇒ Object



14
15
16
# File 'lib/gitlab/qa/report/gitlab_issue_dry_client.rb', line 14

def edit_issue(iid:, options: {})
  puts "The #{project}##{iid} issue would have been updated with: #{options}"
end