pr-agent icon indicating copy to clipboard operation
pr-agent copied to clipboard

Bitbucket docs

Open rickvandermeij-aanzee opened this issue 1 year ago • 8 comments

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

rickvandermeij-aanzee avatar Aug 14 '23 08:08 rickvandermeij-aanzee

Add -e CONFIG.GIT_PROVIDER=bitbucket

okotek avatar Aug 14 '23 11:08 okotek

Is this for bitbucket SERVER or cloud?

anthony-maio avatar Sep 09 '23 17:09 anthony-maio

/similar_issue

mrT23 avatar Sep 12 '23 14:09 mrT23

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.

nevotheless avatar Mar 13 '24 10:03 nevotheless

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.

mrT23 avatar Mar 14 '24 16:03 mrT23

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: @.***>

anthony-maio avatar Mar 15 '24 04:03 anthony-maio

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.

calebAtIspot avatar Mar 15 '24 21:03 calebAtIspot