Accept Merge Request using the matched user email

Description

Gitlab allows the configuration to accept commits from an email regex and block the ones that don't match. If the user has more than one email at the profile, the Gitlab will use the commit user email. It works well on the communication with the client terminal, but at the webUI, will always use the primary email blocking the change if it doesn't match the regex.

Given My primary email is personal
And I have the email alan@someorg.org
And The repository push role has the commit author's email as @someorg.org$
When I edit the README.MD using the WebUI
Then I should be able to save my changes
And The commit will use the email that matches the push role

This is more visible in this situation where happens a block:

Given My primary email is personal
And I have the email alan@someorg.org
And The repository push role has the commit author's email as @someorg.org$
And The repository protect branches doesn't allow directly commits to the master branch
And The repository has a pending Merge Request with master as target
When I try to accept the merge request
Then The merge should happen
And The commit will use the email that matches the push role

Proposal

Permit a single user to work with different organizations using the WebUI. Unblock the user that has the personal email as the primary one and needs to approve a Merge Request from an organization.

Links / references

  • https://gitlab.com/help/user/project/protected_branches
  • https://gitlab.com/help/push_rules/push_rules.md
Edited Jun 17, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading