Skip to content

Create update branch rules service

Gavin Hinfey requested to merge 438966-create-branch-rule-update-service into master

What does this MR do and why?

Add a service to update branch rules. Contributes to #438966 (closed)

Branch rules come in 3 flavours. Projects::BranchRule which is a delegated ProtectedBranch record. Projects::AllBranchesRule and Projects::AllProtectedBranchesRule which are both aggregators.

This service handles updating Projects::BranchRule names only. It is not possible to update the Projects::AllBranchesRule and Projects::AllProtectedBranchesRule names. There is an EE service which returns an error when trying to do so.

This related MR updates the BranchRule GraphQl mutation to use this service.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After

How to set up and validate locally

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

Related to #438966 (closed)

Edited by Gavin Hinfey

Merge request reports