Codium-ai / pr-agent

🚀CodiumAI PR-Agent: An AI-Powered 🤖 Tool for Automated Pull Request Analysis, Feedback, Suggestions and More! 💻🔍
Apache License 2.0
4.87k stars 424 forks source link

Bitbucket docs #207

Open rickvandermeij-aanzee opened 10 months ago

rickvandermeij-aanzee commented 10 months ago

How to setup bitbucket with docker. when running the command line, it says GITHUB.USER_TOKEN is required

okotek commented 10 months ago

Add -e CONFIG.GIT_PROVIDER=bitbucket

anthonym21 commented 9 months ago

Is this for bitbucket SERVER or cloud?

mrT23 commented 9 months ago

/similar_issue

github-actions[bot] commented 9 months ago

Similar Issues:

  1. [GITLAB] Installation Guide for GitLab please?

  2. how to deal with token limitation

  3. [Feature Request] - Ability to configure GitHub App

  4. Support for other git providers like Azure Repos

nevotheless commented 3 months ago

The docs could be clearer on if this applies to bitbucket cloud only or can be used for bitbucket server / datacenter as well. On-premise usage in general is not very well explained in the documentation.

mrT23 commented 3 months ago

The docs could be clearer on if this applies to bitbucket cloud only or can be used for bitbucket server / datacenter as well. On-premise usage in general is not very well explained in the documentation.

You are welcome to open a PR to improve the docs. There are many git providers and sub-frameworks, and we rely on the community to cover so many options.

anthonym21 commented 3 months ago

I'm sorry, how would we know what to put in the docs? You want the community to reverse engineer your code and write the docs or what are you saying?

On Thu, Mar 14, 2024, 12:22 Tal @.***> wrote:

The docs could be clearer on if this applies to bitbucket cloud only or can be used for bitbucket server / datacenter as well. On-premise usage in general is not very well explained in the documentation.

You are welcome to open a PR to improve the docs. There are many git providers and sub-frameworks, and we rely on the community to cover so many options.

— Reply to this email directly, view it on GitHub https://github.com/Codium-ai/pr-agent/issues/207#issuecomment-1997840047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5FPXBLDZ6SCN3O37DN243YYHFDFAVCNFSM6AAAAAA3PK5LFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXHA2DAMBUG4 . You are receiving this because you commented.Message ID: @.***>

calebAtIspot commented 3 months ago

I was also confused for a bit, because the documentation says it wants a "bearer token" but that name was not what I expected. After a bit I realized a repository access token will do.

If you use bitbucket cloud:

  1. Go to your repository settings
  2. Go to Access tokens under Security
  3. Create an access token. Give it the following scopes: pullrequest pullrequest:write repository repository:write
  4. In your terminal, save it as a environment variable. BITBUCKET_BEARER_TOKEN=<put-token-here>
  5. Save your openai api key as a environment variable OPENAI_API_KEY
  6. Run the bitbucket command listed in https://pr-agent-docs.codium.ai/installation/locally. I used 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=<pr_url> review , editing it to set the pr url.

You might get an error Failed to set review labels, error: 'NoneType' object is not iterable. Ignore that, you should still see a AI review comment in your PR.