Skip to content

Push rule reject

heyjude1817 requested to merge gitlab-jh/jh-team/gitlab:push-rule-reject into master

What does this MR do and why?

Related to https://jihulab.com/gitlab-cn/gitlab/-/issues/1238

When we set up a push rule for block git commit message, Although the git message does not match the rule, it is still rejected. The reason is that when we submit information with git, git will add a break line to the message, and some rules(like ^[0-9]*$) will match the blank line and cause an error.

So the solution is to remove the break line in the commit message, and the question is solved.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by heyjude1817

Merge request reports

Loading