Push Rules error to state which commit message caused the error.
Summary
When we get a Push Rule error, we just get the error stating the wrong pattern was used. IT would be nice if the error stated which commit was responsible for the error message instead of trawling through all the commits, trying to work out which commit caused the error.
Steps to reproduce
Send through commit message using the wrong regex pattern.
What is the current bug behavior?
We get this
'''remote: GitLab: Commit message does not follow the pattern 'JIRA:\s*[A-Za-z]+-[0-9]+\nDescription:\s*\w.+|JIRA:\s*[0-0]+\nDescription:\s*\w.+|Bug:\s*[0-9]+\nBugzilla Project:\s*\w.+\nDescription:\s*\w.+|Bug:\s*[0-0]+\nDescription:\s*\w.+|Merge request\sJIRA:\s*[0-9]+\s|Merge request\sBug:\s[0-9]+\s|Revert\s"JIRA:\s*[0-9]+"\n|Revert\s*"Bug:\s*[0-9]+"\n|Merge remote-tracking branch .*''''
What is the expected correct behavior?
We would love if the error message stated exactly which commit caused the error.
Relevant logs and/or screenshots
'''remote: GitLab: Commit message does not follow the pattern 'JIRA:\s*[A-Za-z]+-[0-9]+\nDescription:\s*\w.+|JIRA:\s*[0-0]+\nDescription:\s*\w.+|Bug:\s*[0-9]+\nBugzilla Project:\s*\w.+\nDescription:\s*\w.+|Bug:\s*[0-0]+\nDescription:\s*\w.+|Merge request\sJIRA:\s*[0-9]+\s|Merge request\sBug:\s[0-9]+\s|Revert\s"JIRA:\s*[0-9]+"\n|Revert\s*"Bug:\s*[0-9]+"\n|Merge remote-tracking branch .*''''
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)