bitbucket server client: add capability to query for project and project repositories
Created by: ggilmore
This PR adds the following capabilities to our bitbucket sever client:
-
Querying the list of projects (visible by the current user):
/rest/api/1.0/projects
- bitbucket API docs -
Querying the repositories associated with a project:
/rest/api/1.0/projects/{projectKey}/repos
- bitbucket API docs
These capabilities are prerequisites for any future caching abilities that may be added.
Note: For these routes, the visibility of the projects / returned repositories entirely depends on the credentials of the caller and can't be controlled via filters / query parameters. It's up to other caller to use a mechanism like sudo
to enforce that the only responses returned are appropriate for a given username
.
Note 2: There is a description covering the bitbucket server's setup in a test comment. The visibility of a given project is implicitly tested (using a non-admin user for running the tests).
As an aside, I found the VCR tests to be quite brittle and hard to work with while I was developing them. In the future, I'd appreciate maybe paring with someone who has prior experience with this setup to see if I'm missing something.