Skip to content

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.

  1. 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.
  2. Assign Minimum Scopes: Assign the token the following minimum scopes:
    • Pull requests: Write
    • Repository: Read
  3. 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_ID is correctly set in the pipeline to avoid issues with missing PR context.