Skip to content
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

Merge request not opening on correct repository. #204

Closed
BrOrlandi opened this issue Nov 9, 2022 · 2 comments
Closed

Merge request not opening on correct repository. #204

BrOrlandi opened this issue Nov 9, 2022 · 2 comments

Comments

@BrOrlandi
Copy link

I have two repositories in my organization:
https://gitlab.com/kassellabs/videomatik
https://gitlab.com/kassellabs/videomatik-sample

When I try to open a merge request using lab merge-request on videomatik repository, it's opening the merge request on the videomatik-sample repository. As it doesn't have the branch it just opens an empty merge request.

It may be related to something in the code that may use the URL prefix instead of the entire URL.
I did check if my remote is correct, and everything is correct.

The lab merge-requests command works fine, open the merge requests of the correct repo.

@BrOrlandi
Copy link
Author

It's related when you run gitlab.Projects.search and it returns a list of projects that matches the project name. When you pick just the first element of the array it may get the wrong repo. I think it should run a search with a different argument if possible, or don't get the first element of the result array, find for the project those remote URL matches. I may send a quick fix on this soon.

@vishwanatharondekar
Copy link
Owner

This is fixed and merged in PR #211

Published a release 2.0.11 on npm as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants