Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Update local code with pull request from private fork without requesting read access to said fork Edited

Hello gang!

Using git

Context:

  1. I have a private repo that I shared (read) to John.
  2. John forked the repo, created a branch, pushed it and created a Pull Request for me to review and then merge into my own repo.

What I can do:

  • See his pull request
  • See his changes
  • See a list of his commits
  • Merge his pull request

What I cannot do (but wish I could do):

  • Click one of his commits to see the diff
  • Update my local code to his Pull Request's branch to test his code locally

My solution was to ask John to give me read permissions to his fork and all is working now.

However, this feels like an unnecessary step. If I have access to his changes and can merge them to my repo, why couldn't I pull them to my local code to test them out? Am I missing something?

I searched online but found nothing that didn't assume I already had read permissions on the fork. Please forgive me if the question was already answered elsewhere.

Thank you in advance for your precious help and may this discussion enlighten others as well.

1 answer

0 votes

Hi Joey and welcome to the community!

In this scenario, did John created the fork under a workspace different than the one that owns the parent repo?

If a repo is owned by e.g. workspace-1 and someone forks it under their personal workspace or any workspace other than workspace-1, we don't automatically give access to the fork to any user of workspace-1. If the fork is owned by a different workspace, e.g. workspace-2, only user groups of workspace-2 will get access automatically (if they are configured for getting access automatically). So, this is a matter of repository ownership.

That being said, I understand the requirement to be able to fetch the PR code locally. This is not possible at the moment without having access to the fork, because PRs are not stored as refs in the destination repo. We have a feature request about this in our issue tracker:

Until this is implemented, a user will need to have access to the fork in order to be able to pull the code of a PR locally.

I also wanted to add here that if
- the repo is owned by workspace-1
- you are an admin of workspace-1, and the admins user group is configured to get access to all new repos in that workspace
- John is a member of a user group of workspace-1 that is allowed to create repos in workspace-1
then John could create their fork under workspace-1, which would give you access to the repo automatically. I just wanted to mention that as a way that would eliminate the step of John giving you access.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

67 views 0 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you