Skip to content

Check push rules against commit author for web-based merges

What does this MR do?

In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21598 (merged for %11.4), we introduced a commit_email that is used when submitting web-based git actions.

One such action is accepting an MR, which creates a merge commit in the target branch with authorship details for the acceptor.

EE has a "push rules" feature, which allows that commit to be rejected if it doesn't meet certain standards - including standards based on the email address of the author.

Since the commit_email feature was merged, we have been checking the acceptor's email against the patterns specified in push rules, but committing with their commit_email, which is wrong, and could cause merge commits that violate the push rule to be accepted.

This MR switches to checking against commit_email rather than email.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Closes #7622 (closed)

Merge request reports