-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add GetDefaultBranch Endpoint in Git Service #475
base: main
Are you sure you want to change the base?
Conversation
Hi @zakisk. Thanks for your PR. I'm waiting for a jenkins-x member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
You can already get the same information with another method. I don't think it's worthwhile to burden the API with a separate method. |
@msvticket yes, but what if user wants other details of default branch, like in our use case we want default branch's latestCommit. |
b951a01
to
f9637c4
Compare
and FindRef endpoint also doesn't able to do this. |
@msvticket what do you think? |
if you are adding a new method across all interfaces just for the bitbucket server use case it would be fair to add the implementation for the others providers or at least the one that should be trivial to do (from pac implementation) ie: bbcloud/github/gilab/gogs |
What do you mean? Don't you get the commit sha from FindBranch? |
if I pass |
f9637c4
to
f505d76
Compare
But you can look up the default branch first, so it can be done already. But If you do implement the method for other suppliers (as mentioned above) I could approve this PR. |
How? Are you referring |
Sure! |
Yeah |
@msvticket can you please make it /ok-to-test? |
/ok-to-test |
Thanks! |
@msvticket can you please approve as well? |
As discussed above you would need to add implementations for other suppliers as well first. |
Ohhh, my bad I thought that you wanted it in separate PRs. Okay I am gonna add for others. |
added GetDefaultBranch endpoint in git service for Bitbucket server and its unit tests. Signed-off-by: Zaki Shaikh <[email protected]>
f505d76
to
f637e00
Compare
Users should be able to fetch Default branch for a repository. This PR implements GetDefaultBranch for following git providers: