{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/github-enterprise/json-schema/github-enterprise-push-rule-bypass-request-schema.json",
  "title": "Push rule bypass request",
  "description": "A bypass request made by a user asking to be exempted from a push rule in this repository.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-enterprise-enterprise-admin-api-openapi.yml#/components/schemas/push-rule-bypass-request",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "The unique identifier of the bypass request."
    },
    "number": {
      "type": "integer",
      "description": "The number uniquely identifying the bypass request within its repository."
    },
    "repository": {
      "type": "object",
      "description": "The repository the bypass request is for.",
      "properties": {
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The ID of the repository the bypass request is for."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the repository the bypass request is for."
        },
        "full_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The full name of the repository the bypass request is for."
        }
      }
    },
    "organization": {
      "type": "object",
      "description": "The organization associated with the repository the bypass request is for.",
      "properties": {
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The ID of the organization."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the organization."
        }
      }
    },
    "requester": {
      "type": "object",
      "description": "The user who requested the bypass.",
      "properties": {
        "actor_id": {
          "type": "integer",
          "description": "The ID of the GitHub user who requested the bypass."
        },
        "actor_name": {
          "type": "string",
          "description": "The name of the GitHub user who requested the bypass."
        }
      }
    },
    "request_type": {
      "type": "string",
      "description": "The type of request."
    },
    "data": {
      "type": [
        "array",
        "null"
      ],
      "description": "Data describing the push rules that are being requested to be bypassed.",
      "items": {
        "type": "object",
        "properties": {
          "ruleset_id": {
            "type": "integer",
            "description": "The ID of the ruleset for the rules that were violated."
          },
          "ruleset_name": {
            "type": "string",
            "description": "The name of the ruleset for the rules that were violated."
          },
          "total_violations": {
            "type": "integer",
            "description": "The number of rule violations generated from the push associated with this request."
          },
          "rule_type": {
            "type": "string",
            "description": "The type of rule that was violated."
          }
        }
      }
    },
    "resource_identifier": {
      "type": "string",
      "description": "The unique identifier for the request type of the bypass request. For example, a commit SHA."
    },
    "status": {
      "type": "string",
      "description": "The status of the bypass request.",
      "enum": [
        "pending",
        "denied",
        "approved",
        "cancelled",
        "completed",
        "expired",
        "deleted",
        "open"
      ]
    },
    "requester_comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "The comment the requester provided when creating the bypass request."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the bypass request will expire."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the bypass request was created."
    },
    "responses": {
      "type": [
        "array",
        "null"
      ],
      "description": "The responses to the bypass request.",
      "items": {
        "$ref": "#/$defs/bypass-response"
      }
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "html_url": {
      "type": "string",
      "description": "The URL to view the bypass request in a browser.",
      "format": "uri"
    }
  },
  "$defs": {
    "bypass-response": {
      "title": "Bypass response",
      "description": "A response made by a delegated bypasser to a bypass request.",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The ID of the response to the bypass request."
        },
        "reviewer": {
          "type": "object",
          "description": "The user who reviewed the bypass request.",
          "properties": {
            "actor_id": {
              "type": "integer",
              "description": "The ID of the GitHub user who reviewed the bypass request."
            },
            "actor_name": {
              "type": "string",
              "description": "The name of the GitHub user who reviewed the bypass request."
            }
          }
        },
        "status": {
          "type": "string",
          "description": "The response status to the bypass request until dismissed.",
          "enum": [
            "approved",
            "denied",
            "dismissed"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the response to the bypass request was created."
        }
      }
    }
  }
}