CreateBranchRule creates a branch rule in a given repository.
Path parameters
Query parameters
Request body
Optional. Determines if the branch rule requires a pull request or not.
Optional. Determines if code owners must approve before merging to the branch.
Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.*). Current MVP phase only support .* for wildcard.
Optional. The minimum number of approvals required for the branch rule to be matched.
Optional. Determines if the branch rule is disabled or not.
Optional. Determines if allow stale reviews or approvals before merging to the branch.
Optional. The minimum number of reviews required for the branch rule to be matched.
Output only. Unique identifier of the repository.
Optional. Determines if require linear history before merging to the branch.
Output only. Create timestamp.
Output only. Update timestamp.
Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
Identifier. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}
Optional. Determines if require comments resolved before merging to the branch.
Response
Successful response