Skip to content

Commit 29084e5

Browse files
committed
Fix set and get commit status
1 parent 7d616f7 commit 29084e5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

default_api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13562,7 +13562,7 @@ func (a *DefaultApiService) GetCommitStatus(commitId string) (*APIResponse, erro
1356213562
)
1356313563

1356413564
// create path and map variables
13565-
localVarPath := a.client.cfg.BasePath + "/rest/build-status/1.0/commits/{commitId}"
13565+
localVarPath := a.client.cfg.BasePath + "/build-status/1.0/commits/{commitId}"
1356613566
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitId), -1)
1356713567

1356813568
localVarHeaderParams := make(map[string]string)
@@ -13682,7 +13682,7 @@ func (a *DefaultApiService) SetCommitStatus(commitId string, buildStatus BuildSt
1368213682
)
1368313683

1368413684
// create path and map variables
13685-
localVarPath := a.client.cfg.BasePath + "/rest/build-status/1.0/commits/{commitId}"
13685+
localVarPath := a.client.cfg.BasePath + "/build-status/1.0/commits/{commitId}"
1368613686
localVarPath = strings.Replace(localVarPath, "{"+"commitId"+"}", fmt.Sprintf("%v", commitId), -1)
1368713687

1368813688
localVarHeaderParams := make(map[string]string)
@@ -13723,7 +13723,7 @@ func (a *DefaultApiService) SetCommitStatus(commitId string, buildStatus BuildSt
1372313723
return NewAPIResponseWithError(localVarHTTPResponse, bodyBytes, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes))
1372413724
}
1372513725

13726-
return NewBitbucketAPIResponse(localVarHTTPResponse)
13726+
return NewAPIResponse(localVarHTTPResponse), nil
1372713727
}
1372813728

1372913729
/*

default_api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8133,7 +8133,7 @@ func TestDefaultApiService_SetCommitStatus(t *testing.T) {
81338133
want *APIResponse
81348134
wantErr, integrationTest bool
81358135
}{
8136-
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/rest/build-status/1.0/commits/: context canceled"}, true, false},
8136+
{"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/build-status/1.0/commits/: context canceled"}, true, false},
81378137
}
81388138
for _, tt := range tests {
81398139
if tt.integrationTest != runIntegrationTests {

0 commit comments

Comments
 (0)