From 194bfe1193c0266053f9a35eb866fd606a726381 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 5 Nov 2023 07:59:59 +0200 Subject: [PATCH] Update INSTALL.md --- INSTALL.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 4e588b92..c020b863 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -31,21 +31,29 @@ There are several ways to use PR-Agent: To request a review for a PR, or ask a question about a PR, you can run directly from the Docker image. Here's how: -For GitHub: +- For GitHub: ``` docker run --rm -it -e OPENAI.KEY= -e GITHUB.USER_TOKEN= codiumai/pr-agent:latest --pr_url review ``` -For GitLab: + +- For GitLab: ``` docker run --rm -it -e OPENAI.KEY= -e CONFIG.GIT_PROVIDER=gitlab -e GITLAB.PERSONAL_ACCESS_TOKEN= codiumai/pr-agent:latest --pr_url review ``` -For BitBucket: + +Note: If you have a dedicated GitLab instance, you need to specify the custom url as variable: +``` +docker run --rm -it -e OPENAI.KEY= -e CONFIG.GIT_PROVIDER=gitlab -e GITLAB.PERSONAL_ACCESS_TOKEN= GITLAB.URL= codiumai/pr-agent:latest --pr_url review +``` + +- For BitBucket: ``` docker run --rm -it -e CONFIG.GIT_PROVIDER=bitbucket -e OPENAI.KEY=$OPENAI_API_KEY -e BITBUCKET.BEARER_TOKEN=$BITBUCKET_BEARER_TOKEN codiumai/pr-agent:latest --pr_url= review ``` For other git providers, update CONFIG.GIT_PROVIDER accordingly, and check the `pr_agent/settings/.secrets_template.toml` file for the environment variables expected names and values. +--- Similarly, to ask a question about a PR, run the following command: ``` @@ -59,7 +67,8 @@ Note: If you want to ensure you're running a specific version of the Docker imag ```bash docker run --rm -it -e OPENAI.KEY= -e GITHUB.USER_TOKEN= codiumai/pr-agent@sha256:71b5ee15df59c745d352d84752d01561ba64b6d51327f97d46152f0c58a5f678 --pr_url review ``` -in addition, you can run a [specific released versions](./RELEASE_NOTES.md) of pr-agent, for example: + +Or you can run a [specific released versions](./RELEASE_NOTES.md) of pr-agent, for example: ``` codiumai/pr-agent@v0.8 ```