docs: improve installation for various providers

This commit is contained in:
Abhinav Kumar
2025-07-08 18:01:37 +05:30
parent 17a90c536f
commit aa18d532cf
5 changed files with 12 additions and 13 deletions

View File

@ -1,7 +1,7 @@
## Azure DevOps Pipeline ## Azure DevOps Pipeline
You can use a pre-built Action Docker image to run PR-Agent as an Azure devops pipeline. You can use a pre-built Action Docker image to run PR-Agent as an Azure devops pipeline.
add the following file to your repository under `azure-pipelines.yml`: Add the following file to your repository under `azure-pipelines.yml`:
```yaml ```yaml
# Opt out of CI triggers # Opt out of CI triggers
@ -71,7 +71,7 @@ git_provider="azure"
``` ```
Azure DevOps provider supports [PAT token](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) or [DefaultAzureCredential](https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication-overview#authentication-in-server-environments) authentication. Azure DevOps provider supports [PAT token](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) or [DefaultAzureCredential](https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication-overview#authentication-in-server-environments) authentication.
PAT is faster to create, but has build in expiration date, and will use the user identity for API calls. PAT is faster to create, but has built-in expiration date, and will use the user identity for API calls.
Using DefaultAzureCredential you can use managed identity or Service principle, which are more secure and will create separate ADO user identity (via AAD) to the agent. Using DefaultAzureCredential you can use managed identity or Service principle, which are more secure and will create separate ADO user identity (via AAD) to the agent.
If PAT was chosen, you can assign the value in .secrets.toml. If PAT was chosen, you can assign the value in .secrets.toml.

View File

@ -50,7 +50,7 @@ git_provider="bitbucket_server"
and pass the Pull request URL: and pass the Pull request URL:
```shell ```shell
python cli.py --pr_url https://git.onpreminstanceofbitbucket.com/projects/PROJECT/repos/REPO/pull-requests/1 review python cli.py --pr_url https://git.on-prem-instance-of-bitbucket.com/projects/PROJECT/repos/REPO/pull-requests/1 review
``` ```
### Run it as service ### Run it as service
@ -63,6 +63,6 @@ docker push codiumai/pr-agent:bitbucket_server_webhook # Push to your Docker re
``` ```
Navigate to `Projects` or `Repositories`, `Settings`, `Webhooks`, `Create Webhook`. Navigate to `Projects` or `Repositories`, `Settings`, `Webhooks`, `Create Webhook`.
Fill the name and URL, Authentication None select the Pull Request Opened checkbox to receive that event as webhook. Fill in the name and URL. For Authentication, select 'None'. Select the 'Pull Request Opened' checkbox to receive that event as a webhook.
The URL should end with `/webhook`, for example: https://domain.com/webhook The URL should end with `/webhook`, for example: https://domain.com/webhook

View File

@ -17,12 +17,11 @@ git clone https://github.com/qodo-ai/pr-agent.git
``` ```
5. Prepare variables and secrets. Skip this step if you plan on setting these as environment variables when running the agent: 5. Prepare variables and secrets. Skip this step if you plan on setting these as environment variables when running the agent:
1. In the configuration file/variables: - In the configuration file/variables:
- Set `config.git_provider` to "gitea" - Set `config.git_provider` to "gitea"
- In the secrets file/variables:
2. In the secrets file/variables: - Set your AI model key in the respective section
- Set your AI model key in the respective section - In the [Gitea] section, set `personal_access_token` (with token from step 2) and `webhook_secret` (with secret from step 3)
- In the [Gitea] section, set `personal_access_token` (with token from step 2) and `webhook_secret` (with secret from step 3)
6. Build a Docker image for the app and optionally push it to a Docker repository. We'll use Dockerhub as an example: 6. Build a Docker image for the app and optionally push it to a Docker repository. We'll use Dockerhub as an example:

View File

@ -46,7 +46,7 @@ Note that if your base branches are not protected, don't set the variables as `p
1. In GitLab create a new user and give it "Reporter" role ("Developer" if using Pro version of the agent) for the intended group or project. 1. In GitLab create a new user and give it "Reporter" role ("Developer" if using Pro version of the agent) for the intended group or project.
2. For the user from step 1. generate a `personal_access_token` with `api` access. 2. For the user from step 1, generate a `personal_access_token` with `api` access.
3. Generate a random secret for your app, and save it for later (`shared_secret`). For example, you can use: 3. Generate a random secret for your app, and save it for later (`shared_secret`). For example, you can use:
@ -111,7 +111,7 @@ For example: `GITLAB.PERSONAL_ACCESS_TOKEN` --> `GITLAB__PERSONAL_ACCESS_TOKEN`
4. Create a lambda function that uses the uploaded image. Set the lambda timeout to be at least 3m. 4. Create a lambda function that uses the uploaded image. Set the lambda timeout to be at least 3m.
5. Configure the lambda function to have a Function URL. 5. Configure the lambda function to have a Function URL.
6. In the environment variables of the Lambda function, specify `AZURE_DEVOPS_CACHE_DIR` to a writable location such as /tmp. (see [link](https://github.com/Codium-ai/pr-agent/pull/450#issuecomment-1840242269)) 6. In the environment variables of the Lambda function, specify `AZURE_DEVOPS_CACHE_DIR` to a writable location such as /tmp. (see [link](https://github.com/Codium-ai/pr-agent/pull/450#issuecomment-1840242269))
7. Go back to steps 8-9 of [Run a GitLab webhook server](#run-a-gitlab-webhook-server) with the function url as your Webhook URL. 7. Go back to steps 8-9 of [Run a GitLab webhook server](#run-a-gitlab-webhook-server) with the function URL as your Webhook URL.
The Webhook URL would look like `https://<LAMBDA_FUNCTION_URL>/webhook` The Webhook URL would look like `https://<LAMBDA_FUNCTION_URL>/webhook`
### Using AWS Secrets Manager ### Using AWS Secrets Manager

View File

@ -12,7 +12,7 @@ To invoke a tool (for example `review`), you can run PR-Agent directly from the
- For GitHub: - For GitHub:
```bash ```bash
docker run --rm -it -e OPENAI.KEY=<your key> -e GITHUB.USER_TOKEN=<your token> codiumai/pr-agent:latest --pr_url <pr_url> review docker run --rm -it -e OPENAI.KEY=<your_openai_key> -e GITHUB.USER_TOKEN=<your_github_token> codiumai/pr-agent:latest --pr_url <pr_url> review
``` ```
If you are using GitHub enterprise server, you need to specify the custom url as variable. If you are using GitHub enterprise server, you need to specify the custom url as variable.