Class: GitlabQuality::TestTooling::GitlabClient::BranchesClient

Inherits:
GitlabClient
  • Object
show all
Defined in:
lib/gitlab_quality/test_tooling/gitlab_client/branches_client.rb

Direct Known Subclasses

BranchesDryClient

Constant Summary

Constants inherited from GitlabClient

GitlabClient::MAX_RETRY_ATTEMPTS, GitlabClient::RETRY_BACK_OFF_DELAY

Instance Method Summary collapse

Methods inherited from GitlabClient

#handle_gitlab_client_exceptions, #ignore_gitlab_client_exceptions, #initialize, #post_exception_to_slack

Constructor Details

This class inherits a constructor from GitlabQuality::TestTooling::GitlabClient::GitlabClient

Instance Method Details

#create(branch_name, ref) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/gitlab_quality/test_tooling/gitlab_client/branches_client.rb', line 7

def create(branch_name, ref)
  branch = handle_gitlab_client_exceptions do
    client.create_branch(project, branch_name, ref)
  end

  Runtime::Logger.debug("Created branch #{branch['name']} (#{branch['web_url']})") if branch
  branch
end