{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/github/v1/webhook-issue-comment-payload.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": true,
  "description": "Validates GitHub issue comment event webhook payload.\n",
  "properties": {
    "action": {
      "description": "The action performed on the issue comment.\nKnown values: created, edited, deleted.\nGitHub may add new action types; validation accepts any non-empty string.\n",
      "minLength": 1,
      "type": "string"
    },
    "comment": {
      "additionalProperties": true,
      "properties": {
        "body": {
          "type": "string"
        },
        "id": {
          "minimum": 1,
          "type": "integer"
        },
        "user": {
          "additionalProperties": true,
          "properties": {
            "login": {
              "pattern": "^([a-zA-Z0-9-_%\\[\\]]*)$",
              "type": "string"
            }
          },
          "required": [
            "login"
          ],
          "type": "object"
        }
      },
      "required": [
        "id",
        "user",
        "body"
      ],
      "type": "object"
    },
    "installation": {
      "additionalProperties": true,
      "properties": {
        "id": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "id"
      ],
      "type": "object"
    },
    "issue": {
      "additionalProperties": true,
      "properties": {
        "number": {
          "minimum": 1,
          "type": "integer"
        },
        "pull_request": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "additionalProperties": true,
              "type": "object"
            }
          ]
        },
        "state": {
          "enum": [
            "open",
            "closed"
          ],
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "user": {
          "additionalProperties": true,
          "properties": {
            "login": {
              "pattern": "^([a-zA-Z0-9-_%\\[\\]]*)$",
              "type": "string"
            }
          },
          "required": [
            "login"
          ],
          "type": "object"
        }
      },
      "required": [
        "number",
        "title",
        "user",
        "state"
      ],
      "type": "object"
    },
    "repository": {
      "additionalProperties": true,
      "properties": {
        "full_name": {
          "pattern": "^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$",
          "type": "string"
        },
        "name": {
          "pattern": "^[A-Za-z0-9._-]+$",
          "type": "string"
        },
        "owner": {
          "additionalProperties": true,
          "anyOf": [
            {
              "required": [
                "name"
              ]
            },
            {
              "required": [
                "login"
              ]
            }
          ],
          "properties": {
            "login": {
              "pattern": "^([a-zA-Z0-9-_%\\[\\]]*)$",
              "type": "string"
            },
            "name": {
              "pattern": "^([a-zA-Z0-9-_%\\[\\]]*)$",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "required": [
        "name",
        "full_name",
        "owner"
      ],
      "type": "object"
    },
    "sender": {
      "additionalProperties": true,
      "properties": {
        "login": {
          "pattern": "^([a-zA-Z0-9-_%\\[\\]]*)$",
          "type": "string"
        }
      },
      "required": [
        "login"
      ],
      "type": "object"
    }
  },
  "required": [
    "action",
    "issue",
    "comment",
    "repository",
    "sender"
  ],
  "title": "GitHub Issue Comment Webhook Payload",
  "type": "object"
}