Gitlab: Is it possible to create a merge request from MY fork to Another fork of the same project
Asked Answered
N

2

14

Scenario: we are 3 developers.

Developer 1 (admin) created the main repo.

Developer 2 forked admin's repo.

Developer 3 forked admin's repo.

Developer 2 created a feature branch "Feature 1"

Developer 3 checked out "Feature 1" from developer 2 repo.

When Developer 3 tries to create a Merge Request he only sees his own and admin's repos.

So I wonder, Is it possible to create a Merge Request to another remote different than my fork's?"

The only work-around I have seen so far is:

Developer 2 pushes the feature branch to admin's repo (through a merge request) and asks the admin to "protect it", then Developer 3 would have to create a merge request to admin's repo as well, the problem with this approach is that Developer 2 loses the ownership of the branch and they will have to create merge requests every time they want to push their changes.

On the other hand, it seems like this feature was added to GitLab but I can't find the official documentation about this feature.

Nanice answered 9/3, 2015 at 19:40 Comment(3)
I forgot to mention, I am using GitLab 7.8.1Nanice
What are you using for requesting merge requests? Technically if you checkout the same feature branch (Feature 1) then you will only see that branch on remote + admin's repo. All you have to do is push your changes to that feature branch or request merge depending what system you're using for it. At this point the creator of Feature 1 branch and you are both referencing the same branch on remote.Fugal
The problem is you can only create a push request to the origin you created your branch from. What I want is the ability to create a pull request to another remote (pretty much what you do on github)Nanice
E
2

No forks, maybe?

You may utilise the fact, that merge requests can be made within the same repository. So maybe all three may use the same repository as developers, the admin should set the crucial branches as protected.

If any change is made, anyone can create a merge request from one branch to another... and anyone can review, discuss, ...

Erena answered 23/8, 2017 at 19:5 Comment(0)
F
0

Create a new group which has access to dev #2's fork. Add dev #3 to this group.

Frenulum answered 10/3, 2015 at 16:7 Comment(1)
Nope. It didn't work. Dev 3 continues to see their repo and the main one, they never see dev2's repo in the list.Nanice

© 2022 - 2024 — McMap. All rights reserved.