Codium-ai / pr-agent

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

[Feature Request] Support pull requests in personal spaces in bitbucket server without requiring any URL hacks #1148

Open JimiHFord opened 3 months ago

JimiHFord commented 3 months ago

If you use a repository hosted in a personal space in Bitbucket Server (e.g. https://bitbucket.company-server.url/users/username/repos/my-repo/pull-requests/1, you'll get:

ValueError: The provided URL 'https://bitbucket.company-server.url/users/username/repos/my-repo/pull-requests/1' does not appear to be a Bitbucket PR URL

A workaround/hack our team found was to modify the url from this:

https://bitbucket.company-server.url/users/username/repos/my-repo/pull-requests/1

to this:

https://bitbucket.company-server.url/projects/~username/repos/my-repo/pull-requests/1

(i.e. Change users to projects and add a ~ in front of the username)

This works, but ideally the first URL should work too (i.e. https://bitbucket.company-server.url/users/username/repos/my-repo/pull-requests/1).

Relevant sections of code:

mrT23 commented 3 months ago

We are open to pull-request from the community to address this, which would add support for 'personal spaces', and also retain the current support