mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-07-17 02:57:31 -05:00
Fix broken Delete PullRequests
This commit is contained in:
@ -1384,6 +1384,15 @@ func (a *DefaultApiService) Decline(projectKey, repositorySlug string, pullReque
|
||||
/* DefaultApiService
|
||||
Deletes a pull request. <p> To call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: <ul> <li> be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR </li> <li>have repository administrator permission for the repository the pull request is targeting</li> </ul> A body containing the version of the pull request must be provided with this request. <pre><code>{ \"version\": 1 }</code></pre>
|
||||
|
||||
@param pullRequestId the ID of the pull request within the repository
|
||||
@return */
|
||||
func (a *DefaultApiService) DeletePullRequest(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error) {
|
||||
return a.Delete(projectKey, repositorySlug, pullRequestID)
|
||||
}
|
||||
|
||||
/* DefaultApiService
|
||||
Deletes a pull request. <p> To call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: <ul> <li> be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR </li> <li>have repository administrator permission for the repository the pull request is targeting</li> </ul> A body containing the version of the pull request must be provided with this request. <pre><code>{ \"version\": 1 }</code></pre>
|
||||
|
||||
@param pullRequestId the ID of the pull request within the repository
|
||||
@return */
|
||||
func (a *DefaultApiService) Delete(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error) {
|
||||
@ -1394,6 +1403,10 @@ func (a *DefaultApiService) Delete(projectKey, repositorySlug string, pullReques
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
localVarPostBody = map[string]interface{}{
|
||||
"version": 1,
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey), -1)
|
||||
@ -1405,7 +1418,7 @@ func (a *DefaultApiService) Delete(projectKey, repositorySlug string, pullReques
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
localVarHTTPContentTypes := []string{"application/json"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
|
Reference in New Issue
Block a user