{
  "$id": "spec-kitty-events/gate_passed_payload",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Payload for a CI gate that concluded successfully.\n\nAttached to a generic Event with event_type='GatePassed'.",
  "properties": {
    "check_run_id": {
      "description": "GitHub check run ID",
      "exclusiveMinimum": 0,
      "title": "Check Run Id",
      "type": "integer"
    },
    "check_run_url": {
      "description": "URL of the GitHub check run",
      "format": "uri",
      "minLength": 1,
      "title": "Check Run Url",
      "type": "string"
    },
    "conclusion": {
      "const": "success",
      "description": "Allowed GitHub check_run conclusion for passed gates.",
      "title": "Conclusion",
      "type": "string"
    },
    "delivery_id": {
      "description": "Webhook delivery ID used as idempotency key",
      "minLength": 1,
      "title": "Delivery Id",
      "type": "string"
    },
    "external_provider": {
      "const": "github",
      "description": "External CI provider. Currently only 'github' is supported.",
      "title": "External Provider",
      "type": "string"
    },
    "gate_name": {
      "description": "Name of the CI gate (e.g., 'ci/build', 'ci/lint')",
      "minLength": 1,
      "title": "Gate Name",
      "type": "string"
    },
    "gate_type": {
      "const": "ci",
      "description": "Type of gate. Currently only 'ci' is supported.",
      "title": "Gate Type",
      "type": "string"
    },
    "pr_number": {
      "anyOf": [
        {
          "exclusiveMinimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Pull request number, if the gate is associated with a PR",
      "title": "Pr Number"
    }
  },
  "required": [
    "gate_name",
    "gate_type",
    "conclusion",
    "external_provider",
    "check_run_id",
    "check_run_url",
    "delivery_id"
  ],
  "title": "GatePassedPayload",
  "type": "object"
}
