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?
- [-] Changelog entry added, if necessary
-
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
EE specific content should be in the top level /ee
folder -
For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?
Closes #7622 (closed)