-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RepositoryApi: get all public/private repos together without looping projects #190
Comments
@mronus this is true if you're creating a repo under your user name if you're not attaching it to a project. The repository has to go somewhere, under some umbrella, so it's not under a project it is assumed you want to put things under your user name which essentially acts as a project folder. This client expects you to pass in a projectId (be than an actual projectId or a user-name) and doesn't take any short-cuts one way or another. I suppose it would be possible to allow passing in a null parameter for projectId and then attempt to inject the userName part of your credentials in its place. That doesn't sound like a bad idea. But if you're currently stuck I suggest passing in your username instead of the projectId and you should be good to go. |
Thanks a lot @cdancy , I got it very well in terms of repos which has no parent project; however, it is still an open question how to use the repos endpoint "/rest/api/1.0/repos". Has it been implemented in the library yet? I checked docs, libs everything but couldn't find anything. So I just want to be sure before starting investigating different solution, or maybe I can create a PR if I can spare time. |
@mronus we have loads of endpoints coded for in our RepositoryApi class. |
Edit: @cdancy nevermind, I messed up with general design and forgot that we have many Api classes with "/rest/api/{jclouds.api-version}/projects" root path :) However, I still think that we need a solution for having "/rest/api/1.0/repos" implemented. What do you think about the correct design/place for "/rest/api/1.0/repos"? I would like to implement it when I can spare some time. |
I think it will be much better discussing it through a pull request. I'll create it ASAP. |
@mronus I'm not sure an entire new Api/Endpoint is necessary as using the |
@cdancy I got the resolution for listing repos under username. The thing that I want to point out is listing all repos regardless of project. So I think we need to add the endpoint "/rest/api/1.0/repos" to the RepositoryApi somehow. I created a PR as start point. Please review and let me know your thoughts. |
RepositoryApi#list throws exception when sending project as null. I know that Bitbucket Rest API supports listing all repos together without looping through all projects one by one.
I couldn't find anything about that, so would like to know if there is a planned roadmap about this or if it already exists, and if the exception thrown by RepositoryApi#list is thrown intentionally or if it is a bug.
One more note, Bitbucket supports creating repositories without associating with a project.
The text was updated successfully, but these errors were encountered: