{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"type": "object",
	"properties": {
		"id": {
			"type": "string",
			"description": "Unit id."
		},
		"path": {
			"type": "string",
			"description": "Unit root."
		},
		"kind": {
			"type": "string",
			"enum": [
				"release",
				"prerelease"
			],
			"description": "`release` for a stable release, `prerelease` for a build or cut prerelease."
		},
		"version": {
			"type": "string",
			"description": "Released version, or the prerelease version of the plan."
		},
		"channel": {
			"description": "Build, nightly or cut channel of a prerelease, null for a release.",
			"type": [
				"string",
				"null"
			]
		},
		"tag": {
			"description": "Version tag of a release or cut prerelease, null for a build prerelease. Members of a group with `tagFormat` share the group tag, so it repeats across their entries.",
			"type": [
				"string",
				"null"
			]
		},
		"releaseTag": {
			"description": "Tag of the forge release: the group's `releaseTag` for a member of a group that sets it, else `tag` (also for a group with `tagFormat`); null for a build prerelease.",
			"type": [
				"string",
				"null"
			]
		},
		"releaseSha": {
			"type": "string",
			"description": "Full sha of the tagged commit, or HEAD for a build prerelease."
		},
		"catchUp": {
			"type": "boolean",
			"description": "True when not built from HEAD by this run: the release commit is not HEAD, or the unit is outside the build set."
		},
		"forge": {
			"anyOf": [
				{
					"type": "object",
					"properties": {
						"pr": {
							"anyOf": [
								{
									"type": "object",
									"properties": {
										"number": {
											"type": "number"
										},
										"url": {
											"type": "string"
										}
									},
									"required": [
										"number",
										"url"
									],
									"additionalProperties": false
								},
								{
									"type": "null"
								}
							],
							"description": "PR that merged the release commit, else null."
						},
						"release": {
							"anyOf": [
								{
									"type": "object",
									"properties": {
										"url": {
											"type": "string"
										}
									},
									"required": [
										"url"
									],
									"additionalProperties": false
								},
								{
									"type": "null"
								}
							],
							"description": "Forge release of the tag, else null. Null also for a release that a dry run would create."
						}
					},
					"required": [
						"pr",
						"release"
					],
					"additionalProperties": false
				},
				{
					"type": "null"
				}
			],
			"description": "PR and forge release looked up on the forge, null for a build prerelease or without a forge."
		},
		"latest": {
			"type": "boolean",
			"description": "True for the unit's highest stable tag, never on a maintenance line; false for prereleases."
		},
		"changes": {
			"type": "array",
			"items": {
				"type": "object",
				"properties": {
					"sha": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"breaking": {
						"type": "boolean"
					},
					"scope": {
						"type": "string"
					},
					"subject": {
						"type": "string"
					},
					"notes": {
						"type": "string"
					},
					"pr": {
						"type": "number"
					},
					"via": {
						"type": "string"
					},
					"releaseAs": {
						"type": "string"
					},
					"units": {
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"files": {
						"type": "array",
						"items": {
							"type": "string"
						}
					}
				},
				"required": [
					"type",
					"breaking",
					"subject"
				],
				"additionalProperties": false
			},
			"description": "Changes in the shape of the plan's `units[].changes`: the unit's own, then those of the units it was propagated from (transitively), with `via` naming the owning unit. For a prerelease, those since the last stable release."
		},
		"tags": {
			"type": "array",
			"items": {
				"type": "string"
			},
			"description": "Sorted unit tags."
		},
		"group": {
			"description": "Fixed group of the unit, else null.",
			"type": [
				"string",
				"null"
			]
		},
		"line": {
			"type": "string",
			"enum": [
				"default",
				"maintenance"
			],
			"description": "Line of the planned branch."
		},
		"buildNumber": {
			"anyOf": [
				{
					"type": "integer",
					"minimum": -9007199254740991,
					"maximum": 9007199254740991
				},
				{
					"type": "null"
				}
			],
			"description": "First-parent commit count of `releaseSha` plus the unit's `buildNumber.offset`, null for a unit without `buildNumber`. Not part of the version."
		}
	},
	"required": [
		"id",
		"path",
		"kind",
		"version",
		"channel",
		"tag",
		"releaseTag",
		"releaseSha",
		"catchUp",
		"forge",
		"latest",
		"changes",
		"tags",
		"group",
		"line",
		"buildNumber"
	],
	"additionalProperties": false,
	"description": "One entry of the `releases` output of `run --github-output`."
}
