{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/pullrequest",
"title": "pullrequest",
"allOf": [
{
"$ref": "#/components/schemas/object"
},
{
"type": "object",
"title": "Pull Request",
"description": "A pull request object.",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"html": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"commits": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"approve": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"diff": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"diffstat": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"comments": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"activity": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"merge": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"decline": {
"type": "object",
"title": "Link",
"description": "A link to a resource related to this object.",
"properties": {
"href": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"id": {
"type": "integer",
"description": "The pull request's unique ID. Note that pull request IDs are only unique within their associated repository."
},
"title": {
"type": "string",
"description": "Title of the pull request."
},
"rendered": {
"type": "object",
"title": "Rendered Pull Request Markup",
"description": "User provided pull request text, interpreted in a markup language and rendered in HTML",
"properties": {
"title": {
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "The text as it was typed by a user."
},
"markup": {
"type": "string",
"description": "The type of markup language the raw content is to be interpreted in.",
"enum": [
"markdown",
"creole",
"plaintext"
]
},
"html": {
"type": "string",
"description": "The user's content rendered as HTML."
}
},
"additionalProperties": false
},
"description": {
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "The text as it was typed by a user."
},
"markup": {
"type": "string",
"description": "The type of markup language the raw content is to be interpreted in.",
"enum": [
"markdown",
"creole",
"plaintext"
]
},
"html": {
"type": "string",
"description": "The user's content rendered as HTML."
}
},
"additionalProperties": false
},
"reason": {
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "The text as it was typed by a user."
},
"markup": {
"type": "string",
"description": "The type of markup language the raw content is to be interpreted in.",
"enum": [
"markdown",
"creole",
"plaintext"
]
},
"html": {
"type": "string",
"description": "The user's content rendered as HTML."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"summary": {
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "The text as it was typed by a user."
},
"markup": {
"type": "string",
"description": "The type of markup language the raw content is to be interpreted in.",
"enum": [
"markdown",
"creole",
"plaintext"
]
},
"html": {
"type": "string",
"description": "The user's content rendered as HTML."
}
},
"additionalProperties": false
},
"state": {
"type": "string",
"description": "The pull request's current status.",
"enum": [
"OPEN",
"MERGED",
"DECLINED",
"SUPERSEDED"
]
},
"author": {
"$ref": "#/components/schemas/account"
},
"source": {
"$ref": "#/components/schemas/pullrequest_endpoint"
},
"destination": {
"$ref": "#/components/schemas/pullrequest_endpoint"
},
"merge_commit": {
"type": "object",
"title": "Pull Request Commit",
"properties": {
"hash": {
"type": "string",
"pattern": "[0-9a-f]{7,}?"
}
},
"additionalProperties": false
},
"comment_count": {
"type": "integer",
"description": "The number of comments for a specific pull request.",
"minimum": 0
},
"task_count": {
"type": "integer",
"description": "The number of open tasks for a specific pull request.",
"minimum": 0
},
"close_source_branch": {
"type": "boolean",
"description": "A boolean flag indicating if merging the pull request closes the source branch."
},
"closed_by": {
"$ref": "#/components/schemas/account"
},
"reason": {
"type": "string",
"description": "Explains why a pull request was declined. This field is only applicable to pull requests in rejected state."
},
"created_on": {
"type": "string",
"description": "The ISO8601 timestamp the request was created.",
"format": "date-time"
},
"updated_on": {
"type": "string",
"description": "The ISO8601 timestamp the request was last updated.",
"format": "date-time"
},
"reviewers": {
"type": "array",
"description": "The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL.",
"items": {
"$ref": "#/components/schemas/account"
}
},
"participants": {
"type": "array",
"description": " The list of users that are collaborating on this pull request.\n Collaborators are user that:\n\n * are added to the pull request as a reviewer (part of the reviewers\n list)\n * are not explicit reviewers, but have commented on the pull request\n * are not explicit reviewers, but have approved the pull request\n\n Each user is wrapped in an object that indicates the user's role and\n whether they have approved the pull request. For performance reasons,\n the API only returns this list when an API requests a pull request by\n id.\n ",
"items": {
"$ref": "#/components/schemas/participant"
}
}
},
"additionalProperties": true
}
]
}