docs: updated bitbucket pipeline docs to make direct use of the pr-agent image without docker in docker

This commit is contained in:
Nico Hein
2025-04-16 18:01:58 -04:00
parent bc3ef4763d
commit e5df079dce

View File

@ -7,21 +7,20 @@ You can use the Bitbucket Pipeline system to run PR-Agent on every pull request
```yaml ```yaml
pipelines: pipelines:
pull-requests: pull-requests:
"**": '**':
- step: - step:
name: PR Agent Review name: PR Agent Review
image: python:3.12 image: codiumai/pr-agent:latest
services:
- docker
script: script:
- docker run -e CONFIG.GIT_PROVIDER=bitbucket -e OPENAI.KEY=$OPENAI_API_KEY -e BITBUCKET.BEARER_TOKEN=$BITBUCKET_BEARER_TOKEN codiumai/pr-agent:latest --pr_url=https://bitbucket.org/$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG/pull-requests/$BITBUCKET_PR_ID review - pr-agent --pr_url=https://bitbucket.org/$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG/pull-requests/$BITBUCKET_PR_ID review
``` ```
2. Add the following secure variables to your repository under Repository settings > Pipelines > Repository variables. 2. Add the following secure variables to your repository under Repository settings > Pipelines > Repository variables.
OPENAI_API_KEY: `<your key>` CONFIG__GIT_PROVIDER: `bitbucket`
BITBUCKET.AUTH_TYPE: `basic` or `bearer` (default is `bearer`) OPENAI__KEY: `<your key>`
BITBUCKET.BEARER_TOKEN: `<your token>` (required when auth_type is bearer) BITBUCKET__AUTH_TYPE: `basic` or `bearer` (default is `bearer`)
BITBUCKET.BASIC_TOKEN: `<your token>` (required when auth_type is basic) BITBUCKET__BEARER_TOKEN: `<your token>` (required when auth_type is bearer)
BITBUCKET__BASIC_TOKEN: `<your token>` (required when auth_type is basic)
You can get a Bitbucket token for your repository by following Repository Settings -> Security -> Access Tokens. You can get a Bitbucket token for your repository by following Repository Settings -> Security -> Access Tokens.
For basic auth, you can generate a base64 encoded token from your username:password combination. For basic auth, you can generate a base64 encoded token from your username:password combination.