Push rules check existing commits in some cases
We're experiencing an issue very similar to https://gitlab.com/gitlab-org/gitlab-ee/issues/279, although we haven't managed to trigger it using the reproduction path in that issue. We haven't been able to figure out why the rule is triggered during this push , but not other, similar, ones. Note that we also have custom hooks in place which are not firing on this push, so it does seem to be a GitLab specific issue. We were hoping the change in behaviour, part of the fix for https://gitlab.com/gitlab-org/gitlab-ce/issues/19771, would solve it but unfortunately it hasn't.
To reproduce:
- start a new project in your own GitLab instance
- import git repo from url:
https://code.onehippo.org/cms-community/hippo-frontend-theme.git
- enable the
Check whether author is a GitLab user
push rule (member_check
) - make sure locally
user.name
&user.email
are set to a valid GitLab user - clone the project locally
- checkout release/1.01:
git checkout release/1.01
- create new branch bugfix/TEST:
git checkout -b bugfix/TEST
- push the new branch:
git push origin bugfix/TEST
Expected result: Push succeeds because the current user is valid, and there are no new commits
Actual result:
Push fails with the message: remote: GitLab: Author <some.author_of@older.commit> is not a member of team