Add branch rules details to the list of branch rules
Description
In #362217 (closed) we've added the ability to list branch rules under Repository > Settings
.
Currently, we only expose the name
in the GraphQL endpoint, but the design requires us to also list branch rule details related to each branch rule.
Scope
Looking at branch_rule_type.rb
right now we only expose name
. We should also expose the branch rule details and render in on the frontend accordingly.
This issue addresses the sections marked in red:
Example (GraphQL reponse):
[{
name: 'test-*', // branch or wildcard name
isDefault: true, // whether on not it is the default branch
isProtected: true, // whether a protection has been added to the branch
details: ['2 matching branches', 'Requires CODEOWNERS approval', '2 status checks'], // details/summary of the protections
}]
Testing
Regression testing with full run package-and-test
recommended
Edited by Anastasia McDonald