Create branchRuleUpdate graphql mutation
What does this MR do and why?
Adds a graphql mutation branchRuleUpdate
which allows a project maintainer and above to update a branch rule with a name
argument.
How to set up and validate locally
On the GDK visit http://[yourlocalhost]/-/graphql-explorer
and run the query below.
Query
mutation {
branchRuleUpdate(input: {
id: "gid://gitlab/ProtectedBranch/8"
projectPath: "twitter/Typeahead.Js",
name: "staging/*"
}) {
branchRule { # type is https://docs.gitlab.com/ee/api/graphql/reference/#branchrule
name
}
errors
}
}
Expected result
{
"data": {
"branchRuleUpdate": {
"branchRule": {
"name": "staging/*"
},
"errors": []
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #431918 (closed)
Edited by Gavin Hinfey