mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-04-05 01:10:12 -05:00
Fix set and get commit status
This commit is contained in:
parent
7d616f7c18
commit
29084e5e35
@ -13562,7 +13562,7 @@ func (a *DefaultApiService) GetCommitStatus(commitId string) (*APIResponse, erro
|
|||||||
)
|
)
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
localVarPath := a.client.cfg.BasePath + "/rest/build-status/1.0/commits/{commitId}"
|
localVarPath := a.client.cfg.BasePath + "/build-status/1.0/commits/{commitId}"
|
||||||
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitId), -1)
|
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitId), -1)
|
||||||
|
|
||||||
localVarHeaderParams := make(map[string]string)
|
localVarHeaderParams := make(map[string]string)
|
||||||
@ -13682,7 +13682,7 @@ func (a *DefaultApiService) SetCommitStatus(commitId string, buildStatus BuildSt
|
|||||||
)
|
)
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
localVarPath := a.client.cfg.BasePath + "/rest/build-status/1.0/commits/{commitId}"
|
localVarPath := a.client.cfg.BasePath + "/build-status/1.0/commits/{commitId}"
|
||||||
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitId), -1)
|
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitId), -1)
|
||||||
|
|
||||||
localVarHeaderParams := make(map[string]string)
|
localVarHeaderParams := make(map[string]string)
|
||||||
@ -13723,7 +13723,7 @@ func (a *DefaultApiService) SetCommitStatus(commitId string, buildStatus BuildSt
|
|||||||
return NewAPIResponseWithError(localVarHTTPResponse, bodyBytes, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes))
|
return NewAPIResponseWithError(localVarHTTPResponse, bodyBytes, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes))
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewBitbucketAPIResponse(localVarHTTPResponse)
|
return NewAPIResponse(localVarHTTPResponse), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -8133,7 +8133,7 @@ func TestDefaultApiService_SetCommitStatus(t *testing.T) {
|
|||||||
want *APIResponse
|
want *APIResponse
|
||||||
wantErr, integrationTest bool
|
wantErr, integrationTest bool
|
||||||
}{
|
}{
|
||||||
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/rest/build-status/1.0/commits/: context canceled"}, true, false},
|
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/build-status/1.0/commits/: context canceled"}, true, false},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
if tt.integrationTest != runIntegrationTests {
|
if tt.integrationTest != runIntegrationTests {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user