mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-04-05 09:18:07 -05:00
Sync with jx, and set int data type for Merge method
This commit is contained in:
parent
c660efac9d
commit
6294d41064
104
default_api.go
104
default_api.go
@ -3667,57 +3667,6 @@ func (a *DefaultApiService) GetCommit(commitId string, localVarOptionals map[str
|
|||||||
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *DefaultApiService) GetCommitBuildStatuses(commitSHA string) (*APIResponse, error) {
|
|
||||||
var (
|
|
||||||
localVarHTTPMethod = strings.ToUpper("Get")
|
|
||||||
localVarPostBody interface{}
|
|
||||||
localVarFileName string
|
|
||||||
localVarFileBytes []byte
|
|
||||||
)
|
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
localVarPath := a.client.cfg.BasePath + "/build-status/1.0/commits/{commitId}"
|
|
||||||
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitSHA), -1)
|
|
||||||
|
|
||||||
localVarHeaderParams := make(map[string]string)
|
|
||||||
localVarQueryParams := url.Values{}
|
|
||||||
localVarFormParams := url.Values{}
|
|
||||||
|
|
||||||
// to determine the Content-Type header
|
|
||||||
localVarHTTPContentTypes := []string{}
|
|
||||||
|
|
||||||
// set Content-Type header
|
|
||||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
|
||||||
if localVarHTTPContentType != "" {
|
|
||||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
|
||||||
}
|
|
||||||
|
|
||||||
// to determine the Accept header
|
|
||||||
localVarHTTPHeaderAccepts := []string{}
|
|
||||||
|
|
||||||
// set Accept header
|
|
||||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
|
||||||
if localVarHTTPHeaderAccept != "" {
|
|
||||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
|
||||||
}
|
|
||||||
r, err := a.client.prepareRequest(a.client.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
localVarHTTPResponse, err := a.client.callAPI(r)
|
|
||||||
if err != nil || localVarHTTPResponse == nil {
|
|
||||||
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
|
||||||
}
|
|
||||||
defer localVarHTTPResponse.Body.Close()
|
|
||||||
if localVarHTTPResponse.StatusCode >= 300 {
|
|
||||||
bodyBytes, _ := ioutil.ReadAll(localVarHTTPResponse.Body)
|
|
||||||
return NewAPIResponseWithError(localVarHTTPResponse, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes))
|
|
||||||
}
|
|
||||||
|
|
||||||
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DefaultApiService
|
/* DefaultApiService
|
||||||
Retrieve a page of commits from a given starting commit or \"between\" two commits. If no explicit commit is specified, the tip of the repository's default branch is assumed. commits may be identified by branch or tag name or by ID. A path may be supplied to restrict the returned commits to only those which affect that path. <p> The authenticated user must have <b>REPO_READ</b> permission for the specified repository to call this resource.
|
Retrieve a page of commits from a given starting commit or \"between\" two commits. If no explicit commit is specified, the tip of the repository's default branch is assumed. commits may be identified by branch or tag name or by ID. A path may be supplied to restrict the returned commits to only those which affect that path. <p> The authenticated user must have <b>REPO_READ</b> permission for the specified repository to call this resource.
|
||||||
* @param ctx context.Context for authentication, logging, tracing, etc.
|
* @param ctx context.Context for authentication, logging, tracing, etc.
|
||||||
@ -6490,6 +6439,57 @@ func (a *DefaultApiService) GetPullRequestCommitsWithOptions(projectKey, reposit
|
|||||||
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *DefaultApiService) GetCommitBuildStatuses(commitSHA string) (*APIResponse, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = strings.ToUpper("Get")
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/build-status/1.0/commits/{commitId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitSHA), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(a.client.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
||||||
|
}
|
||||||
|
defer localVarHTTPResponse.Body.Close()
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
bodyBytes, _ := ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
return NewAPIResponseWithError(localVarHTTPResponse, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes))
|
||||||
|
}
|
||||||
|
|
||||||
|
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
||||||
|
}
|
||||||
|
|
||||||
/* DefaultApiService
|
/* DefaultApiService
|
||||||
Retrieve a repository hook for this repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource.
|
Retrieve a repository hook for this repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource.
|
||||||
* @param ctx context.Context for authentication, logging, tracing, etc.
|
* @param ctx context.Context for authentication, logging, tracing, etc.
|
||||||
@ -8218,7 +8218,7 @@ func (a *DefaultApiService) ListParticipants(pullRequestID int64) (*APIResponse,
|
|||||||
@param optional (nil or map[string]interface{}) with one or more of:
|
@param optional (nil or map[string]interface{}) with one or more of:
|
||||||
@param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.
|
@param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.
|
||||||
@return */
|
@return */
|
||||||
func (a *DefaultApiService) Merge(projectKey, repositorySlug string, pullRequestID int64, localVarOptionals map[string]interface{}, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error) {
|
func (a *DefaultApiService) Merge(projectKey, repositorySlug string, pullRequestID int, localVarOptionals map[string]interface{}, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error) {
|
||||||
var (
|
var (
|
||||||
localVarHTTPMethod = strings.ToUpper("Post")
|
localVarHTTPMethod = strings.ToUpper("Post")
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user