{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/backportrc-json/latest.json",
  "description": "A Backport config schema",
  "x-lintel": {
    "source": "https://www.schemastore.org/backportrc.json",
    "sourceSha256": "3a32a30e60d8818a6d50fdca9fb417c9aaa776ee92655dd75ca3bc460f2a35b0",
    "fileMatch": [
      ".backportrc.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "repoName": {
      "description": "A repo name for the current project\n<https://github.com/sqren/backport/blob/main/docs/config-file-options.md#reponame-required>",
      "type": "string",
      "minLength": 1,
      "examples": [
        "kibana"
      ]
    },
    "repoOwner": {
      "description": "A repo owner for the current project\n<https://github.com/sqren/backport/blob/main/docs/config-file-options.md#repoowner-required>",
      "type": "string",
      "minLength": 1,
      "examples": [
        "elastic"
      ]
    },
    "targetBranchChoices": {
      "description": "Target branches for the current project\n<https://github.com/sqren/backport/blob/main/docs/config-file-options.md#targetbranchchoices-required>",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "description": "A target branch for the current project\n<https://github.com/sqren/backport/blob/main/docs/config-file-options.md#targetbranchchoices-required>",
        "oneOf": [
          {
            "type": "string",
            "minLength": 1,
            "examples": [
              "6.2"
            ]
          },
          {
            "title": "target branch",
            "type": "object",
            "required": [
              "name",
              "checked"
            ],
            "properties": {
              "name": {
                "description": "A target branch for the current project\n<https://github.com/sqren/backport/blob/main/docs/config-file-options.md#targetbranchchoices-required>",
                "type": "string",
                "minLength": 1,
                "examples": [
                  "6.3"
                ]
              },
              "checked": {
                "description": "Whether to pre-select a target branch for the current project\n<https://github.com/sqren/backport/blob/main/docs/config-file-options.md#targetbranchchoices-required>",
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "upstream": {
      "description": "Identifier for the GitHub project as `{owner}/{repoName}` (deprecated)",
      "type": "string"
    },
    "branches": {
      "description": "Branches to backport to",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "checked": {
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "checked"
            ]
          }
        ]
      }
    },
    "labels": {
      "description": "Labels that will be added to the pull request",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "all": {
      "description": "Whether to only show the current user's commits or commits from anyone",
      "type": "boolean"
    }
  },
  "required": [
    "repoName",
    "repoOwner",
    "targetBranchChoices"
  ],
  "additionalProperties": false
}
