Move existing feature methods into Projects::BranchRule under conditional
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=535668) </details> <!--IssueSummary end--> Once we have a basic model configured we need to be able to fetch the correct setting for the rule type. This includes 1. `approval_project_rules` 2. `squash_option` 3. `external_status_checks` This needs to be behind a feature flag e.g. ```ruby def approval_project_rules Feature.enabled?(:persisted_branch_rules) case rule_type when :default then protected_branch.approval_project_rules_with_unique_policies when :all_branches project.approval_rules.for_all_branches when :all_protected_branches project.approval_rules.for_all_protected_branches end else protected_branch.approval_project_rules_with_unique_policies end end ``` Where `protected_branch.approval_project_rules_with_unique_policies` is the original method from `Projects::BranchRule`. If no method existed for BranchRule before merging all rule types we return `nil`.
issue