Only "DELETE /groups/:ID/push_rule" call restores inheritance of next parent push rules
Summary
Possibly related to Global Push Rule not inherited by new project i... (#363821 - closed)
In the flow explained by @lyb124553153 there, another bug at rule exist --> create rule from group seems to occur when a sub-group's push rule value is removed via the UI. The empty value persists, thus blocking the inheritence of a parent group's vnon-empty value.
Steps to reproduce
- Create GroupA,
- Set Settings -> Repository - Pre-defined push rules -> 'Require expression in commit messages' option of groupA to value
commit message ruleA.
3. Set Settings -> Repository - Pre-defined push rules -> 'Branch name' option of groupA to value 'Branch name ruleA'.Not needed for demo
- Create SubGroupB inside GroupA,
- Set Settings -> Repository - Pre-defined push rules -> 'Require expression in commit messages' option of SubGroupB to value
commit message ruleB.
6. Set Settings -> Repository - Pre-defined push rules -> 'Branch name' option of SubGroupB to value 'Branch name ruleB'.Not needed for demo
- Remove
'Branch name' and'Require expression in commit messages' options for SubGroupB and press save. Make sure that all options in Settings -> Repository - Pre-defined push rules of SubGroupB are empty.- Create an empty project in SubGroupB. Check it Settings -> Repository settings -> Push rules.
Example Project
What is the current bug behavior?
Rules in new projects are not set, until one calls DELETE /groups/…SubGroupB…/push_rule.
Mereley removing the value in the UI seems to save an empty string, rather than anything that gets interpreted as No existing push rule when creating a new project.
What is the expected correct behavior?
Rules are inherited from GroupA => commit message ruleA
Relevant logs and/or screenshots
Output of checks: reproduced on GitLab.com
Results of GitLab environment info
Results of GitLab application Check