{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Takes the branch out of the protected branches of the repository's dev.knotless.repo record, as `knotless branch protect --undo` does. 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": "The branch is not protected.",
          "name": "InvalidRequest"
        },
        {
          "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"
            },
            "repo": {
              "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "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": "Stops protecting a branch of a repository.",
  "id": "dev.knotless.unprotectBranch",
  "lexicon": 1
}
