# coding: utf-8 """ Gitea API This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.25.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from swagger_client.api_client import ApiClient class RepositoryApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def accept_repo_transfer(self, owner, repo, **kwargs): # noqa: E501 """Accept a repo transfer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.accept_repo_transfer(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to transfer (required) :param str repo: name of the repo to transfer (required) :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.accept_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.accept_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def accept_repo_transfer_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Accept a repo transfer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.accept_repo_transfer_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to transfer (required) :param str repo: name of the repo to transfer (required) :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method accept_repo_transfer" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `accept_repo_transfer`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `accept_repo_transfer`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/transfer/accept', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def actions_disable_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Disable a workflow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_disable_workflow(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.actions_disable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 else: (data) = self.actions_disable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 return data def actions_disable_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Disable a workflow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_disable_workflow_with_http_info(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'workflow_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method actions_disable_workflow" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `actions_disable_workflow`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `actions_disable_workflow`") # noqa: E501 # verify the required parameter 'workflow_id' is set if self.api_client.client_side_validation and ('workflow_id' not in params or params['workflow_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `workflow_id` when calling `actions_disable_workflow`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'workflow_id' in params: path_params['workflow_id'] = params['workflow_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def actions_dispatch_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Create a workflow dispatch event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_dispatch_workflow(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :param CreateActionWorkflowDispatch body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.actions_dispatch_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 else: (data) = self.actions_dispatch_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 return data def actions_dispatch_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Create a workflow dispatch event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_dispatch_workflow_with_http_info(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :param CreateActionWorkflowDispatch body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'workflow_id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method actions_dispatch_workflow" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `actions_dispatch_workflow`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `actions_dispatch_workflow`") # noqa: E501 # verify the required parameter 'workflow_id' is set if self.api_client.client_side_validation and ('workflow_id' not in params or params['workflow_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `workflow_id` when calling `actions_dispatch_workflow`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'workflow_id' in params: path_params['workflow_id'] = params['workflow_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def actions_enable_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Enable a workflow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_enable_workflow(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.actions_enable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 else: (data) = self.actions_enable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 return data def actions_enable_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Enable a workflow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_enable_workflow_with_http_info(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'workflow_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method actions_enable_workflow" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `actions_enable_workflow`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `actions_enable_workflow`") # noqa: E501 # verify the required parameter 'workflow_id' is set if self.api_client.client_side_validation and ('workflow_id' not in params or params['workflow_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `workflow_id` when calling `actions_enable_workflow`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'workflow_id' in params: path_params['workflow_id'] = params['workflow_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def actions_get_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Get a workflow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_get_workflow(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :return: ActionWorkflow If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.actions_get_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 else: (data) = self.actions_get_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 return data def actions_get_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 """Get a workflow # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_get_workflow_with_http_info(owner, repo, workflow_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str workflow_id: id of the workflow (required) :return: ActionWorkflow If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'workflow_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method actions_get_workflow" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `actions_get_workflow`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `actions_get_workflow`") # noqa: E501 # verify the required parameter 'workflow_id' is set if self.api_client.client_side_validation and ('workflow_id' not in params or params['workflow_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `workflow_id` when calling `actions_get_workflow`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'workflow_id' in params: path_params['workflow_id'] = params['workflow_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/workflows/{workflow_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionWorkflow', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def actions_list_repository_workflows(self, owner, repo, **kwargs): # noqa: E501 """List repository workflows # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_list_repository_workflows(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: ActionWorkflowResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.actions_list_repository_workflows_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.actions_list_repository_workflows_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def actions_list_repository_workflows_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List repository workflows # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.actions_list_repository_workflows_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: ActionWorkflowResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method actions_list_repository_workflows" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `actions_list_repository_workflows`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `actions_list_repository_workflows`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/workflows', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionWorkflowResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_current_user_repo(self, **kwargs): # noqa: E501 """Create a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_current_user_repo(async_req=True) >>> result = thread.get() :param async_req bool :param CreateRepoOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 else: (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 return data def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 """Create a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_current_user_repo_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param CreateRepoOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_current_user_repo" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/user/repos', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_fork(self, owner, repo, **kwargs): # noqa: E501 """Fork a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_fork(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to fork (required) :param str repo: name of the repo to fork (required) :param CreateForkOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def create_fork_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Fork a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_fork_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to fork (required) :param str repo: name of the repo to fork (required) :param CreateForkOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_fork" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `create_fork`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `create_fork`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/forks', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 """Create a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_repo_variable(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :param CreateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 else: (data) = self.create_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 return data def create_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 """Create a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_repo_variable_with_http_info(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :param CreateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'variablename', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_repo_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `create_repo_variable`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `create_repo_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `create_repo_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/variables/{variablename}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_action_run(self, owner, repo, run, **kwargs): # noqa: E501 """Delete a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_action_run(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int run: runid of the workflow run (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_action_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 else: (data) = self.delete_action_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 return data def delete_action_run_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 """Delete a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_action_run_with_http_info(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int run: runid of the workflow run (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'run'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_action_run" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `delete_action_run`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `delete_action_run`") # noqa: E501 # verify the required parameter 'run' is set if self.api_client.client_side_validation and ('run' not in params or params['run'] is None): # noqa: E501 raise ValueError("Missing the required parameter `run` when calling `delete_action_run`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'run' in params: path_params['run'] = params['run'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runs/{run}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_artifact(self, owner, repo, artifact_id, **kwargs): # noqa: E501 """Deletes a specific artifact for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_artifact(owner, repo, artifact_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str artifact_id: id of the artifact (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 else: (data) = self.delete_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 return data def delete_artifact_with_http_info(self, owner, repo, artifact_id, **kwargs): # noqa: E501 """Deletes a specific artifact for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_artifact_with_http_info(owner, repo, artifact_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str artifact_id: id of the artifact (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'artifact_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_artifact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `delete_artifact`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `delete_artifact`") # noqa: E501 # verify the required parameter 'artifact_id' is set if self.api_client.client_side_validation and ('artifact_id' not in params or params['artifact_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `artifact_id` when calling `delete_artifact`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'artifact_id' in params: path_params['artifact_id'] = params['artifact_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_repo_runner(self, owner, repo, runner_id, **kwargs): # noqa: E501 """Delete an repo-level runner # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_repo_runner(owner, repo, runner_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str runner_id: id of the runner (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 else: (data) = self.delete_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 return data def delete_repo_runner_with_http_info(self, owner, repo, runner_id, **kwargs): # noqa: E501 """Delete an repo-level runner # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_repo_runner_with_http_info(owner, repo, runner_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str runner_id: id of the runner (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'runner_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_repo_runner" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `delete_repo_runner`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `delete_repo_runner`") # noqa: E501 # verify the required parameter 'runner_id' is set if self.api_client.client_side_validation and ('runner_id' not in params or params['runner_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `runner_id` when calling `delete_repo_runner`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'runner_id' in params: path_params['runner_id'] = params['runner_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runners/{runner_id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_repo_secret(self, owner, repo, secretname, **kwargs): # noqa: E501 """Delete a secret in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_repo_secret(owner, repo, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repository (required) :param str repo: name of the repository (required) :param str secretname: name of the secret (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 else: (data) = self.delete_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 return data def delete_repo_secret_with_http_info(self, owner, repo, secretname, **kwargs): # noqa: E501 """Delete a secret in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_repo_secret_with_http_info(owner, repo, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repository (required) :param str repo: name of the repository (required) :param str secretname: name of the secret (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'secretname'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_repo_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `delete_repo_secret`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `delete_repo_secret`") # noqa: E501 # verify the required parameter 'secretname' is set if self.api_client.client_side_validation and ('secretname' not in params or params['secretname'] is None): # noqa: E501 raise ValueError("Missing the required parameter `secretname` when calling `delete_repo_secret`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'secretname' in params: path_params['secretname'] = params['secretname'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/secrets/{secretname}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 """Delete a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_repo_variable(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 else: (data) = self.delete_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 return data def delete_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 """Delete a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_repo_variable_with_http_info(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'variablename'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_repo_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `delete_repo_variable`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `delete_repo_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `delete_repo_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/variables/{variablename}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionVariable', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def download_actions_run_job_logs(self, owner, repo, job_id, **kwargs): # noqa: E501 """Downloads the job logs for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_actions_run_job_logs(owner, repo, job_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int job_id: id of the job (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.download_actions_run_job_logs_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 else: (data) = self.download_actions_run_job_logs_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 return data def download_actions_run_job_logs_with_http_info(self, owner, repo, job_id, **kwargs): # noqa: E501 """Downloads the job logs for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_actions_run_job_logs_with_http_info(owner, repo, job_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int job_id: id of the job (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'job_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method download_actions_run_job_logs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `download_actions_run_job_logs`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `download_actions_run_job_logs`") # noqa: E501 # verify the required parameter 'job_id' is set if self.api_client.client_side_validation and ('job_id' not in params or params['job_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `job_id` when calling `download_actions_run_job_logs`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'job_id' in params: path_params['job_id'] = params['job_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/jobs/{job_id}/logs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def download_artifact(self, owner, repo, artifact_id, **kwargs): # noqa: E501 """Downloads a specific artifact for a workflow run redirects to blob url # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_artifact(owner, repo, artifact_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str artifact_id: id of the artifact (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.download_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 else: (data) = self.download_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 return data def download_artifact_with_http_info(self, owner, repo, artifact_id, **kwargs): # noqa: E501 """Downloads a specific artifact for a workflow run redirects to blob url # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.download_artifact_with_http_info(owner, repo, artifact_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str artifact_id: id of the artifact (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'artifact_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method download_artifact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `download_artifact`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `download_artifact`") # noqa: E501 # verify the required parameter 'artifact_id' is set if self.api_client.client_side_validation and ('artifact_id' not in params or params['artifact_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `artifact_id` when calling `download_artifact`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'artifact_id' in params: path_params['artifact_id'] = params['artifact_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def generate_repo(self, template_owner, template_repo, **kwargs): # noqa: E501 """Create a repository using a template # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.generate_repo(template_owner, template_repo, async_req=True) >>> result = thread.get() :param async_req bool :param str template_owner: owner of the template repository (required) :param str template_repo: name of the template repository (required) :param GenerateRepoOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.generate_repo_with_http_info(template_owner, template_repo, **kwargs) # noqa: E501 else: (data) = self.generate_repo_with_http_info(template_owner, template_repo, **kwargs) # noqa: E501 return data def generate_repo_with_http_info(self, template_owner, template_repo, **kwargs): # noqa: E501 """Create a repository using a template # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.generate_repo_with_http_info(template_owner, template_repo, async_req=True) >>> result = thread.get() :param async_req bool :param str template_owner: owner of the template repository (required) :param str template_repo: name of the template repository (required) :param GenerateRepoOption body: :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['template_owner', 'template_repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method generate_repo" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'template_owner' is set if self.api_client.client_side_validation and ('template_owner' not in params or params['template_owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `template_owner` when calling `generate_repo`") # noqa: E501 # verify the required parameter 'template_repo' is set if self.api_client.client_side_validation and ('template_repo' not in params or params['template_repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `template_repo` when calling `generate_repo`") # noqa: E501 collection_formats = {} path_params = {} if 'template_owner' in params: path_params['template_owner'] = params['template_owner'] # noqa: E501 if 'template_repo' in params: path_params['template_repo'] = params['template_repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{template_owner}/{template_repo}/generate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_annotated_tag(self, owner, repo, sha, **kwargs): # noqa: E501 """Gets the tag object of an annotated tag (not lightweight tags) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_annotated_tag(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) :return: AnnotatedTag If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_annotated_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.get_annotated_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def get_annotated_tag_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Gets the tag object of an annotated tag (not lightweight tags) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_annotated_tag_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) :return: AnnotatedTag If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_annotated_tag" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_annotated_tag`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_annotated_tag`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `get_annotated_tag`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/tags/{sha}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AnnotatedTag', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_artifact(self, owner, repo, artifact_id, **kwargs): # noqa: E501 """Gets a specific artifact for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_artifact(owner, repo, artifact_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str artifact_id: id of the artifact (required) :return: ActionArtifact If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 else: (data) = self.get_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 return data def get_artifact_with_http_info(self, owner, repo, artifact_id, **kwargs): # noqa: E501 """Gets a specific artifact for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_artifact_with_http_info(owner, repo, artifact_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str artifact_id: id of the artifact (required) :return: ActionArtifact If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'artifact_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_artifact" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_artifact`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_artifact`") # noqa: E501 # verify the required parameter 'artifact_id' is set if self.api_client.client_side_validation and ('artifact_id' not in params or params['artifact_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `artifact_id` when calling `get_artifact`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'artifact_id' in params: path_params['artifact_id'] = params['artifact_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionArtifact', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_artifacts(self, owner, repo, **kwargs): # noqa: E501 """Lists all artifacts for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_artifacts(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str name: name of the artifact :return: ActionArtifactsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_artifacts_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.get_artifacts_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def get_artifacts_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Lists all artifacts for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_artifacts_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str name: name of the artifact :return: ActionArtifactsResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_artifacts" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_artifacts`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_artifacts`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'name' in params: query_params.append(('name', params['name'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/artifacts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionArtifactsResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_artifacts_of_run(self, owner, repo, run, **kwargs): # noqa: E501 """Lists all artifacts for a repository run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_artifacts_of_run(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int run: runid of the workflow run (required) :param str name: name of the artifact :return: ActionArtifactsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_artifacts_of_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 else: (data) = self.get_artifacts_of_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 return data def get_artifacts_of_run_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 """Lists all artifacts for a repository run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_artifacts_of_run_with_http_info(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int run: runid of the workflow run (required) :param str name: name of the artifact :return: ActionArtifactsResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'run', 'name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_artifacts_of_run" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_artifacts_of_run`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_artifacts_of_run`") # noqa: E501 # verify the required parameter 'run' is set if self.api_client.client_side_validation and ('run' not in params or params['run'] is None): # noqa: E501 raise ValueError("Missing the required parameter `run` when calling `get_artifacts_of_run`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'run' in params: path_params['run'] = params['run'] # noqa: E501 query_params = [] if 'name' in params: query_params.append(('name', params['name'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runs/{run}/artifacts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionArtifactsResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_blob(self, owner, repo, sha, **kwargs): # noqa: E501 """Gets the blob of a repository. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_blob(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :return: GitBlobResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def get_blob_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Gets the blob of a repository. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_blob_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :return: GitBlobResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_blob" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_blob`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_blob`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `get_blob`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/blobs/{sha}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GitBlobResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_runner(self, owner, repo, runner_id, **kwargs): # noqa: E501 """Get an repo-level runner # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_runner(owner, repo, runner_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str runner_id: id of the runner (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 else: (data) = self.get_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 return data def get_repo_runner_with_http_info(self, owner, repo, runner_id, **kwargs): # noqa: E501 """Get an repo-level runner # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_runner_with_http_info(owner, repo, runner_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str runner_id: id of the runner (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'runner_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_runner" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_repo_runner`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_repo_runner`") # noqa: E501 # verify the required parameter 'runner_id' is set if self.api_client.client_side_validation and ('runner_id' not in params or params['runner_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `runner_id` when calling `get_repo_runner`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'runner_id' in params: path_params['runner_id'] = params['runner_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runners/{runner_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_runners(self, owner, repo, **kwargs): # noqa: E501 """Get repo-level runners # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_runners(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_runners_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.get_repo_runners_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def get_repo_runners_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get repo-level runners # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_runners_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_runners" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_repo_runners`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_repo_runners`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runners', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 """Get a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_variable(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 else: (data) = self.get_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 return data def get_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 """Get a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_variable_with_http_info(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :return: ActionVariable If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'variablename'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_repo_variable`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_repo_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `get_repo_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/variables/{variablename}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionVariable', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_variables_list(self, owner, repo, **kwargs): # noqa: E501 """Get repo-level variables list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_variables_list(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[ActionVariable] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_variables_list_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.get_repo_variables_list_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def get_repo_variables_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get repo-level variables list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_variables_list_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[ActionVariable] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_variables_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_repo_variables_list`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_repo_variables_list`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/variables', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ActionVariable]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_tree(self, owner, repo, sha, **kwargs): # noqa: E501 """Gets the tree of a repository. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tree(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param bool recursive: show all directories and files :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page :param int per_page: number of items per page :return: GitTreeResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def get_tree_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Gets the tree of a repository. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tree_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param bool recursive: show all directories and files :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page :param int per_page: number of items per page :return: GitTreeResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha', 'recursive', 'page', 'per_page'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_tree" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_tree`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_tree`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `get_tree`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] if 'recursive' in params: query_params.append(('recursive', params['recursive'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'per_page' in params: query_params.append(('per_page', params['per_page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/trees/{sha}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GitTreeResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_workflow_job(self, owner, repo, job_id, **kwargs): # noqa: E501 """Gets a specific workflow job for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_job(owner, repo, job_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str job_id: id of the job (required) :return: ActionWorkflowJob If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_workflow_job_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 else: (data) = self.get_workflow_job_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 return data def get_workflow_job_with_http_info(self, owner, repo, job_id, **kwargs): # noqa: E501 """Gets a specific workflow job for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_job_with_http_info(owner, repo, job_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str job_id: id of the job (required) :return: ActionWorkflowJob If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'job_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_workflow_job" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_workflow_job`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_workflow_job`") # noqa: E501 # verify the required parameter 'job_id' is set if self.api_client.client_side_validation and ('job_id' not in params or params['job_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `job_id` when calling `get_workflow_job`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'job_id' in params: path_params['job_id'] = params['job_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/jobs/{job_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionWorkflowJob', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_workflow_run(self, owner, repo, run, **kwargs): # noqa: E501 """Gets a specific workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_run(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str run: id of the run (required) :return: ActionWorkflowRun If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_workflow_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 else: (data) = self.get_workflow_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 return data def get_workflow_run_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 """Gets a specific workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_run_with_http_info(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str run: id of the run (required) :return: ActionWorkflowRun If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'run'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_workflow_run" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_workflow_run`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_workflow_run`") # noqa: E501 # verify the required parameter 'run' is set if self.api_client.client_side_validation and ('run' not in params or params['run'] is None): # noqa: E501 raise ValueError("Missing the required parameter `run` when calling `get_workflow_run`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'run' in params: path_params['run'] = params['run'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runs/{run}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionWorkflowRun', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_workflow_runs(self, owner, repo, **kwargs): # noqa: E501 """Lists all runs for a repository run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_runs(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str event: workflow event name :param str branch: workflow branch :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) :param str actor: triggered by user :param str head_sha: triggering sha of the workflow run :param int page: page number of results to return (1-based) :param int limit: page size of results :return: ActionWorkflowRunsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_workflow_runs_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.get_workflow_runs_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def get_workflow_runs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Lists all runs for a repository run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_runs_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str event: workflow event name :param str branch: workflow branch :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) :param str actor: triggered by user :param str head_sha: triggering sha of the workflow run :param int page: page number of results to return (1-based) :param int limit: page size of results :return: ActionWorkflowRunsResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'event', 'branch', 'status', 'actor', 'head_sha', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_workflow_runs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `get_workflow_runs`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `get_workflow_runs`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'event' in params: query_params.append(('event', params['event'])) # noqa: E501 if 'branch' in params: query_params.append(('branch', params['branch'])) # noqa: E501 if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 if 'actor' in params: query_params.append(('actor', params['actor'])) # noqa: E501 if 'head_sha' in params: query_params.append(('head_sha', params['head_sha'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionWorkflowRunsResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_action_tasks(self, owner, repo, **kwargs): # noqa: E501 """List a repository's action tasks # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_action_tasks(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results, default maximum page size is 50 :return: ActionTaskResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_action_tasks_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.list_action_tasks_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def list_action_tasks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's action tasks # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_action_tasks_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results, default maximum page size is 50 :return: ActionTaskResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_action_tasks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `list_action_tasks`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `list_action_tasks`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/tasks', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionTaskResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_forks(self, owner, repo, **kwargs): # noqa: E501 """List a repository's forks # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_forks(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Repository] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def list_forks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's forks # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_forks_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Repository] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_forks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `list_forks`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `list_forks`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/forks', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Repository]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_workflow_jobs(self, owner, repo, **kwargs): # noqa: E501 """Lists all jobs for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_workflow_jobs(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: ActionWorkflowJobsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_workflow_jobs_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.list_workflow_jobs_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def list_workflow_jobs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Lists all jobs for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_workflow_jobs_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: ActionWorkflowJobsResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'status', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_workflow_jobs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `list_workflow_jobs`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `list_workflow_jobs`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionWorkflowJobsResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_workflow_run_jobs(self, owner, repo, run, **kwargs): # noqa: E501 """Lists all jobs for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_workflow_run_jobs(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int run: runid of the workflow run (required) :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: ActionWorkflowJobsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_workflow_run_jobs_with_http_info(owner, repo, run, **kwargs) # noqa: E501 else: (data) = self.list_workflow_run_jobs_with_http_info(owner, repo, run, **kwargs) # noqa: E501 return data def list_workflow_run_jobs_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 """Lists all jobs for a workflow run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_workflow_run_jobs_with_http_info(owner, repo, run, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int run: runid of the workflow run (required) :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: ActionWorkflowJobsResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'run', 'status', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_workflow_run_jobs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `list_workflow_run_jobs`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `list_workflow_run_jobs`") # noqa: E501 # verify the required parameter 'run' is set if self.api_client.client_side_validation and ('run' not in params or params['run'] is None): # noqa: E501 raise ValueError("Missing the required parameter `run` when calling `list_workflow_run_jobs`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'run' in params: path_params['run'] = params['run'] # noqa: E501 query_params = [] if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runs/{run}/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionWorkflowJobsResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def reject_repo_transfer(self, owner, repo, **kwargs): # noqa: E501 """Reject a repo transfer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reject_repo_transfer(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to transfer (required) :param str repo: name of the repo to transfer (required) :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.reject_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.reject_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def reject_repo_transfer_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Reject a repo transfer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reject_repo_transfer_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to transfer (required) :param str repo: name of the repo to transfer (required) :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method reject_repo_transfer" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `reject_repo_transfer`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `reject_repo_transfer`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/transfer/reject', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_add_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Add or Update a collaborator to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_collaborator(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the user to add or update as a collaborator (required) :param AddCollaboratorOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 else: (data) = self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 return data def repo_add_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Add or Update a collaborator to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_collaborator_with_http_info(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the user to add or update as a collaborator (required) :param AddCollaboratorOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'collaborator', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_add_collaborator" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_add_collaborator`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_add_collaborator`") # noqa: E501 # verify the required parameter 'collaborator' is set if self.api_client.client_side_validation and ('collaborator' not in params or params['collaborator'] is None): # noqa: E501 raise ValueError("Missing the required parameter `collaborator` when calling `repo_add_collaborator`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'collaborator' in params: path_params['collaborator'] = params['collaborator'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/collaborators/{collaborator}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_add_push_mirror(self, owner, repo, **kwargs): # noqa: E501 """add a push mirror to the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_push_mirror(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreatePushMirrorOption body: :return: PushMirror If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_add_push_mirror_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_add_push_mirror_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_add_push_mirror_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """add a push mirror to the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_push_mirror_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreatePushMirrorOption body: :return: PushMirror If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_add_push_mirror" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_add_push_mirror`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_add_push_mirror`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/push_mirrors', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PushMirror', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_add_team(self, owner, repo, team, **kwargs): # noqa: E501 """Add a team to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_team(owner, repo, team, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str team: team name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_add_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 else: (data) = self.repo_add_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 return data def repo_add_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 """Add a team to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_team_with_http_info(owner, repo, team, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str team: team name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'team'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_add_team" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_add_team`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_add_team`") # noqa: E501 # verify the required parameter 'team' is set if self.api_client.client_side_validation and ('team' not in params or params['team'] is None): # noqa: E501 raise ValueError("Missing the required parameter `team` when calling `repo_add_team`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'team' in params: path_params['team'] = params['team'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/teams/{team}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_add_topic(self, owner, repo, topic, **kwargs): # noqa: E501 """Add a topic to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_topic(owner, repo, topic, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str topic: name of the topic to add (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_add_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 else: (data) = self.repo_add_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 return data def repo_add_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 """Add a topic to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_add_topic_with_http_info(owner, repo, topic, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str topic: name of the topic to add (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'topic'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_add_topic" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_add_topic`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_add_topic`") # noqa: E501 # verify the required parameter 'topic' is set if self.api_client.client_side_validation and ('topic' not in params or params['topic'] is None): # noqa: E501 raise ValueError("Missing the required parameter `topic` when calling `repo_add_topic`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'topic' in params: path_params['topic'] = params['topic'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/topics/{topic}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_apply_diff_patch(self, owner, repo, body, **kwargs): # noqa: E501 """Apply diff patch to repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_apply_diff_patch(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param ApplyDiffPatchFileOptions body: (required) :return: FileResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_apply_diff_patch_with_http_info(owner, repo, body, **kwargs) # noqa: E501 else: (data) = self.repo_apply_diff_patch_with_http_info(owner, repo, body, **kwargs) # noqa: E501 return data def repo_apply_diff_patch_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 """Apply diff patch to repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_apply_diff_patch_with_http_info(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param ApplyDiffPatchFileOptions body: (required) :return: FileResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_apply_diff_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_apply_diff_patch`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_apply_diff_patch`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_apply_diff_patch`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/diffpatch', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FileResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_cancel_scheduled_auto_merge(self, owner, repo, index, **kwargs): # noqa: E501 """Cancel the scheduled auto merge for the given pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_cancel_scheduled_auto_merge(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to merge (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_cancel_scheduled_auto_merge_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Cancel the scheduled auto merge for the given pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to merge (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_cancel_scheduled_auto_merge" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/merge', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_change_files(self, owner, repo, body, **kwargs): # noqa: E501 """Modify multiple files in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_change_files(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param ChangeFilesOptions body: (required) :return: FilesResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_change_files_with_http_info(owner, repo, body, **kwargs) # noqa: E501 else: (data) = self.repo_change_files_with_http_info(owner, repo, body, **kwargs) # noqa: E501 return data def repo_change_files_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 """Modify multiple files in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_change_files_with_http_info(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param ChangeFilesOptions body: (required) :return: FilesResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_change_files" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_change_files`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_change_files`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_change_files`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/contents', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FilesResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_check_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Check if a user is a collaborator of a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_check_collaborator(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the user to check for being a collaborator (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 else: (data) = self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 return data def repo_check_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Check if a user is a collaborator of a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_check_collaborator_with_http_info(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the user to check for being a collaborator (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_check_collaborator" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_check_collaborator`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_check_collaborator`") # noqa: E501 # verify the required parameter 'collaborator' is set if self.api_client.client_side_validation and ('collaborator' not in params or params['collaborator'] is None): # noqa: E501 raise ValueError("Missing the required parameter `collaborator` when calling `repo_check_collaborator`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'collaborator' in params: path_params['collaborator'] = params['collaborator'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/collaborators/{collaborator}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_check_team(self, owner, repo, team, **kwargs): # noqa: E501 """Check if a team is assigned to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_check_team(owner, repo, team, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str team: team name (required) :return: Team If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_check_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 else: (data) = self.repo_check_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 return data def repo_check_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 """Check if a team is assigned to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_check_team_with_http_info(owner, repo, team, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str team: team name (required) :return: Team If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'team'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_check_team" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_check_team`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_check_team`") # noqa: E501 # verify the required parameter 'team' is set if self.api_client.client_side_validation and ('team' not in params or params['team'] is None): # noqa: E501 raise ValueError("Missing the required parameter `team` when calling `repo_check_team`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'team' in params: path_params['team'] = params['team'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/teams/{team}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Team', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_compare_diff(self, owner, repo, basehead, **kwargs): # noqa: E501 """Get commit comparison information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_compare_diff(owner, repo, basehead, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str basehead: compare two branches or commits (required) :return: Compare If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_compare_diff_with_http_info(owner, repo, basehead, **kwargs) # noqa: E501 else: (data) = self.repo_compare_diff_with_http_info(owner, repo, basehead, **kwargs) # noqa: E501 return data def repo_compare_diff_with_http_info(self, owner, repo, basehead, **kwargs): # noqa: E501 """Get commit comparison information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_compare_diff_with_http_info(owner, repo, basehead, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str basehead: compare two branches or commits (required) :return: Compare If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'basehead'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_compare_diff" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_compare_diff`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_compare_diff`") # noqa: E501 # verify the required parameter 'basehead' is set if self.api_client.client_side_validation and ('basehead' not in params or params['basehead'] is None): # noqa: E501 raise ValueError("Missing the required parameter `basehead` when calling `repo_compare_diff`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'basehead' in params: path_params['basehead'] = params['basehead'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/compare/{basehead}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Compare', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_branch(self, owner, repo, **kwargs): # noqa: E501 """Create a branch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_branch(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateBranchRepoOption body: :return: Branch If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_branch_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_branch_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_branch_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a branch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_branch_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateBranchRepoOption body: :return: Branch If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_branch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_branch`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_branch`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branches', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Branch', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_branch_protection(self, owner, repo, **kwargs): # noqa: E501 """Create a branch protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_branch_protection(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateBranchProtectionOption body: :return: BranchProtection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a branch protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_branch_protection_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateBranchProtectionOption body: :return: BranchProtection If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_branch_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branch_protections', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BranchProtection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Create a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_file(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to create (required) :param CreateFileOptions body: (required) :return: FileResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 else: (data) = self.repo_create_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 return data def repo_create_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Create a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_file_with_http_info(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to create (required) :param CreateFileOptions body: (required) :return: FileResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_file" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_file`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_file`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_create_file`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_create_file`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/contents/{filepath}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FileResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_hook(self, owner, repo, **kwargs): # noqa: E501 """Create a hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_hook(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateHookOption body: :return: Hook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_hook_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_hook_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateHookOption body: :return: Hook If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Hook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_key(self, owner, repo, **kwargs): # noqa: E501 """Add a key to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_key(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateKeyOption body: :return: DeployKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Add a key to a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_key_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateKeyOption body: :return: DeployKey If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_key" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_key`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_key`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/keys', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeployKey', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_pull_request(self, owner, repo, **kwargs): # noqa: E501 """Create a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_pull_request(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreatePullRequestOption body: :return: PullRequest If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_pull_request_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_pull_request_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreatePullRequestOption body: :return: PullRequest If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_request`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullRequest', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_pull_review(self, owner, repo, index, body, **kwargs): # noqa: E501 """Create a review to an pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_pull_review(owner, repo, index, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param CreatePullReviewOptions body: (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_pull_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 else: (data) = self.repo_create_pull_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 return data def repo_create_pull_review_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 """Create a review to an pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_pull_review_with_http_info(owner, repo, index, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param CreatePullReviewOptions body: (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_review`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_create_pull_review`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_create_pull_review`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullReview', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_pull_review_requests(self, owner, repo, index, body, **kwargs): # noqa: E501 """create review requests for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_pull_review_requests(owner, repo, index, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param PullReviewRequestOptions body: (required) :return: list[PullReview] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 else: (data) = self.repo_create_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 return data def repo_create_pull_review_requests_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 """create review requests for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_pull_review_requests_with_http_info(owner, repo, index, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param PullReviewRequestOptions body: (required) :return: list[PullReview] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_pull_review_requests" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_review_requests`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_review_requests`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_create_pull_review_requests`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_create_pull_review_requests`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/requested_reviewers', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PullReview]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_release(self, owner, repo, **kwargs): # noqa: E501 """Create a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_release(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateReleaseOption body: :return: Release If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_release_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateReleaseOption body: :return: Release If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_release`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_release`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Release', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_release_attachment(self, owner, repo, id, **kwargs): # noqa: E501 """Create a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_release_attachment(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param str name: name of the attachment :param file attachment: attachment to upload :return: Attachment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_release_attachment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_create_release_attachment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_create_release_attachment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Create a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_release_attachment_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param str name: name of the attachment :param file attachment: attachment to upload :return: Attachment If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'name', 'attachment'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_release_attachment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_release_attachment`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_release_attachment`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_create_release_attachment`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] if 'name' in params: query_params.append(('name', params['name'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} if 'attachment' in params: local_var_files['attachment'] = params['attachment'] # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['multipart/form-data', 'application/octet-stream']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}/assets', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Attachment', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_runner_registration_token(self, owner, repo, **kwargs): # noqa: E501 """Get a repository's actions runner registration token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_runner_registration_token(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_runner_registration_token_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get a repository's actions runner registration token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_runner_registration_token_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_runner_registration_token" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_runner_registration_token`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_runner_registration_token`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runners/registration-token', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_status(self, owner, repo, sha, **kwargs): # noqa: E501 """Create a commit status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_status(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param CreateStatusOption body: :return: CommitStatus If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def repo_create_status_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Create a commit status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_status_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param CreateStatusOption body: :return: CommitStatus If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_status`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_status`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `repo_create_status`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/statuses/{sha}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CommitStatus', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_tag(self, owner, repo, **kwargs): # noqa: E501 """Create a new git tag in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_tag(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateTagOption body: :return: Tag If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_tag_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_tag_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_tag_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a new git tag in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_tag_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateTagOption body: :return: Tag If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_tag" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_tag`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_tag`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tags', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Tag', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_tag_protection(self, owner, repo, **kwargs): # noqa: E501 """Create a tag protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_tag_protection(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateTagProtectionOption body: :return: TagProtection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_tag_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a tag protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_tag_protection_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateTagProtectionOption body: :return: TagProtection If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_tag_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_tag_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_tag_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tag_protections', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TagProtection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_create_wiki_page(self, owner, repo, **kwargs): # noqa: E501 """Create a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_wiki_page(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateWikiPageOptions body: :return: WikiPage If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_create_wiki_page_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_create_wiki_page_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_create_wiki_page_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Create a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_create_wiki_page_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param CreateWikiPageOptions body: :return: WikiPage If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_create_wiki_page" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_create_wiki_page`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_create_wiki_page`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/wiki/new', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WikiPage', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete(self, owner, repo, **kwargs): # noqa: E501 """Delete a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to delete (required) :param str repo: name of the repo to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_delete_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Delete a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to delete (required) :param str repo: name of the repo to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_avatar(self, owner, repo, **kwargs): # noqa: E501 """Delete avatar # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_avatar(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_delete_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_delete_avatar_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Delete avatar # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_avatar_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_avatar" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_avatar`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_avatar`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/avatar', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_branch(self, owner, repo, branch, **kwargs): # noqa: E501 """Delete a specific branch from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_branch(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str branch: branch to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 else: (data) = self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 return data def repo_delete_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 """Delete a specific branch from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_branch_with_http_info(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str branch: branch to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'branch'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_branch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch`") # noqa: E501 # verify the required parameter 'branch' is set if self.api_client.client_side_validation and ('branch' not in params or params['branch'] is None): # noqa: E501 raise ValueError("Missing the required parameter `branch` when calling `repo_delete_branch`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'branch' in params: path_params['branch'] = params['branch'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branches/{branch}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 """Delete a specific branch protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_branch_protection(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: name of protected branch (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 else: (data) = self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 return data def repo_delete_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 """Delete a specific branch protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_branch_protection_with_http_info(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: name of protected branch (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch_protection`") # noqa: E501 # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in params or params['name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `name` when calling `repo_delete_branch_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'name' in params: path_params['name'] = params['name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branch_protections/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Delete a collaborator from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_collaborator(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the collaborator to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 else: (data) = self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 return data def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Delete a collaborator from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_collaborator_with_http_info(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the collaborator to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_collaborator" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_collaborator`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_collaborator`") # noqa: E501 # verify the required parameter 'collaborator' is set if self.api_client.client_side_validation and ('collaborator' not in params or params['collaborator'] is None): # noqa: E501 raise ValueError("Missing the required parameter `collaborator` when calling `repo_delete_collaborator`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'collaborator' in params: path_params['collaborator'] = params['collaborator'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/collaborators/{collaborator}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Delete a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_file(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to delete (required) :param DeleteFileOptions body: (required) :return: FileDeleteResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 else: (data) = self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 return data def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Delete a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_file_with_http_info(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to delete (required) :param DeleteFileOptions body: (required) :return: FileDeleteResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_file" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_file`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_file`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_delete_file`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_delete_file`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/contents/{filepath}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FileDeleteResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a Git hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_git_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str id: id of the hook to get (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a Git hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_git_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str id: id of the hook to get (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_git_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_git_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_git_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_delete_git_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/git/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_hook(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the hook to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the hook to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_delete_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_key(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a key from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_key(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the key to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a key from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_key_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the key to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_key" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_key`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_key`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_delete_key`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/keys/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 """Delete a specific review from a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_pull_review(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: (data) = self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data def repo_delete_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 """Delete a specific review from a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_pull_review_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_pull_review`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_delete_pull_review`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_delete_pull_review`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_pull_review_requests(self, owner, repo, index, body, **kwargs): # noqa: E501 """cancel review requests for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_pull_review_requests(owner, repo, index, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param PullReviewRequestOptions body: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 else: (data) = self.repo_delete_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 return data def repo_delete_pull_review_requests_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 """cancel review requests for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_pull_review_requests_with_http_info(owner, repo, index, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param PullReviewRequestOptions body: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_pull_review_requests" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_pull_review_requests`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_pull_review_requests`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_delete_pull_review_requests`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_delete_pull_review_requests`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/requested_reviewers', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_push_mirror(self, owner, repo, name, **kwargs): # noqa: E501 """deletes a push mirror from a repository by remoteName # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_push_mirror(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: remote name of the pushMirror (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_push_mirror_with_http_info(owner, repo, name, **kwargs) # noqa: E501 else: (data) = self.repo_delete_push_mirror_with_http_info(owner, repo, name, **kwargs) # noqa: E501 return data def repo_delete_push_mirror_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 """deletes a push mirror from a repository by remoteName # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_push_mirror_with_http_info(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: remote name of the pushMirror (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_push_mirror" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_push_mirror`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_push_mirror`") # noqa: E501 # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in params or params['name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `name` when calling `repo_delete_push_mirror`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'name' in params: path_params['name'] = params['name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/push_mirrors/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_release(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_release(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_release_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_delete_release`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 """Delete a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_release_attachment(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param int attachment_id: id of the attachment to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 else: (data) = self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 return data def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 """Delete a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param int attachment_id: id of the attachment to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_release_attachment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_attachment`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_attachment`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_delete_release_attachment`") # noqa: E501 # verify the required parameter 'attachment_id' is set if self.api_client.client_side_validation and ('attachment_id' not in params or params['attachment_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `attachment_id` when calling `repo_delete_release_attachment`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 if 'attachment_id' in params: path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_release_by_tag(self, owner, repo, tag, **kwargs): # noqa: E501 """Delete a release by tag name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_release_by_tag(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: tag name of the release to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 else: (data) = self.repo_delete_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 return data def repo_delete_release_by_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 """Delete a release by tag name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_release_by_tag_with_http_info(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: tag name of the release to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'tag'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_release_by_tag" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_by_tag`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_by_tag`") # noqa: E501 # verify the required parameter 'tag' is set if self.api_client.client_side_validation and ('tag' not in params or params['tag'] is None): # noqa: E501 raise ValueError("Missing the required parameter `tag` when calling `repo_delete_release_by_tag`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'tag' in params: path_params['tag'] = params['tag'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/tags/{tag}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_tag(self, owner, repo, tag, **kwargs): # noqa: E501 """Delete a repository's tag by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_tag(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: name of tag to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 else: (data) = self.repo_delete_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 return data def repo_delete_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 """Delete a repository's tag by name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_tag_with_http_info(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: name of tag to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'tag'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_tag" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_tag`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_tag`") # noqa: E501 # verify the required parameter 'tag' is set if self.api_client.client_side_validation and ('tag' not in params or params['tag'] is None): # noqa: E501 raise ValueError("Missing the required parameter `tag` when calling `repo_delete_tag`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'tag' in params: path_params['tag'] = params['tag'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tags/{tag}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a specific tag protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_tag_protection(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of protected tag (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_delete_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_delete_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Delete a specific tag protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_tag_protection_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of protected tag (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_tag_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_tag_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_tag_protection`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_delete_tag_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tag_protections/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_team(self, owner, repo, team, **kwargs): # noqa: E501 """Delete a team from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_team(owner, repo, team, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str team: team name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 else: (data) = self.repo_delete_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 return data def repo_delete_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 """Delete a team from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_team_with_http_info(owner, repo, team, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str team: team name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'team'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_team" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_team`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_team`") # noqa: E501 # verify the required parameter 'team' is set if self.api_client.client_side_validation and ('team' not in params or params['team'] is None): # noqa: E501 raise ValueError("Missing the required parameter `team` when calling `repo_delete_team`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'team' in params: path_params['team'] = params['team'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/teams/{team}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_topic(self, owner, repo, topic, **kwargs): # noqa: E501 """Delete a topic from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_topic(owner, repo, topic, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str topic: name of the topic to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 else: (data) = self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 return data def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 """Delete a topic from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_topic_with_http_info(owner, repo, topic, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str topic: name of the topic to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'topic'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_topic" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_topic`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_topic`") # noqa: E501 # verify the required parameter 'topic' is set if self.api_client.client_side_validation and ('topic' not in params or params['topic'] is None): # noqa: E501 raise ValueError("Missing the required parameter `topic` when calling `repo_delete_topic`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'topic' in params: path_params['topic'] = params['topic'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/topics/{topic}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_delete_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 """Delete a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_wiki_page(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_delete_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 else: (data) = self.repo_delete_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 return data def repo_delete_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 """Delete a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_delete_wiki_page_with_http_info(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_delete_wiki_page" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_delete_wiki_page`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_delete_wiki_page`") # noqa: E501 # verify the required parameter 'page_name' is set if self.api_client.client_side_validation and ('page_name' not in params or params['page_name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `page_name` when calling `repo_delete_wiki_page`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'page_name' in params: path_params['pageName'] = params['page_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/wiki/page/{pageName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_dismiss_pull_review(self, owner, repo, index, id, body, **kwargs): # noqa: E501 """Dismiss a review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_dismiss_pull_review(owner, repo, index, id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :param DismissPullReviewOptions body: (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 else: (data) = self.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 return data def repo_dismiss_pull_review_with_http_info(self, owner, repo, index, id, body, **kwargs): # noqa: E501 """Dismiss a review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :param DismissPullReviewOptions body: (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_dismiss_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_dismiss_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_dismiss_pull_review`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_dismiss_pull_review`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_dismiss_pull_review`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_dismiss_pull_review`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullReview', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_download_commit_diff_or_patch(self, owner, repo, sha, diff_type, **kwargs): # noqa: E501 """Get a commit's diff or patch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_download_commit_diff_or_patch(owner, repo, sha, diff_type, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: SHA of the commit to get (required) :param str diff_type: whether the output is diff or patch (required) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, **kwargs) # noqa: E501 else: (data) = self.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, **kwargs) # noqa: E501 return data def repo_download_commit_diff_or_patch_with_http_info(self, owner, repo, sha, diff_type, **kwargs): # noqa: E501 """Get a commit's diff or patch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: SHA of the commit to get (required) :param str diff_type: whether the output is diff or patch (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha', 'diff_type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_download_commit_diff_or_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 # verify the required parameter 'diff_type' is set if self.api_client.client_side_validation and ('diff_type' not in params or params['diff_type'] is None): # noqa: E501 raise ValueError("Missing the required parameter `diff_type` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 if 'diff_type' in params: path_params['diffType'] = params['diff_type'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/commits/{sha}.{diffType}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_download_pull_diff_or_patch(self, owner, repo, index, diff_type, **kwargs): # noqa: E501 """Get a pull request diff or patch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_download_pull_diff_or_patch(owner, repo, index, diff_type, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param str diff_type: whether the output is diff or patch (required) :param bool binary: whether to include binary file changes. if true, the diff is applicable with `git apply` :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, **kwargs) # noqa: E501 else: (data) = self.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, **kwargs) # noqa: E501 return data def repo_download_pull_diff_or_patch_with_http_info(self, owner, repo, index, diff_type, **kwargs): # noqa: E501 """Get a pull request diff or patch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param str diff_type: whether the output is diff or patch (required) :param bool binary: whether to include binary file changes. if true, the diff is applicable with `git apply` :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'diff_type', 'binary'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_download_pull_diff_or_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 # verify the required parameter 'diff_type' is set if self.api_client.client_side_validation and ('diff_type' not in params or params['diff_type'] is None): # noqa: E501 raise ValueError("Missing the required parameter `diff_type` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 if 'diff_type' in params: path_params['diffType'] = params['diff_type'] # noqa: E501 query_params = [] if 'binary' in params: query_params.append(('binary', params['binary'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}.{diffType}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit(self, owner, repo, **kwargs): # noqa: E501 """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to edit (required) :param str repo: name of the repo to edit (required) :param EditRepoOption body: Properties of a repo that you can edit :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to edit (required) :param str repo: name of the repo to edit (required) :param EditRepoOption body: Properties of a repo that you can edit :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 """Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_branch_protection(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: name of protected branch (required) :param EditBranchProtectionOption body: :return: BranchProtection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 else: (data) = self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 return data def repo_edit_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 """Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_branch_protection_with_http_info(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: name of protected branch (required) :param EditBranchProtectionOption body: :return: BranchProtection If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'name', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_branch_protection`") # noqa: E501 # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in params or params['name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `name` when calling `repo_edit_branch_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'name' in params: path_params['name'] = params['name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branch_protections/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BranchProtection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 """Edit a Git hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_git_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str id: id of the hook to get (required) :param EditGitHookOption body: :return: GitHook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Edit a Git hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_git_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str id: id of the hook to get (required) :param EditGitHookOption body: :return: GitHook If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_git_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_git_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_git_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_edit_git_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/git/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GitHook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_hook(self, owner, repo, id, **kwargs): # noqa: E501 """Edit a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: index of the hook (required) :param EditHookOption body: :return: Hook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Edit a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: index of the hook (required) :param EditHookOption body: :return: Hook If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_edit_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Hook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 """Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_pull_request(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to edit (required) :param EditPullRequestOption body: :return: PullRequest If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_pull_request_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to edit (required) :param EditPullRequestOption body: :return: PullRequest If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_pull_request`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_edit_pull_request`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullRequest', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_release(self, owner, repo, id, **kwargs): # noqa: E501 """Update a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_release(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release to edit (required) :param EditReleaseOption body: :return: Release If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Update a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_release_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release to edit (required) :param EditReleaseOption body: :return: Release If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_edit_release`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Release', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 """Edit a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_release_attachment(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param int attachment_id: id of the attachment to edit (required) :param EditAttachmentOptions body: :return: Attachment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 else: (data) = self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 return data def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 """Edit a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param int attachment_id: id of the attachment to edit (required) :param EditAttachmentOptions body: :return: Attachment If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'attachment_id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_release_attachment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release_attachment`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release_attachment`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_edit_release_attachment`") # noqa: E501 # verify the required parameter 'attachment_id' is set if self.api_client.client_side_validation and ('attachment_id' not in params or params['attachment_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `attachment_id` when calling `repo_edit_release_attachment`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 if 'attachment_id' in params: path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Attachment', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 """Edit a tag protections for a repository. Only fields that are set will be changed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_tag_protection(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of protected tag (required) :param EditTagProtectionOption body: :return: TagProtection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_edit_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_edit_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Edit a tag protections for a repository. Only fields that are set will be changed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_tag_protection_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of protected tag (required) :param EditTagProtectionOption body: :return: TagProtection If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_tag_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_tag_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_tag_protection`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_edit_tag_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tag_protections/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TagProtection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_edit_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 """Edit a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_wiki_page(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :param CreateWikiPageOptions body: :return: WikiPage If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_edit_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 else: (data) = self.repo_edit_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 return data def repo_edit_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 """Edit a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_edit_wiki_page_with_http_info(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :param CreateWikiPageOptions body: :return: WikiPage If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page_name', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_edit_wiki_page" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_edit_wiki_page`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_edit_wiki_page`") # noqa: E501 # verify the required parameter 'page_name' is set if self.api_client.client_side_validation and ('page_name' not in params or params['page_name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `page_name` when calling `repo_edit_wiki_page`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'page_name' in params: path_params['pageName'] = params['page_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/wiki/page/{pageName}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WikiPage', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get(self, owner, repo, **kwargs): # noqa: E501 """Get a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_all_commits(self, owner, repo, **kwargs): # noqa: E501 """Get a list of all commits from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_all_commits(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: SHA or branch to start listing commits from (usually 'master') :param str path: filepath of a file/dir :param datetime since: Only commits after this date will be returned (ISO 8601 format) :param datetime until: Only commits before this date will be returned (ISO 8601 format) :param bool stat: include diff stats for every commit (disable for speedup, default 'true') :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :param int page: page number of results to return (1-based) :param int limit: page size of results (ignored if used with 'path') :param str _not: commits that match the given specifier will not be listed. :return: list[Commit] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get a list of all commits from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_all_commits_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: SHA or branch to start listing commits from (usually 'master') :param str path: filepath of a file/dir :param datetime since: Only commits after this date will be returned (ISO 8601 format) :param datetime until: Only commits before this date will be returned (ISO 8601 format) :param bool stat: include diff stats for every commit (disable for speedup, default 'true') :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :param int page: page number of results to return (1-based) :param int limit: page size of results (ignored if used with 'path') :param str _not: commits that match the given specifier will not be listed. :return: list[Commit] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha', 'path', 'since', 'until', 'stat', 'verification', 'files', 'page', 'limit', '_not'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_all_commits" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_all_commits`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_all_commits`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'sha' in params: query_params.append(('sha', params['sha'])) # noqa: E501 if 'path' in params: query_params.append(('path', params['path'])) # noqa: E501 if 'since' in params: query_params.append(('since', params['since'])) # noqa: E501 if 'until' in params: query_params.append(('until', params['until'])) # noqa: E501 if 'stat' in params: query_params.append(('stat', params['stat'])) # noqa: E501 if 'verification' in params: query_params.append(('verification', params['verification'])) # noqa: E501 if 'files' in params: query_params.append(('files', params['files'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if '_not' in params: query_params.append(('not', params['_not'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/commits', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Commit]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_archive(self, owner, repo, archive, **kwargs): # noqa: E501 """Get an archive of a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_archive(owner, repo, archive, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str archive: the git reference for download with attached archive format (e.g. master.zip) (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 else: (data) = self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 return data def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # noqa: E501 """Get an archive of a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_archive_with_http_info(owner, repo, archive, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str archive: the git reference for download with attached archive format (e.g. master.zip) (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'archive'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_archive" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_archive`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_archive`") # noqa: E501 # verify the required parameter 'archive' is set if self.api_client.client_side_validation and ('archive' not in params or params['archive'] is None): # noqa: E501 raise ValueError("Missing the required parameter `archive` when calling `repo_get_archive`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'archive' in params: path_params['archive'] = params['archive'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/archive/{archive}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_assignees(self, owner, repo, **kwargs): # noqa: E501 """Return all users that have write access and can be assigned to issues # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_assignees(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_assignees_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_assignees_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_assignees_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Return all users that have write access and can be assigned to issues # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_assignees_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_assignees" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_assignees`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_assignees`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/assignees', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[User]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_branch(self, owner, repo, branch, **kwargs): # noqa: E501 """Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_branch(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str branch: branch to get (required) :return: Branch If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 else: (data) = self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 return data def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 """Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_branch_with_http_info(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str branch: branch to get (required) :return: Branch If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'branch'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_branch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch`") # noqa: E501 # verify the required parameter 'branch' is set if self.api_client.client_side_validation and ('branch' not in params or params['branch'] is None): # noqa: E501 raise ValueError("Missing the required parameter `branch` when calling `repo_get_branch`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'branch' in params: path_params['branch'] = params['branch'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branches/{branch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Branch', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 """Get a specific branch protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_branch_protection(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: name of protected branch (required) :return: BranchProtection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 else: (data) = self.repo_get_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 return data def repo_get_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 """Get a specific branch protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_branch_protection_with_http_info(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: name of protected branch (required) :return: BranchProtection If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch_protection`") # noqa: E501 # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in params or params['name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `name` when calling `repo_get_branch_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'name' in params: path_params['name'] = params['name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branch_protections/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BranchProtection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_by_id(self, id, **kwargs): # noqa: E501 """Get a repository by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_by_id(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of the repo to get (required) :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 return data def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 """Get a repository by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_by_id_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: id of the repo to get (required) :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_by_id" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_by_id`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repositories/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_combined_status_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_combined_status_by_ref(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: name of branch/tag/commit (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: CombinedStatus If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 else: (data) = self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 return data def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: name of branch/tag/commit (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: CombinedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'ref', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_combined_status_by_ref" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_combined_status_by_ref`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_combined_status_by_ref`") # noqa: E501 # verify the required parameter 'ref' is set if self.api_client.client_side_validation and ('ref' not in params or params['ref'] is None): # noqa: E501 raise ValueError("Missing the required parameter `ref` when calling `repo_get_combined_status_by_ref`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'ref' in params: path_params['ref'] = params['ref'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/commits/{ref}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CombinedStatus', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_commit_pull_request(self, owner, repo, sha, **kwargs): # noqa: E501 """Get the merged pull request of the commit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_commit_pull_request(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: SHA of the commit to get (required) :return: PullRequest If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_commit_pull_request_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.repo_get_commit_pull_request_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def repo_get_commit_pull_request_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Get the merged pull request of the commit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_commit_pull_request_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: SHA of the commit to get (required) :return: PullRequest If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_commit_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_commit_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_commit_pull_request`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `repo_get_commit_pull_request`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/commits/{sha}/pull', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullRequest', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_contents(self, owner, repo, filepath, **kwargs): # noqa: E501 """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir. # noqa: E501 This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_contents(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the dir, file, symlink or submodule in the repo (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: ContentsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 else: (data) = self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 return data def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir. # noqa: E501 This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_contents_with_http_info(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the dir, file, symlink or submodule in the repo (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: ContentsResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_contents" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_get_contents`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/contents/{filepath}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ContentsResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_contents_ext(self, owner, repo, filepath, **kwargs): # noqa: E501 """The extended \"contents\" API, to get file metadata and/or content, or list a directory. # noqa: E501 It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_contents_ext(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the dir, file, symlink or submodule in the repo. Swagger requires path parameter to be \"required\", you can leave it empty or pass a single dot (\".\") to get the root directory. (required) :param str ref: the name of the commit/branch/tag, default to the repository’s default branch. :param str includes: By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, \"lfs_metadata\" will try to retrieve LFS metadata, \"commit_metadata\" will try to retrieve commit metadata, and \"commit_message\" will try to retrieve commit message. :return: ContentsExtResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_contents_ext_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 else: (data) = self.repo_get_contents_ext_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 return data def repo_get_contents_ext_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 """The extended \"contents\" API, to get file metadata and/or content, or list a directory. # noqa: E501 It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_contents_ext_with_http_info(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the dir, file, symlink or submodule in the repo. Swagger requires path parameter to be \"required\", you can leave it empty or pass a single dot (\".\") to get the root directory. (required) :param str ref: the name of the commit/branch/tag, default to the repository’s default branch. :param str includes: By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, \"lfs_metadata\" will try to retrieve LFS metadata, \"commit_metadata\" will try to retrieve commit metadata, and \"commit_message\" will try to retrieve commit message. :return: ContentsExtResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'ref', 'includes'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_contents_ext" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents_ext`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents_ext`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_get_contents_ext`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 if 'includes' in params: query_params.append(('includes', params['includes'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/contents-ext/{filepath}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ContentsExtResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_contents_list(self, owner, repo, **kwargs): # noqa: E501 """Gets the metadata of all the entries of the root dir. # noqa: E501 This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_contents_list(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: list[ContentsResponse] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Gets the metadata of all the entries of the root dir. # noqa: E501 This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_contents_list_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: list[ContentsResponse] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_contents_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents_list`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents_list`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/contents', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ContentsResponse]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_editor_config(self, owner, repo, filepath, **kwargs): # noqa: E501 """Get the EditorConfig definitions of a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_editor_config(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: filepath of file to get (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 else: (data) = self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 return data def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 """Get the EditorConfig definitions of a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_editor_config_with_http_info(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: filepath of file to get (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_editor_config" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_editor_config`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_editor_config`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_get_editor_config`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/editorconfig/{filepath}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_file_contents(self, owner, repo, body, **kwargs): # noqa: E501 """Get the metadata and contents of requested files # noqa: E501 See the POST method. This GET method supports using JSON encoded request body in query parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_file_contents(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str body: The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]} (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: list[ContentsResponse] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_file_contents_with_http_info(owner, repo, body, **kwargs) # noqa: E501 else: (data) = self.repo_get_file_contents_with_http_info(owner, repo, body, **kwargs) # noqa: E501 return data def repo_get_file_contents_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 """Get the metadata and contents of requested files # noqa: E501 See the POST method. This GET method supports using JSON encoded request body in query parameter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_file_contents_with_http_info(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str body: The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]} (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: list[ContentsResponse] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_file_contents" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_file_contents`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_file_contents`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_get_file_contents`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 if 'body' in params: query_params.append(('body', params['body'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/file-contents', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ContentsResponse]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_file_contents_post(self, owner, repo, body, **kwargs): # noqa: E501 """Get the metadata and contents of requested files # noqa: E501 Uses automatic pagination based on default page size and max response size and returns the maximum allowed number of files. Files which could not be retrieved are null. Files which are too large are being returned with `encoding == null`, `content == null` and `size > 0`, they can be requested separately by using the `download_url`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_file_contents_post(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param GetFilesOptions body: (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: list[ContentsResponse] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_file_contents_post_with_http_info(owner, repo, body, **kwargs) # noqa: E501 else: (data) = self.repo_get_file_contents_post_with_http_info(owner, repo, body, **kwargs) # noqa: E501 return data def repo_get_file_contents_post_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 """Get the metadata and contents of requested files # noqa: E501 Uses automatic pagination based on default page size and max response size and returns the maximum allowed number of files. Files which could not be retrieved are null. Files which are too large are being returned with `encoding == null`, `content == null` and `size > 0`, they can be requested separately by using the `download_url`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_file_contents_post_with_http_info(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param GetFilesOptions body: (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. :return: list[ContentsResponse] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_file_contents_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_file_contents_post`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_file_contents_post`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_get_file_contents_post`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/file-contents', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ContentsResponse]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 """Get a Git hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_git_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str id: id of the hook to get (required) :return: GitHook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Get a Git hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_git_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str id: id of the hook to get (required) :return: GitHook If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_git_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_git_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_git_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_git_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/git/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GitHook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_hook(self, owner, repo, id, **kwargs): # noqa: E501 """Get a hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the hook to get (required) :return: Hook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Get a hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the hook to get (required) :return: Hook If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Hook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_issue_config(self, owner, repo, **kwargs): # noqa: E501 """Returns the issue config for a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_issue_config(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: IssueConfig If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_issue_config_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Returns the issue config for a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_issue_config_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: IssueConfig If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_issue_config" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_issue_config`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_issue_config`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/issue_config', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IssueConfig', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_issue_templates(self, owner, repo, **kwargs): # noqa: E501 """Get available issue templates for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_issue_templates(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[IssueTemplate] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_issue_templates_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_issue_templates_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_issue_templates_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get available issue templates for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_issue_templates_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[IssueTemplate] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_issue_templates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_issue_templates`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_issue_templates`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/issue_templates', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[IssueTemplate]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_key(self, owner, repo, id, **kwargs): # noqa: E501 """Get a repository's key by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_key(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the key to get (required) :return: DeployKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Get a repository's key by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_key_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the key to get (required) :return: DeployKey If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_key" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_key`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_key`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_key`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/keys/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeployKey', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_languages(self, owner, repo, **kwargs): # noqa: E501 """Get languages and number of bytes of code written # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_languages(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: dict(str, int) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_languages_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_languages_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_languages_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get languages and number of bytes of code written # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_languages_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: dict(str, int) If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_languages" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_languages`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_languages`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/languages', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='dict(str, int)', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_latest_release(self, owner, repo, **kwargs): # noqa: E501 """Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_latest_release(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: Release If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_latest_release_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_latest_release_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_latest_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_latest_release_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: Release If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_latest_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_latest_release`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_latest_release`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/latest', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Release', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_licenses(self, owner, repo, **kwargs): # noqa: E501 """Get repo licenses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_licenses(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[str] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_licenses_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_licenses_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_licenses_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get repo licenses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_licenses_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[str] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_licenses" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_licenses`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_licenses`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/licenses', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_note(self, owner, repo, sha, **kwargs): # noqa: E501 """Get a note corresponding to a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_note(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: a git ref or commit sha (required) :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :return: Note If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_note_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.repo_get_note_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def repo_get_note_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Get a note corresponding to a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_note_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: a git ref or commit sha (required) :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :return: Note If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha', 'verification', 'files'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_note" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_note`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_note`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `repo_get_note`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] if 'verification' in params: query_params.append(('verification', params['verification'])) # noqa: E501 if 'files' in params: query_params.append(('files', params['files'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/notes/{sha}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Note', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 """Get a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :return: PullRequest If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Get a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :return: PullRequest If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullRequest', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_pull_request_by_base_head(self, owner, repo, base, head, **kwargs): # noqa: E501 """Get a pull request by base and head # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request_by_base_head(owner, repo, base, head, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str base: base of the pull request to get (required) :param str head: head of the pull request to get (required) :return: PullRequest If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_pull_request_by_base_head_with_http_info(owner, repo, base, head, **kwargs) # noqa: E501 else: (data) = self.repo_get_pull_request_by_base_head_with_http_info(owner, repo, base, head, **kwargs) # noqa: E501 return data def repo_get_pull_request_by_base_head_with_http_info(self, owner, repo, base, head, **kwargs): # noqa: E501 """Get a pull request by base and head # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request_by_base_head_with_http_info(owner, repo, base, head, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str base: base of the pull request to get (required) :param str head: head of the pull request to get (required) :return: PullRequest If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'base', 'head'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_pull_request_by_base_head" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 # verify the required parameter 'base' is set if self.api_client.client_side_validation and ('base' not in params or params['base'] is None): # noqa: E501 raise ValueError("Missing the required parameter `base` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 # verify the required parameter 'head' is set if self.api_client.client_side_validation and ('head' not in params or params['head'] is None): # noqa: E501 raise ValueError("Missing the required parameter `head` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'base' in params: path_params['base'] = params['base'] # noqa: E501 if 'head' in params: path_params['head'] = params['head'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{base}/{head}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullRequest', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_pull_request_commits(self, owner, repo, index, **kwargs): # noqa: E501 """Get commits for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request_commits(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :return: list[Commit] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_pull_request_commits_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_get_pull_request_commits_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_get_pull_request_commits_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Get commits for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request_commits_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :return: list[Commit] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'page', 'limit', 'verification', 'files'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_pull_request_commits" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_commits`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_commits`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request_commits`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 if 'verification' in params: query_params.append(('verification', params['verification'])) # noqa: E501 if 'files' in params: query_params.append(('files', params['files'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/commits', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Commit]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_pull_request_files(self, owner, repo, index, **kwargs): # noqa: E501 """Get changed files for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request_files(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param str skip_to: skip to given file :param str whitespace: whitespace behavior :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[ChangedFile] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_pull_request_files_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_get_pull_request_files_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_get_pull_request_files_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Get changed files for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_request_files_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param str skip_to: skip to given file :param str whitespace: whitespace behavior :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[ChangedFile] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'skip_to', 'whitespace', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_pull_request_files" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_files`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_files`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request_files`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] if 'skip_to' in params: query_params.append(('skip-to', params['skip_to'])) # noqa: E501 if 'whitespace' in params: query_params.append(('whitespace', params['whitespace'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/files', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ChangedFile]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_review(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: (data) = self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data def repo_get_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_review_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullReview', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_pull_review_comments(self, owner, repo, index, id, **kwargs): # noqa: E501 """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_review_comments(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: list[PullReviewComment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: (data) = self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data def repo_get_pull_review_comments_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: list[PullReviewComment] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_pull_review_comments" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review_comments`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review_comments`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review_comments`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review_comments`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PullReviewComment]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_push_mirror_by_remote_name(self, owner, repo, name, **kwargs): # noqa: E501 """Get push mirror of the repository by remoteName # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_push_mirror_by_remote_name(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: remote name of push mirror (required) :return: PushMirror If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_push_mirror_by_remote_name_with_http_info(owner, repo, name, **kwargs) # noqa: E501 else: (data) = self.repo_get_push_mirror_by_remote_name_with_http_info(owner, repo, name, **kwargs) # noqa: E501 return data def repo_get_push_mirror_by_remote_name_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 """Get push mirror of the repository by remoteName # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_push_mirror_by_remote_name_with_http_info(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str name: remote name of push mirror (required) :return: PushMirror If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_push_mirror_by_remote_name" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in params or params['name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `name` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'name' in params: path_params['name'] = params['name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/push_mirrors/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PushMirror', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_raw_file(self, owner, repo, filepath, **kwargs): # noqa: E501 """Get a file from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_raw_file(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 else: (data) = self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 return data def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 """Get a file from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_raw_file_with_http_info(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch :return: file If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_raw_file" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/octet-stream']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/raw/{filepath}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='file', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_raw_file_or_lfs(self, owner, repo, filepath, **kwargs): # noqa: E501 """Get a file or it's LFS object from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_raw_file_or_lfs(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_raw_file_or_lfs_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 else: (data) = self.repo_get_raw_file_or_lfs_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 return data def repo_get_raw_file_or_lfs_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 """Get a file or it's LFS object from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_raw_file_or_lfs_with_http_info(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch :return: file If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_raw_file_or_lfs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/octet-stream']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/media/{filepath}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='file', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_release(self, owner, repo, id, **kwargs): # noqa: E501 """Get a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_release(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release to get (required) :return: Release If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Get a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_release_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release to get (required) :return: Release If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_release`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_release`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_release`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Release', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 """Get a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_release_attachment(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param int attachment_id: id of the attachment to get (required) :return: Attachment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 else: (data) = self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 return data def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 """Get a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :param int attachment_id: id of the attachment to get (required) :return: Attachment If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_release_attachment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_attachment`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_attachment`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_release_attachment`") # noqa: E501 # verify the required parameter 'attachment_id' is set if self.api_client.client_side_validation and ('attachment_id' not in params or params['attachment_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `attachment_id` when calling `repo_get_release_attachment`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 if 'attachment_id' in params: path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Attachment', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_release_by_tag(self, owner, repo, tag, **kwargs): # noqa: E501 """Get a release by tag name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_release_by_tag(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: tag name of the release to get (required) :return: Release If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 else: (data) = self.repo_get_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 return data def repo_get_release_by_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 """Get a release by tag name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_release_by_tag_with_http_info(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: tag name of the release to get (required) :return: Release If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'tag'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_release_by_tag" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_by_tag`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_by_tag`") # noqa: E501 # verify the required parameter 'tag' is set if self.api_client.client_side_validation and ('tag' not in params or params['tag'] is None): # noqa: E501 raise ValueError("Missing the required parameter `tag` when calling `repo_get_release_by_tag`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'tag' in params: path_params['tag'] = params['tag'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/tags/{tag}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Release', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_repo_permissions(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Get repository permissions for a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_repo_permissions(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the collaborator whose permissions are to be obtained (required) :return: RepoCollaboratorPermission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_repo_permissions_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 else: (data) = self.repo_get_repo_permissions_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 return data def repo_get_repo_permissions_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 """Get repository permissions for a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_repo_permissions_with_http_info(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str collaborator: username of the collaborator whose permissions are to be obtained (required) :return: RepoCollaboratorPermission If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_repo_permissions" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_repo_permissions`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_repo_permissions`") # noqa: E501 # verify the required parameter 'collaborator' is set if self.api_client.client_side_validation and ('collaborator' not in params or params['collaborator'] is None): # noqa: E501 raise ValueError("Missing the required parameter `collaborator` when calling `repo_get_repo_permissions`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'collaborator' in params: path_params['collaborator'] = params['collaborator'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/collaborators/{collaborator}/permission', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RepoCollaboratorPermission', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_reviewers(self, owner, repo, **kwargs): # noqa: E501 """Return all users that can be requested to review in this repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_reviewers(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_reviewers_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_reviewers_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_reviewers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Return all users that can be requested to review in this repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_reviewers_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_reviewers" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_reviewers`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_reviewers`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/reviewers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[User]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_runner_registration_token(self, owner, repo, **kwargs): # noqa: E501 """Get a repository's actions runner registration token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_runner_registration_token(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_runner_registration_token_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get a repository's actions runner registration token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_runner_registration_token_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_runner_registration_token" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_runner_registration_token`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_runner_registration_token`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/runners/registration-token', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_single_commit(self, owner, repo, sha, **kwargs): # noqa: E501 """Get a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_single_commit(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: a git ref or commit sha (required) :param bool stat: include diff stats for every commit (disable for speedup, default 'true') :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :return: Commit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Get a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_single_commit_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: a git ref or commit sha (required) :param bool stat: include diff stats for every commit (disable for speedup, default 'true') :param bool verification: include verification for every commit (disable for speedup, default 'true') :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') :return: Commit If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha', 'stat', 'verification', 'files'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_single_commit" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `repo_get_single_commit`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] if 'stat' in params: query_params.append(('stat', params['stat'])) # noqa: E501 if 'verification' in params: query_params.append(('verification', params['verification'])) # noqa: E501 if 'files' in params: query_params.append(('files', params['files'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/commits/{sha}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Commit', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_tag(self, owner, repo, tag, **kwargs): # noqa: E501 """Get the tag of a repository by tag name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_tag(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: name of tag (required) :return: Tag If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 else: (data) = self.repo_get_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 return data def repo_get_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 """Get the tag of a repository by tag name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_tag_with_http_info(owner, repo, tag, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str tag: name of tag (required) :return: Tag If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'tag'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_tag" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_tag`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_tag`") # noqa: E501 # verify the required parameter 'tag' is set if self.api_client.client_side_validation and ('tag' not in params or params['tag'] is None): # noqa: E501 raise ValueError("Missing the required parameter `tag` when calling `repo_get_tag`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'tag' in params: path_params['tag'] = params['tag'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tags/{tag}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Tag', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 """Get a specific tag protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_tag_protection(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the tag protect to get (required) :return: TagProtection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_get_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_get_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Get a specific tag protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_tag_protection_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the tag protect to get (required) :return: TagProtection If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_tag_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_tag_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_tag_protection`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_get_tag_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tag_protections/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TagProtection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 """Get a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_wiki_page(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :return: WikiPage If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 else: (data) = self.repo_get_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 return data def repo_get_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 """Get a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_wiki_page_with_http_info(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :return: WikiPage If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_wiki_page" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_page`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_page`") # noqa: E501 # verify the required parameter 'page_name' is set if self.api_client.client_side_validation and ('page_name' not in params or params['page_name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `page_name` when calling `repo_get_wiki_page`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'page_name' in params: path_params['pageName'] = params['page_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/wiki/page/{pageName}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WikiPage', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_wiki_page_revisions(self, owner, repo, page_name, **kwargs): # noqa: E501 """Get revisions of a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_wiki_page_revisions(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :param int page: page number of results to return (1-based) :return: WikiCommitList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_wiki_page_revisions_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 else: (data) = self.repo_get_wiki_page_revisions_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 return data def repo_get_wiki_page_revisions_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 """Get revisions of a wiki page # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_wiki_page_revisions_with_http_info(owner, repo, page_name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str page_name: name of the page (required) :param int page: page number of results to return (1-based) :return: WikiCommitList If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page_name', 'page'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_wiki_page_revisions" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_page_revisions`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_page_revisions`") # noqa: E501 # verify the required parameter 'page_name' is set if self.api_client.client_side_validation and ('page_name' not in params or params['page_name'] is None): # noqa: E501 raise ValueError("Missing the required parameter `page_name` when calling `repo_get_wiki_page_revisions`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'page_name' in params: path_params['pageName'] = params['page_name'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/wiki/revisions/{pageName}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WikiCommitList', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_get_wiki_pages(self, owner, repo, **kwargs): # noqa: E501 """Get all wiki pages # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_wiki_pages(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[WikiPageMetaData] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_get_wiki_pages_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_get_wiki_pages_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_get_wiki_pages_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get all wiki pages # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_get_wiki_pages_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[WikiPageMetaData] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_get_wiki_pages" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_pages`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_pages`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/wiki/pages', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[WikiPageMetaData]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_actions_secrets(self, owner, repo, **kwargs): # noqa: E501 """List an repo's actions secrets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_actions_secrets(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Secret] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_actions_secrets_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_actions_secrets_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_actions_secrets_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List an repo's actions secrets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_actions_secrets_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Secret] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_actions_secrets" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_actions_secrets`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_actions_secrets`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/secrets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Secret]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_activity_feeds(self, owner, repo, **kwargs): # noqa: E501 """List a repository's activity feeds # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_activity_feeds(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param date _date: the date of the activities to be found :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Activity] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_activity_feeds_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_activity_feeds_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_activity_feeds_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's activity feeds # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_activity_feeds_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param date _date: the date of the activities to be found :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Activity] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', '_date', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_activity_feeds" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_activity_feeds`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_activity_feeds`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if '_date' in params: query_params.append(('date', params['_date'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/activities/feeds', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Activity]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_all_git_refs(self, owner, repo, **kwargs): # noqa: E501 """Get specified ref or filtered repository's refs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_all_git_refs(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[Reference] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get specified ref or filtered repository's refs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_all_git_refs_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[Reference] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_all_git_refs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_all_git_refs`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_all_git_refs`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/refs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Reference]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_branch_protection(self, owner, repo, **kwargs): # noqa: E501 """List branch protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_branch_protection(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[BranchProtection] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List branch protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_branch_protection_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[BranchProtection] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_branch_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branch_protections', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[BranchProtection]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_branches(self, owner, repo, **kwargs): # noqa: E501 """List a repository's branches # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_branches(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Branch] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_branches_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's branches # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_branches_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Branch] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_branches" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_branches`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_branches`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branches', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Branch]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_collaborators(self, owner, repo, **kwargs): # noqa: E501 """List a repository's collaborators # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_collaborators(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's collaborators # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_collaborators_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_collaborators" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_collaborators`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_collaborators`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/collaborators', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[User]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_git_hooks(self, owner, repo, **kwargs): # noqa: E501 """List the Git hooks in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_git_hooks(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[GitHook] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_git_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_git_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_git_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List the Git hooks in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_git_hooks_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[GitHook] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_git_hooks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_hooks`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_hooks`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/git', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[GitHook]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_git_refs(self, owner, repo, ref, **kwargs): # noqa: E501 """Get specified ref or filtered repository's refs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_git_refs(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: part or full name of the ref (required) :return: list[Reference] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 else: (data) = self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 return data def repo_list_git_refs_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 """Get specified ref or filtered repository's refs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_git_refs_with_http_info(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: part or full name of the ref (required) :return: list[Reference] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_git_refs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_refs`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_refs`") # noqa: E501 # verify the required parameter 'ref' is set if self.api_client.client_side_validation and ('ref' not in params or params['ref'] is None): # noqa: E501 raise ValueError("Missing the required parameter `ref` when calling `repo_list_git_refs`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'ref' in params: path_params['ref'] = params['ref'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/git/refs/{ref}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Reference]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_hooks(self, owner, repo, **kwargs): # noqa: E501 """List the hooks in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_hooks(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Hook] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List the hooks in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_hooks_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Hook] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_hooks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_hooks`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_hooks`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Hook]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_keys(self, owner, repo, **kwargs): # noqa: E501 """List a repository's keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_keys(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int key_id: the key_id to search for :param str fingerprint: fingerprint of the key :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[DeployKey] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_keys_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int key_id: the key_id to search for :param str fingerprint: fingerprint of the key :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[DeployKey] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'key_id', 'fingerprint', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_keys" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_keys`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_keys`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'key_id' in params: query_params.append(('key_id', params['key_id'])) # noqa: E501 if 'fingerprint' in params: query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/keys', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[DeployKey]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_pinned_issues(self, owner, repo, **kwargs): # noqa: E501 """List a repo's pinned issues # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pinned_issues(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[Issue] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_pinned_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_pinned_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_pinned_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repo's pinned issues # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pinned_issues_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[Issue] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_pinned_issues" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_pinned_issues`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_pinned_issues`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/issues/pinned', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Issue]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_pinned_pull_requests(self, owner, repo, **kwargs): # noqa: E501 """List a repo's pinned pull requests # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pinned_pull_requests(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[PullRequest] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_pinned_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_pinned_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_pinned_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repo's pinned pull requests # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pinned_pull_requests_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[PullRequest] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_pinned_pull_requests" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_pinned_pull_requests`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_pinned_pull_requests`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/pinned', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PullRequest]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_pull_requests(self, owner, repo, **kwargs): # noqa: E501 """List a repo's pull requests # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pull_requests(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: Name of the repo (required) :param str base_branch: Filter by target base branch of the pull request :param str state: State of pull request :param str sort: Type of sort :param int milestone: ID of the milestone :param list[int] labels: Label IDs :param str poster: Filter by pull request author :param int page: Page number of results to return (1-based) :param int limit: Page size of results :return: list[PullRequest] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repo's pull requests # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pull_requests_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: Name of the repo (required) :param str base_branch: Filter by target base branch of the pull request :param str state: State of pull request :param str sort: Type of sort :param int milestone: ID of the milestone :param list[int] labels: Label IDs :param str poster: Filter by pull request author :param int page: Page number of results to return (1-based) :param int limit: Page size of results :return: list[PullRequest] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'base_branch', 'state', 'sort', 'milestone', 'labels', 'poster', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_pull_requests" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_requests`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_requests`") # noqa: E501 if self.api_client.client_side_validation and ('page' in params and params['page'] < 1): # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `repo_list_pull_requests`, must be a value greater than or equal to `1`") # noqa: E501 if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0): # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `repo_list_pull_requests`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'base_branch' in params: query_params.append(('base_branch', params['base_branch'])) # noqa: E501 if 'state' in params: query_params.append(('state', params['state'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'milestone' in params: query_params.append(('milestone', params['milestone'])) # noqa: E501 if 'labels' in params: query_params.append(('labels', params['labels'])) # noqa: E501 collection_formats['labels'] = 'multi' # noqa: E501 if 'poster' in params: query_params.append(('poster', params['poster'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PullRequest]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_pull_reviews(self, owner, repo, index, **kwargs): # noqa: E501 """List all reviews for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pull_reviews(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PullReview] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_list_pull_reviews_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """List all reviews for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_pull_reviews_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PullReview] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_pull_reviews" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_reviews`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_reviews`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_list_pull_reviews`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PullReview]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_push_mirrors(self, owner, repo, **kwargs): # noqa: E501 """Get all push mirrors of the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_push_mirrors(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PushMirror] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_push_mirrors_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_push_mirrors_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_push_mirrors_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get all push mirrors of the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_push_mirrors_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[PushMirror] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_push_mirrors" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_push_mirrors`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_push_mirrors`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/push_mirrors', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[PushMirror]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_release_attachments(self, owner, repo, id, **kwargs): # noqa: E501 """List release's attachments # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_release_attachments(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :return: list[Attachment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_list_release_attachments_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """List release's attachments # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_release_attachments_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the release (required) :return: list[Attachment] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_release_attachments" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_release_attachments`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_release_attachments`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_list_release_attachments`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases/{id}/assets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Attachment]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_releases(self, owner, repo, **kwargs): # noqa: E501 """List a repo's releases # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_releases(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param bool draft: filter (exclude / include) drafts, if you dont have repo write access none will show :param bool pre_release: filter (exclude / include) pre-releases :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Release] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repo's releases # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_releases_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param bool draft: filter (exclude / include) drafts, if you dont have repo write access none will show :param bool pre_release: filter (exclude / include) pre-releases :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[Release] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'draft', 'pre_release', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_releases" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_releases`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_releases`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'draft' in params: query_params.append(('draft', params['draft'])) # noqa: E501 if 'pre_release' in params: query_params.append(('pre-release', params['pre_release'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/releases', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Release]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_stargazers(self, owner, repo, **kwargs): # noqa: E501 """List a repo's stargazers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_stargazers(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_stargazers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repo's stargazers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_stargazers_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_stargazers" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_stargazers`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_stargazers`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/stargazers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[User]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_statuses(self, owner, repo, sha, **kwargs): # noqa: E501 """Get a commit's statuses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_statuses(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param str sort: type of sort :param str state: type of state :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[CommitStatus] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: (data) = self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data def repo_list_statuses_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 """Get a commit's statuses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_statuses_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param str sort: type of sort :param str state: type of state :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[CommitStatus] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'sha', 'sort', 'state', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_statuses" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses`") # noqa: E501 # verify the required parameter 'sha' is set if self.api_client.client_side_validation and ('sha' not in params or params['sha'] is None): # noqa: E501 raise ValueError("Missing the required parameter `sha` when calling `repo_list_statuses`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'sha' in params: path_params['sha'] = params['sha'] # noqa: E501 query_params = [] if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'state' in params: query_params.append(('state', params['state'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/statuses/{sha}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[CommitStatus]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_statuses_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 """Get a commit's statuses, by branch/tag/commit reference # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_statuses_by_ref(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: name of branch/tag/commit (required) :param str sort: type of sort :param str state: type of state :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[CommitStatus] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_statuses_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 else: (data) = self.repo_list_statuses_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 return data def repo_list_statuses_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 """Get a commit's statuses, by branch/tag/commit reference # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_statuses_by_ref_with_http_info(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str ref: name of branch/tag/commit (required) :param str sort: type of sort :param str state: type of state :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[CommitStatus] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'ref', 'sort', 'state', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_statuses_by_ref" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses_by_ref`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses_by_ref`") # noqa: E501 # verify the required parameter 'ref' is set if self.api_client.client_side_validation and ('ref' not in params or params['ref'] is None): # noqa: E501 raise ValueError("Missing the required parameter `ref` when calling `repo_list_statuses_by_ref`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'ref' in params: path_params['ref'] = params['ref'] # noqa: E501 query_params = [] if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'state' in params: query_params.append(('state', params['state'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/commits/{ref}/statuses', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[CommitStatus]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_subscribers(self, owner, repo, **kwargs): # noqa: E501 """List a repo's watchers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_subscribers(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_subscribers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repo's watchers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_subscribers_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[User] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_subscribers" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_subscribers`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_subscribers`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/subscribers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[User]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_tag_protection(self, owner, repo, **kwargs): # noqa: E501 """List tag protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_tag_protection(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[TagProtection] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_tag_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List tag protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_tag_protection_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[TagProtection] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_tag_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_tag_protection`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_tag_protection`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tag_protections', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TagProtection]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_tags(self, owner, repo, **kwargs): # noqa: E501 """List a repository's tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_tags(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results, default maximum page size is 50 :return: list[Tag] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_tags_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_tags_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results, default maximum page size is 50 :return: list[Tag] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_tags" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_tags`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_tags`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/tags', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Tag]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_teams(self, owner, repo, **kwargs): # noqa: E501 """List a repository's teams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_teams(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[Team] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_teams_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_teams_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_teams_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repository's teams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_teams_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: list[Team] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_teams" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_teams`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_teams`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/teams', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Team]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_list_topics(self, owner, repo, **kwargs): # noqa: E501 """Get list of topics that a repository has # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_topics(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: TopicName If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_list_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_list_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_list_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get list of topics that a repository has # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_list_topics_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: TopicName If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_list_topics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_list_topics`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_list_topics`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/topics', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TopicName', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_merge_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 """Merge a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_merge_pull_request(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to merge (required) :param MergePullRequestOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_merge_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Merge a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_merge_pull_request_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to merge (required) :param MergePullRequestOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_merge_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_merge_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_merge_pull_request`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_merge_pull_request`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/merge', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_merge_upstream(self, owner, repo, **kwargs): # noqa: E501 """Merge a branch from upstream # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_merge_upstream(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param MergeUpstreamRequest body: :return: MergeUpstreamResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_merge_upstream_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_merge_upstream_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_merge_upstream_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Merge a branch from upstream # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_merge_upstream_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param MergeUpstreamRequest body: :return: MergeUpstreamResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_merge_upstream" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_merge_upstream`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_merge_upstream`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/merge-upstream', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MergeUpstreamResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_migrate(self, **kwargs): # noqa: E501 """Migrate a remote git repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_migrate(async_req=True) >>> result = thread.get() :param async_req bool :param MigrateRepoOptions body: :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_migrate_with_http_info(**kwargs) # noqa: E501 else: (data) = self.repo_migrate_with_http_info(**kwargs) # noqa: E501 return data def repo_migrate_with_http_info(self, **kwargs): # noqa: E501 """Migrate a remote git repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_migrate_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param MigrateRepoOptions body: :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_migrate" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/migrate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_mirror_sync(self, owner, repo, **kwargs): # noqa: E501 """Sync a mirrored repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_mirror_sync(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to sync (required) :param str repo: name of the repo to sync (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Sync a mirrored repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_mirror_sync_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to sync (required) :param str repo: name of the repo to sync (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_mirror_sync" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_mirror_sync`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_mirror_sync`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/mirror-sync', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_new_pin_allowed(self, owner, repo, **kwargs): # noqa: E501 """Returns if new Issue Pins are allowed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_new_pin_allowed(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: NewIssuePinsAllowed If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_new_pin_allowed_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_new_pin_allowed_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_new_pin_allowed_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Returns if new Issue Pins are allowed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_new_pin_allowed_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: NewIssuePinsAllowed If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_new_pin_allowed" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_new_pin_allowed`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_new_pin_allowed`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/new_pin_allowed', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='NewIssuePinsAllowed', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_pull_request_is_merged(self, owner, repo, index, **kwargs): # noqa: E501 """Check if a pull request has been merged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_pull_request_is_merged(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_pull_request_is_merged_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Check if a pull request has been merged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_pull_request_is_merged_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_pull_request_is_merged" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_pull_request_is_merged`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_pull_request_is_merged`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_pull_request_is_merged`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/merge', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_push_mirror_sync(self, owner, repo, **kwargs): # noqa: E501 """Sync all push mirrored repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_push_mirror_sync(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to sync (required) :param str repo: name of the repo to sync (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_push_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_push_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_push_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Sync all push mirrored repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_push_mirror_sync_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to sync (required) :param str repo: name of the repo to sync (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_push_mirror_sync" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_push_mirror_sync`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_push_mirror_sync`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/push_mirrors-sync', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_rename_branch(self, owner, repo, branch, **kwargs): # noqa: E501 """Rename a branch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_rename_branch(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str branch: name of the branch (required) :param RenameBranchRepoOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_rename_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 else: (data) = self.repo_rename_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 return data def repo_rename_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 """Rename a branch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_rename_branch_with_http_info(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str branch: name of the branch (required) :param RenameBranchRepoOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'branch', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_rename_branch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_rename_branch`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_rename_branch`") # noqa: E501 # verify the required parameter 'branch' is set if self.api_client.client_side_validation and ('branch' not in params or params['branch'] is None): # noqa: E501 raise ValueError("Missing the required parameter `branch` when calling `repo_rename_branch`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'branch' in params: path_params['branch'] = params['branch'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branches/{branch}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_search(self, **kwargs): # noqa: E501 """Search for repositories # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_search(async_req=True) >>> result = thread.get() :param async_req bool :param str q: keyword :param bool topic: Limit search to repositories with keyword as topic :param bool include_desc: include search of keyword within repository description :param int uid: search only for repos that the user with the given id owns or contributes to :param int priority_owner_id: repo owner to prioritize in the results :param int team_id: search only for repos that belong to the given team id :param int starred_by: search only for repos that the user with the given id has starred :param bool private: include private repositories this user has access to (defaults to true) :param bool is_private: show only pubic, private or all repositories (defaults to all) :param bool template: include template repositories this user has access to (defaults to true) :param bool archived: show only archived, non-archived or all repositories (defaults to all) :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" :param bool exclusive: if `uid` is given, search only for repos that the user owns :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\" :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. :param int page: page number of results to return (1-based) :param int limit: page size of results :return: SearchResults If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_search_with_http_info(**kwargs) # noqa: E501 else: (data) = self.repo_search_with_http_info(**kwargs) # noqa: E501 return data def repo_search_with_http_info(self, **kwargs): # noqa: E501 """Search for repositories # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_search_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str q: keyword :param bool topic: Limit search to repositories with keyword as topic :param bool include_desc: include search of keyword within repository description :param int uid: search only for repos that the user with the given id owns or contributes to :param int priority_owner_id: repo owner to prioritize in the results :param int team_id: search only for repos that belong to the given team id :param int starred_by: search only for repos that the user with the given id has starred :param bool private: include private repositories this user has access to (defaults to true) :param bool is_private: show only pubic, private or all repositories (defaults to all) :param bool template: include template repositories this user has access to (defaults to true) :param bool archived: show only archived, non-archived or all repositories (defaults to all) :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" :param bool exclusive: if `uid` is given, search only for repos that the user owns :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\" :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. :param int page: page number of results to return (1-based) :param int limit: page size of results :return: SearchResults If the method is called asynchronously, returns the request thread. """ all_params = ['q', 'topic', 'include_desc', 'uid', 'priority_owner_id', 'team_id', 'starred_by', 'private', 'is_private', 'template', 'archived', 'mode', 'exclusive', 'sort', 'order', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_search" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'q' in params: query_params.append(('q', params['q'])) # noqa: E501 if 'topic' in params: query_params.append(('topic', params['topic'])) # noqa: E501 if 'include_desc' in params: query_params.append(('includeDesc', params['include_desc'])) # noqa: E501 if 'uid' in params: query_params.append(('uid', params['uid'])) # noqa: E501 if 'priority_owner_id' in params: query_params.append(('priority_owner_id', params['priority_owner_id'])) # noqa: E501 if 'team_id' in params: query_params.append(('team_id', params['team_id'])) # noqa: E501 if 'starred_by' in params: query_params.append(('starredBy', params['starred_by'])) # noqa: E501 if 'private' in params: query_params.append(('private', params['private'])) # noqa: E501 if 'is_private' in params: query_params.append(('is_private', params['is_private'])) # noqa: E501 if 'template' in params: query_params.append(('template', params['template'])) # noqa: E501 if 'archived' in params: query_params.append(('archived', params['archived'])) # noqa: E501 if 'mode' in params: query_params.append(('mode', params['mode'])) # noqa: E501 if 'exclusive' in params: query_params.append(('exclusive', params['exclusive'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'order' in params: query_params.append(('order', params['order'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/search', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SearchResults', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_signing_key(self, owner, repo, **kwargs): # noqa: E501 """Get signing-key.gpg for given repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_signing_key(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get signing-key.gpg for given repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_signing_key_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_signing_key" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_signing_key`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_signing_key`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/signing-key.gpg', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_signing_key_ssh(self, owner, repo, **kwargs): # noqa: E501 """Get signing-key.pub for given repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_signing_key_ssh(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_signing_key_ssh_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_signing_key_ssh_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_signing_key_ssh_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Get signing-key.pub for given repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_signing_key_ssh_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_signing_key_ssh" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_signing_key_ssh`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_signing_key_ssh`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/signing-key.pub', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_submit_pull_review(self, owner, repo, index, id, body, **kwargs): # noqa: E501 """Submit a pending review to an pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_submit_pull_review(owner, repo, index, id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :param SubmitPullReviewOptions body: (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 else: (data) = self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 return data def repo_submit_pull_review_with_http_info(self, owner, repo, index, id, body, **kwargs): # noqa: E501 """Submit a pending review to an pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :param SubmitPullReviewOptions body: (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_submit_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_submit_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_submit_pull_review`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_submit_pull_review`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_submit_pull_review`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_submit_pull_review`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullReview', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_test_hook(self, owner, repo, id, **kwargs): # noqa: E501 """Test a push webhook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_test_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the hook to test (required) :param str ref: The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: (data) = self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data def repo_test_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 """Test a push webhook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_test_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int id: id of the hook to test (required) :param str ref: The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'id', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_test_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_test_hook`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_test_hook`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_test_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] if 'ref' in params: query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/hooks/{id}/tests', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_tracked_times(self, owner, repo, **kwargs): # noqa: E501 """List a repo's tracked times # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_tracked_times(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str user: optional filter by user (available for issue managers) :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """List a repo's tracked times # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_tracked_times_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str user: optional filter by user (available for issue managers) :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'user', 'since', 'before', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_tracked_times" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_tracked_times`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_tracked_times`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] if 'user' in params: query_params.append(('user', params['user'])) # noqa: E501 if 'since' in params: query_params.append(('since', params['since'])) # noqa: E501 if 'before' in params: query_params.append(('before', params['before'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/times', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TrackedTime]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_transfer(self, owner, repo, body, **kwargs): # noqa: E501 """Transfer a repo ownership # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_transfer(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to transfer (required) :param str repo: name of the repo to transfer (required) :param TransferRepoOption body: Transfer Options (required) :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 else: (data) = self.repo_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 return data def repo_transfer_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 """Transfer a repo ownership # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_transfer_with_http_info(owner, repo, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo to transfer (required) :param str repo: name of the repo to transfer (required) :param TransferRepoOption body: Transfer Options (required) :return: Repository If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_transfer" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_transfer`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_transfer`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_transfer`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/transfer', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_un_dismiss_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 """Cancel to dismiss a review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_un_dismiss_pull_review(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: (data) = self.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data def repo_un_dismiss_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 """Cancel to dismiss a review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request (required) :param int id: id of the review (required) :return: PullReview If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_un_dismiss_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_un_dismiss_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_un_dismiss_pull_review`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_un_dismiss_pull_review`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `repo_un_dismiss_pull_review`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PullReview', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_update_avatar(self, owner, repo, **kwargs): # noqa: E501 """Update avatar # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_avatar(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param UpdateRepoAvatarOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_update_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_update_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_update_avatar_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Update avatar # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_avatar_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param UpdateRepoAvatarOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_update_avatar" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_update_avatar`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_update_avatar`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/avatar', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_update_branch_protection_priories(self, owner, repo, **kwargs): # noqa: E501 """Update the priorities of branch protections for a repository. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_branch_protection_priories(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param UpdateBranchProtectionPriories body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_update_branch_protection_priories_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_update_branch_protection_priories_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_update_branch_protection_priories_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Update the priorities of branch protections for a repository. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_branch_protection_priories_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param UpdateBranchProtectionPriories body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_update_branch_protection_priories" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_update_branch_protection_priories`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_update_branch_protection_priories`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/branch_protections/priority', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_update_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Update a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_file(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to update (required) :param UpdateFileOptions body: (required) :return: FileResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 else: (data) = self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 return data def repo_update_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Update a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_file_with_http_info(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str filepath: path of the file to update (required) :param UpdateFileOptions body: (required) :return: FileResponse If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'filepath', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_update_file" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_update_file`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_update_file`") # noqa: E501 # verify the required parameter 'filepath' is set if self.api_client.client_side_validation and ('filepath' not in params or params['filepath'] is None): # noqa: E501 raise ValueError("Missing the required parameter `filepath` when calling `repo_update_file`") # noqa: E501 # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in params or params['body'] is None): # noqa: E501 raise ValueError("Missing the required parameter `body` when calling `repo_update_file`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'filepath' in params: path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/contents/{filepath}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FileResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_update_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 """Merge PR's baseBranch into headBranch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_pull_request(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param str style: how to update pull request :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_update_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: (data) = self.repo_update_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def repo_update_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """Merge PR's baseBranch into headBranch # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_pull_request_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param int index: index of the pull request to get (required) :param str style: how to update pull request :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'index', 'style'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_update_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_update_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_update_pull_request`") # noqa: E501 # verify the required parameter 'index' is set if self.api_client.client_side_validation and ('index' not in params or params['index'] is None): # noqa: E501 raise ValueError("Missing the required parameter `index` when calling `repo_update_pull_request`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 query_params = [] if 'style' in params: query_params.append(('style', params['style'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/pulls/{index}/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_update_topics(self, owner, repo, **kwargs): # noqa: E501 """Replace list of topics for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_topics(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param RepoTopicOptions body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_update_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Replace list of topics for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_update_topics_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param RepoTopicOptions body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_update_topics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_update_topics`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_update_topics`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/topics', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def repo_validate_issue_config(self, owner, repo, **kwargs): # noqa: E501 """Returns the validation information for a issue config # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_validate_issue_config(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: IssueConfigValidation If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.repo_validate_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.repo_validate_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def repo_validate_issue_config_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Returns the validation information for a issue config # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.repo_validate_issue_config_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: IssueConfigValidation If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method repo_validate_issue_config" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `repo_validate_issue_config`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `repo_validate_issue_config`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/issue_config/validate', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IssueConfigValidation', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def topic_search(self, q, **kwargs): # noqa: E501 """search topics via keyword # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.topic_search(q, async_req=True) >>> result = thread.get() :param async_req bool :param str q: keywords to search (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[TopicResponse] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.topic_search_with_http_info(q, **kwargs) # noqa: E501 else: (data) = self.topic_search_with_http_info(q, **kwargs) # noqa: E501 return data def topic_search_with_http_info(self, q, **kwargs): # noqa: E501 """search topics via keyword # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.topic_search_with_http_info(q, async_req=True) >>> result = thread.get() :param async_req bool :param str q: keywords to search (required) :param int page: page number of results to return (1-based) :param int limit: page size of results :return: list[TopicResponse] If the method is called asynchronously, returns the request thread. """ all_params = ['q', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method topic_search" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'q' is set if self.api_client.client_side_validation and ('q' not in params or params['q'] is None): # noqa: E501 raise ValueError("Missing the required parameter `q` when calling `topic_search`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'q' in params: query_params.append(('q', params['q'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/topics/search', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TopicResponse]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_repo_secret(self, owner, repo, secretname, **kwargs): # noqa: E501 """Create or Update a secret value in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_repo_secret(owner, repo, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repository (required) :param str repo: name of the repository (required) :param str secretname: name of the secret (required) :param CreateOrUpdateSecretOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 else: (data) = self.update_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 return data def update_repo_secret_with_http_info(self, owner, repo, secretname, **kwargs): # noqa: E501 """Create or Update a secret value in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_repo_secret_with_http_info(owner, repo, secretname, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repository (required) :param str repo: name of the repository (required) :param str secretname: name of the secret (required) :param CreateOrUpdateSecretOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'secretname', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_repo_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `update_repo_secret`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `update_repo_secret`") # noqa: E501 # verify the required parameter 'secretname' is set if self.api_client.client_side_validation and ('secretname' not in params or params['secretname'] is None): # noqa: E501 raise ValueError("Missing the required parameter `secretname` when calling `update_repo_secret`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'secretname' in params: path_params['secretname'] = params['secretname'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/secrets/{secretname}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 """Update a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_repo_variable(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :param UpdateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 else: (data) = self.update_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 return data def update_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 """Update a repo-level variable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_repo_variable_with_http_info(owner, repo, variablename, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repository (required) :param str variablename: name of the variable (required) :param UpdateVariableOption body: :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'variablename', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_repo_variable" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `update_repo_variable`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `update_repo_variable`") # noqa: E501 # verify the required parameter 'variablename' is set if self.api_client.client_side_validation and ('variablename' not in params or params['variablename'] is None): # noqa: E501 raise ValueError("Missing the required parameter `variablename` when calling `update_repo_variable`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'variablename' in params: path_params['variablename'] = params['variablename'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/actions/variables/{variablename}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_check_subscription(self, owner, repo, **kwargs): # noqa: E501 """Check if the current user is watching a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_check_subscription(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: WatchInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def user_current_check_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Check if the current user is watching a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_check_subscription_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: WatchInfo If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_check_subscription" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `user_current_check_subscription`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `user_current_check_subscription`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/subscription', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WatchInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_delete_subscription(self, owner, repo, **kwargs): # noqa: E501 """Unwatch a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_subscription(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def user_current_delete_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Unwatch a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_delete_subscription_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_delete_subscription" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_subscription`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `user_current_delete_subscription`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/subscription', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_current_put_subscription(self, owner, repo, **kwargs): # noqa: E501 """Watch a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_put_subscription(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: WatchInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 else: (data) = self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 return data def user_current_put_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 """Watch a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_current_put_subscription_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :return: WatchInfo If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_current_put_subscription" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `user_current_put_subscription`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `user_current_put_subscription`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/subscription', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WatchInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def user_tracked_times(self, owner, repo, user, **kwargs): # noqa: E501 """List a user's tracked times in a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_tracked_times(owner, repo, user, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str user: username of the user whose tracked times are to be listed (required) :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 else: (data) = self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 return data def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noqa: E501 """List a user's tracked times in a repo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_tracked_times_with_http_info(owner, repo, user, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str user: username of the user whose tracked times are to be listed (required) :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ all_params = ['owner', 'repo', 'user'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method user_tracked_times" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if self.api_client.client_side_validation and ('owner' not in params or params['owner'] is None): # noqa: E501 raise ValueError("Missing the required parameter `owner` when calling `user_tracked_times`") # noqa: E501 # verify the required parameter 'repo' is set if self.api_client.client_side_validation and ('repo' not in params or params['repo'] is None): # noqa: E501 raise ValueError("Missing the required parameter `repo` when calling `user_tracked_times`") # noqa: E501 # verify the required parameter 'user' is set if self.api_client.client_side_validation and ('user' not in params or params['user'] is None): # noqa: E501 raise ValueError("Missing the required parameter `user` when calling `user_tracked_times`") # noqa: E501 collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 if 'user' in params: path_params['user'] = params['user'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 return self.api_client.call_api( '/repos/{owner}/{repo}/times/{user}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TrackedTime]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)