mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
Update doc for auth_type and basic_token
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
## Run as a Bitbucket Pipeline
|
||||
|
||||
|
||||
You can use the Bitbucket Pipeline system to run PR-Agent on every pull request open or update.
|
||||
|
||||
1. Add the following file in your repository bitbucket-pipelines.yml
|
||||
@ -8,7 +7,7 @@ You can use the Bitbucket Pipeline system to run PR-Agent on every pull request
|
||||
```yaml
|
||||
pipelines:
|
||||
pull-requests:
|
||||
'**':
|
||||
"**":
|
||||
- step:
|
||||
name: PR Agent Review
|
||||
image: python:3.12
|
||||
@ -19,15 +18,16 @@ pipelines:
|
||||
```
|
||||
|
||||
2. Add the following secure variables to your repository under Repository settings > Pipelines > Repository variables.
|
||||
OPENAI_API_KEY: `<your key>`
|
||||
BITBUCKET_BEARER_TOKEN: `<your token>`
|
||||
OPENAI_API_KEY: `<your key>`
|
||||
BITBUCKET.AUTH_TYPE: `basic` or `bearer` (default is `bearer`)
|
||||
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.
|
||||
For basic auth, you can generate a base64 encoded token from your username:password combination.
|
||||
|
||||
Note that comments on a PR are not supported in Bitbucket Pipeline.
|
||||
|
||||
|
||||
|
||||
## Bitbucket Server and Data Center
|
||||
|
||||
Login into your on-prem instance of Bitbucket with your service account username and password.
|
||||
@ -48,6 +48,7 @@ git_provider="bitbucket_server"
|
||||
```
|
||||
|
||||
and pass the Pull request URL:
|
||||
|
||||
```shell
|
||||
python cli.py --pr_url https://git.onpreminstanceofbitbucket.com/projects/PROJECT/repos/REPO/pull-requests/1 review
|
||||
```
|
||||
@ -55,6 +56,7 @@ python cli.py --pr_url https://git.onpreminstanceofbitbucket.com/projects/PROJEC
|
||||
### Run it as service
|
||||
|
||||
To run PR-Agent as webhook, build the docker image:
|
||||
|
||||
```
|
||||
docker build . -t codiumai/pr-agent:bitbucket_server_webhook --target bitbucket_server_webhook -f docker/Dockerfile
|
||||
docker push codiumai/pr-agent:bitbucket_server_webhook # Push to your Docker repository
|
||||
|
Reference in New Issue
Block a user