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

Create MRs for GitLab from fork to upstream is tricky #818

Open
TomasTomecek opened this issue Oct 19, 2023 · 0 comments
Open

Create MRs for GitLab from fork to upstream is tricky #818

TomasTomecek opened this issue Oct 19, 2023 · 0 comments
Labels
area/gitlab Related to GitLab implementation. complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. kind/bug Something isn't working.

Comments

@TomasTomecek
Copy link
Member

I suspect something has changed in the past 1-2 years as I'm no longer able to create MRs on gitlab.com using upsint:

ipdb> function
<function GitlabProject.create_pr at 0x7efdcef8c0e0>
ipdb> args
args = (<GitlabProject(namespace="redhat/research", repo="mastering-git")>, 'add slides for 5 and 6', '', 'main', 'class5-slides-6-2022')
kwargs = {'fork_username': 'TomasTomecek'}
ipdb> kwargs
{'fork_username': 'TomasTomecek'}
ogr.exceptions.GitlabAPIException: Requested fork doesn't exist

My fork exists and is public: https://gitlab.com/TomasTomecek/mastering-git

python-gitlab==3.14.0

From the docstring:

        How to create PR:
        -  upstream -> upstream - call on upstream, fork_username unset
        -  fork -> upstream - call on fork, fork_username unset
           also can call on upstream with fork_username, not supported way of using
        -  fork -> fork - call on fork, fork_username set
        -  fork -> other_fork - call on fork, fork_username set to other_fork owner
        """

It seems creating MRs from target_project when source is fork is discouraged but it should still work.

@majamassarini majamassarini added kind/bug Something isn't working. area/gitlab Related to GitLab implementation. complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. labels Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gitlab Related to GitLab implementation. complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. kind/bug Something isn't working.
Projects
Status: backlog
Development

No branches or pull requests

2 participants