What Bitbucket token type and scopes are needed for Testomat to post PR comments?
To post PR comments in Bitbucket using Testomat, use a Repository Access Token.
- Verify PR Context: Ensure the pipeline job is triggered from a pull-requests pipeline and that PR variables are available in that run. Without the PR context, Bitbucket cannot post comments.
- Assign Minimum Scopes: Assign the token the following minimum scopes:
- Pull requests: Write
- Repository: Read
- Check for Restrictions: Verify if the run is coming from a fork or if there are workspace/repository security restrictions that might block PR context or repository variables.
- Ensure that the
BITBUCKET_PR_IDis correctly set in the pipeline to avoid issues with missing PR context.