Class: GitHelper::GitLabClient
- Inherits:
-
Object
- Object
- GitHelper::GitLabClient
- Defined in:
- lib/git_helper/gitlab_client.rb
Instance Method Summary collapse
- #accept_merge_request(project_name, merge_request_id, options) ⇒ Object
- #create_merge_request(project_name, options) ⇒ Object
- #merge_request(project_name, merge_request_id) ⇒ Object
- #project(project_name) ⇒ Object
Instance Method Details
#accept_merge_request(project_name, merge_request_id, options) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/git_helper/gitlab_client.rb', line 18 def accept_merge_request(project_name, merge_request_id, ) opts_as_string = () run( 'PUT', "/projects/#{url_encode(project_name)}/merge_requests/#{merge_request_id}/merge#{opts_as_string}" ) end |
#create_merge_request(project_name, options) ⇒ Object
13 14 15 16 |
# File 'lib/git_helper/gitlab_client.rb', line 13 def create_merge_request(project_name, ) opts_as_string = () run('POST', "/projects/#{url_encode(project_name)}/merge_requests#{opts_as_string}") end |
#merge_request(project_name, merge_request_id) ⇒ Object
9 10 11 |
# File 'lib/git_helper/gitlab_client.rb', line 9 def merge_request(project_name, merge_request_id) run('GET', "/projects/#{url_encode(project_name)}/merge_requests/#{merge_request_id}") end |
#project(project_name) ⇒ Object
5 6 7 |
# File 'lib/git_helper/gitlab_client.rb', line 5 def project(project_name) run('GET', "/projects/#{url_encode(project_name)}") end |