{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-devops/json-schema/microsoft-azure-devops-git-push-schema.json",
  "title": "GitPush",
  "description": "A push to a Git repository",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-devops-pushes-api-openapi.yml#/components/schemas/GitPush",
  "type": "object",
  "properties": {
    "pushId": {
      "type": "integer",
      "description": "Unique numeric push ID"
    },
    "date": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time of the push"
    },
    "pushedBy": {
      "$ref": "#/$defs/IdentityRef"
    },
    "commits": {
      "type": "array",
      "description": "Commits included in this push",
      "items": {
        "$ref": "#/$defs/GitCommitRef"
      }
    },
    "refUpdates": {
      "type": "array",
      "description": "Ref updates (branch changes) in this push",
      "items": {
        "$ref": "#/$defs/GitRefUpdate"
      }
    },
    "repository": {
      "$ref": "#/$defs/GitRepository"
    },
    "url": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "GitCommitRef": {
      "type": "object",
      "description": "A reference to a Git commit",
      "properties": {
        "commitId": {
          "type": "string",
          "description": "Full SHA hash of the commit"
        },
        "comment": {
          "type": "string",
          "description": "Commit message"
        },
        "commentTruncated": {
          "type": "boolean",
          "description": "Whether the comment has been truncated"
        },
        "author": {
          "$ref": "#/$defs/GitUserDate"
        },
        "committer": {
          "$ref": "#/$defs/GitUserDate"
        },
        "parents": {
          "type": "array",
          "description": "Parent commit SHAs",
          "items": {
            "type": "string"
          }
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "remoteUrl": {
          "type": "string",
          "format": "uri"
        },
        "changeCounts": {
          "type": "object",
          "description": "Number of files changed (Add, Edit, Delete)",
          "properties": {
            "Add": {
              "type": "integer"
            },
            "Edit": {
              "type": "integer"
            },
            "Delete": {
              "type": "integer"
            }
          }
        }
      }
    },
    "GitRefUpdate": {
      "type": "object",
      "description": "A ref update in a push",
      "properties": {
        "name": {
          "type": "string",
          "description": "The ref name (e.g., refs/heads/main)"
        },
        "oldObjectId": {
          "type": "string",
          "description": "Previous SHA the ref pointed to (zeros for new ref)"
        },
        "newObjectId": {
          "type": "string",
          "description": "New SHA the ref now points to (zeros to delete)"
        },
        "repositoryId": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "GitRepository": {
      "type": "object",
      "description": "An Azure DevOps Git repository",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique GUID identifier of the repository"
        },
        "name": {
          "type": "string",
          "description": "Repository name"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "REST API URL for this repository"
        },
        "project": {
          "$ref": "#/$defs/TeamProjectReference"
        },
        "defaultBranch": {
          "type": "string",
          "description": "Default branch of the repository"
        },
        "size": {
          "type": "integer",
          "description": "Size of the repository in bytes"
        },
        "remoteUrl": {
          "type": "string",
          "format": "uri",
          "description": "Remote URL for cloning (HTTPS)"
        },
        "sshUrl": {
          "type": "string",
          "description": "SSH URL for cloning"
        },
        "webUrl": {
          "type": "string",
          "format": "uri",
          "description": "Web browser URL for the repository"
        },
        "parentRepository": {
          "type": [
            "object",
            "null"
          ],
          "description": "Parent repository (if this is a fork)",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "name": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "isFork": {
          "type": "boolean",
          "description": "Whether this repository is a fork of another"
        },
        "isDisabled": {
          "type": "boolean",
          "description": "Whether this repository is disabled"
        },
        "_links": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "href": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    },
    "GitUserDate": {
      "type": "object",
      "description": "Git user and date information",
      "properties": {
        "name": {
          "type": "string",
          "description": "User display name"
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "User email address"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time of the action"
        },
        "imageUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "IdentityRef": {
      "type": "object",
      "description": "Reference to an Azure DevOps user identity",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "displayName": {
          "type": "string"
        },
        "uniqueName": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "imageUrl": {
          "type": "string",
          "format": "uri"
        },
        "descriptor": {
          "type": "string"
        }
      }
    },
    "TeamProjectReference": {
      "type": "object",
      "description": "Reference to an Azure DevOps project",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "state": {
          "type": "string",
          "enum": [
            "deleting",
            "new",
            "wellFormed",
            "createPending",
            "all",
            "unchanged",
            "deleted"
          ]
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "revision": {
          "type": "integer"
        }
      }
    }
  }
}