{
  "$id": "https://json.schemastore.org/backportrc.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "description": "A Backport config schema",
  "properties": {
    "repoName": {
      "description": "A repo name for the current project\nhttps://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\nhttps://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\nhttps://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\nhttps://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\nhttps://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\nhttps://github.com/sqren/backport/blob/main/docs/config-file-options.md#targetbranchchoices-required",
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "upsteam": {
      "description": "Identifier for the GitHub project as `{owner}/{repoName}`",
      "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"],
  "type": "object"
}