Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Merge issue via Restful API by Personal Access Token

cowen July 11, 2023

Hi  Team,

I have generated one PAT from Manage Account > HTTP access tokens, and grant the following permission for it:

  • Project Read 
  • REPOSITORY WRITE

Pull Request can be submitted automatically by bash script in Azure DevOps, but it prompts the following error message when auto merge via restful api "https://<bitbucket _server_domain>/rest/api/1.0/projects/<project_name>/repos/life-admin-database/pull-requests/<pr_id>/merge?version=<version>"

Error Message:

{"errors":[{"context":null,"message":"Your user account, access-token-user/2/18093, does not have an e-mail address. Merging a pull request records you as the committer of the resulting merge commit, and this requires an e-mail address.","exceptionName":"com.atlassian.bitbucket.validation.ArgumentValidationException"}]}
I run the same curl command in Dos command-line, it works. but it failed to merge in Azure Devops with the same curl command.
BTW, i have checked the corresponding account setting for the PAT, the account is with email address in bitbucket account management. 
It is very strange.
BitBucket version: 8.12
could you help for this issue?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events