{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/github/v1/taskcluster-github-config.v1.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Description of a taskcluster.yml file v1, which may be used to generate a taskgraph\nand tasks.\n",
  "properties": {
    "autoCancelPreviousChecks": {
      "default": true,
      "description": "Automatically cancel running task group on a non-default branch.\nUseful for PRs that are updated frequently. Only the last build will be running.\n",
      "type": "boolean"
    },
    "hooks": {
      "default": [],
      "description": "Optional array of hooks to trigger. Each hook is triggered via the\nhooks.triggerHook API with a payload containing event, now,\ntaskcluster_root_url, tasks_for, taskId (a pre-allocated task group ID),\nand the user-defined context. Hook context values do not support JSON-e templating.\n",
      "items": {
        "additionalProperties": false,
        "properties": {
          "context": {
            "additionalProperties": true,
            "default": {},
            "description": "Optional arbitrary context object that will be passed to the hook\ntrigger payload under the \"context\" key. Must be JSON serializable.\n",
            "type": "object"
          },
          "name": {
            "description": "Hook identifier in the format \"<hookGroupId>/<hookId>\".\nThe hook must already exist in the Taskcluster instance.\n",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "policy": {
      "additionalProperties": false,
      "properties": {
        "allowComments": {
          "description": "Allow to trigger tasks from github comments. When set, collaborators would be able to trigger taskcluster bot\nby adding a comment that starts with `/taskcluster` and followed by command.\nDetails can be found in [RFC 168](https://github.com/taskcluster/taskcluster-rfcs/blob/main/rfcs/0168-Trigger-Tests-Based-on-PR-Comments.md)\n",
          "enum": [
            "collaborators"
          ],
          "type": "string"
        },
        "pullRequests": {
          "description": "Policy for creating tasks for pull requests.  The effective policy is found in this property\nin the `.taskcluster.yml` file in the repository's default branch.  See the documentation for\ndetailed definition of the options.\n",
          "enum": [
            "public",
            "public_restricted",
            "collaborators",
            "collaborators_quiet"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "reporting": {
      "description": "Policy for reporting status of PR or a commit. If absent, Github Statuses API is used",
      "enum": [
        "checks-v1"
      ],
      "type": "string"
    },
    "tasks": {
      "default": [],
      "description": "Definitions of tasks that can be scheduled. Rendered with JSON-e\n",
      "oneOf": [
        {
          "description": "Each element of this should evaluate to a task definition via json-e",
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "uniqueItems": false
        },
        {
          "additionalProperties": true,
          "description": "This must evaluate to an array via json-e i.e. `$flatten`",
          "type": "object"
        }
      ],
      "title": "Task definition template\""
    },
    "version": {
      "description": "Version of the format of this file; must be 1",
      "enum": [
        1
      ],
      "type": "integer"
    }
  },
  "required": [
    "version"
  ],
  "title": ".taskcluster.yml format",
  "type": "object"
}