CreateBranchRule GraphQL mutation
What does this MR do and why?
It creates a branch rule associated with a protected branch with the name
and the project_path
argument.
Screenshots or screen recordings
mutation {
createBranchRule(input: {
projectPath: "twitter/Typeahead.Js",
name: "staging/*"
}) {
branchRule { # type is https://docs.gitlab.com/ee/api/graphql/reference/#branchrule
name
}
errors
}
}
How to set up and validate locally
Visite http://[yourlocalhost]/-/graphql-explorer
and try out the query above.
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.
Closes #431910 (closed)
Edited by Patrick Cyiza