I am currently working on a project hosted on Bitbucket. My client is having another developer work on some other features in parallel so I gave that developer read access to my repo and he forked it. I do not have access to his fork.
He recently finished a feature and made a pull request to my master. Is there a way, prior to approving and merging his PR into my master, for me to actually pull the code in his PR down to test it if I don't have access to his repo?
Hello @Brent Kelly,
Thanks for reaching out.
You can't clone that fork repo if it is private but you can pull a patch for your PR, then apply it to your repository – this way you'll reconstruct the changes suggested in that PR locally.
Here's the API endpoint to get the patch. If you need this just once and prefer to use your session authentication, you can call the API this way:
https://bitbucket.org/!api/2.0/...
If you plan to use it on a regular basis or in a script, you'll need to call our API domain and use one of the supported authentication methods:
https://api.bitbucket.org/2.0/...
You can then apply a patch using git apply command, see relevant documentation for Git.
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
That looks like it will work. I've already merged the pull request as there was a bit of a time crunch, but I'll try this when I get another one.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.