We are approving PRs using Bitbucket api (with token) running in bitbucket pipeline.
Our merge check is "Check for at least 1 approval from default reviewers".
When approved using the api, bitbucket ui showing like "approved by app user 'auto-approval-token' ".
How to add 'auto-approval-token' user as a default reviwer?
Notes:
We are using Bitbucket cloud and im an admin user
Approve api:
curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
Hi,
In Bitbucket Cloud, default reviewers are generally regular users or groups with repository access, so an app user created through a token/API flow usually cannot be added the same way as a normal human reviewer. Since the approval is showing as coming from the app user, the API approval itself is working, but the merge check for “approval from default reviewers” may still not treat that app identity as an eligible default reviewer. You may need to use a real service account with repository access instead of an app-style token identity, or adjust the merge check approach if the approval is meant to be automated.
But using a real service account, we can not call the api to approve, right?
I need to approve a PR using an api request and need to have that approval to be a default reviewer approval.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.