Skip to content

[Bug]: GitLab merge requests from forks can't toggle maintainer edits #30517

Closed

Description

@TonybynMp4

Area

Pull requests (GitLab provider)

Steps to reproduce

  1. Open a GitLab merge request from a fork that you authored. I used !10, opened from TonybynMp4/git-ansible-fork into TonybynMp4/git-ansible.
  2. Open the "More merge request actions" menu.

Expected behavior

An "Allow edits from maintainers" item, like GitHub pull requests from forks have since #25588.

Actual behavior

The item is missing. The GitLab provider never sets the maintainerEdits capability, and the detail read doesn't fill in maintainerCanModify, so web and mobile hide the toggle.

GitLab has the same setting, called allow_collaboration, on merge requests from forks:

$ glab api "projects/TonybynMp4%2Fgit-ansible/merge_requests/10" | jq -c '{allow_collaboration, source_project_id, target_project_id}'
{"allow_collaboration":true,"source_project_id":88478333,"target_project_id":78090101}

Impact

Authors have to go to GitLab to let maintainers push fixes to their branch, or to stop them.

Version or commit

66e6217b93 (main)

Environment

Linux, web dev build, gitlab.com through glab.

Screenshots, recordings, or supporting files

On main, !10's actions menu has no maintainer edits item:

Image

Workaround

Change "Allow commits from members who can merge to the target branch" on GitLab, or glab api -X PUT "projects/<id>/merge_requests/<iid>" -f allow_collaboration=false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions