dev.knotless.protectBranch
Adds the branch to the protected branches of the repository's dev.knotless.repo record, in place of any rule it had, as `knotless protect` does: through the gateway it then only moves forward, is never deleted, and unless merges is set takes no merge commits; with queue, pulls land on it only through the merge queue; with reviews, a pull merges into it only once reviewed as they ask. Its owner can, logged in to this appview's web pages: the appview writes with the session it keeps for that account, which the pages' session cookie names. For an organization's repository, so can an admin who joined it, logged in to the pages or with a service token from their own PDS for this method: the appview's gateway, which the organization delegated its writes to, writes as the organization.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | knotless.dev |
| Indexed |
Showing version bafyreig57zkodzbbrewk5z23ggci7lg7m7elbnyyancfd2bfvx2xi4yvwy. Show the latest
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Adds the branch to the protected branches of the repository's dev.knotless.repo record, in place of any rule it had, as `knotless protect` does: through the gateway it then only moves forward, is never deleted, and unless merges is set takes no merge commits; with queue, pulls land on it only through the merge queue; with reviews, a pull merges into it only once reviewed as they ask. Its owner can, logged in to this appview's web pages: the appview writes with the session it keeps for that account, which the pages' session cookie names. For an organization's repository, so can an admin who joined it, logged in to the pages or with a service token from their own PDS for this method: the appview's gateway, which the organization delegated its writes to, writes as the organization.",
"errors": [
{
"description": "No such repository.",
"name": "NotFound"
},
{
"description": "No account is logged in to the pages, or its session has ended.",
"name": "AuthenticationRequired"
},
{
"description": "The account logged in is not the repository's owner.",
"name": "Forbidden"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"branch": {
"description": "The branch, without refs/heads/.",
"maxLength": 255,
"type": "string"
},
"merges": {
"description": "Whether it takes merge commits; otherwise pulls merge into it squashed.",
"type": "boolean"
},
"queue": {
"description": "Whether pulls land on it only through the merge queue.",
"type": "boolean"
},
"repo": {
"description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
"format": "at-uri",
"type": "string"
},
"reviews": {
"description": "The reviews a pull needs before it merges into the branch. Absent, none.",
"ref": "dev.knotless.repo#reviews",
"type": "ref"
}
},
"required": [
"repo",
"branch"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"rules": {
"description": "The protected branches now.",
"items": {
"ref": "dev.knotless.repo#rule",
"type": "ref"
},
"type": "array"
}
},
"required": [
"rules"
],
"type": "object"
}
},
"type": "procedure"
}
},
"description": "Protects a branch of a repository.",
"id": "dev.knotless.protectBranch",
"lexicon": 1
}