Details
-
Bug
-
Resolution: Fixed
-
Low
-
None
-
Severity 3 - Minor
-
11
-
1
-
Description
Issue Summary
When merging a pull request via API endpoint, it does not work using a repository access token as the authentication method.
Steps to Reproduce
- Create a repository access token in a repository
- Merge an open pull request using the API endpoint below and run it in a CURL command
curl -vv --request POST \ --url 'https://api.bitbucket.org/2.0/repositories/workspace_id/repo_name/pullrequests/pull_request_id/merge' \ --header 'Authorization: Bearer ACCESS_TOKEN_HERE' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "message": "merge", "close_source_branch": false, "merge_strategy": "merge_commit" }'
Expected Results
The pull request will be merged using a repository access token
Actual Results
The pull request can't be merged using a repository access token
Workaround
A possible workaround is to use a Bitbucket Cloud username and app password for authentication or use OAuth 2.0 to generate an access token.
Attachments
Issue Links
- relates to
-
BCAT-1961 Loading...