Add, change, or remove a native repository's protected branches
Edits the rule list in place. addRules upserts by ref (an existing rule keeps its position; omitting serverSideMergeOnly preserves its level, while a new rule defaults to false) and removeRefs drops rules by ref; the data plane applies each edit atomically, preserving concurrent changes to different refs. For conflicting edits to the same ref, the last applied edit wins. Requires repository admin. A GitHub mirror or a native-mirror id is refused with 409.
Path parameters
Request body
Response
The resulting branch protection rules
Changes
Changed in 4 of the 29 revisions of this API.11
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
- ○
endpoint added
endpoint-added
- ○