-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathschema.json
More file actions
96 lines (96 loc) · 3.17 KB
/
Copy pathschema.json
File metadata and controls
96 lines (96 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "gh-stack file",
"description": "Schema for the .git/gh-stack file that stores the state of all stacks in a repository.",
"type": "object",
"required": ["schemaVersion", "stacks"],
"properties": {
"schemaVersion": {
"type": "integer",
"const": 1,
"description": "Schema version for forward compatibility."
},
"repository": {
"type": "string",
"description": "The host:owner/name of the repository (e.g. 'github.com:github/gh-stack')."
},
"stacks": {
"type": "array",
"description": "All stacks tracked in this repository.",
"items": { "$ref": "#/$defs/stack" }
}
},
"$defs": {
"stack": {
"type": "object",
"description": "A single stack of branches.",
"required": ["trunk", "branches"],
"properties": {
"id": {
"type": "string",
"description": "Global identifier for this stack, populated from the API when available."
},
"number": {
"type": "integer",
"description": "Repo-scoped number identifying this stack, displayed in the GitHub UI. Used as the primary way to reference a stack."
},
"trunk": {
"$ref": "#/$defs/branchRef",
"description": "The trunk (base) branch of the stack."
},
"branches": {
"type": "array",
"description": "Ordered list of branches in the stack, from bottom to top.",
"items": { "$ref": "#/$defs/branchRef" }
}
}
},
"branchRef": {
"type": "object",
"description": "A reference to a branch and its associated commit hash. For the trunk, 'head' stores the HEAD commit. For stacked branches, 'base' stores the parent branch's HEAD SHA at the time of last sync/rebase.",
"required": ["branch"],
"properties": {
"branch": {
"type": "string",
"description": "The branch name."
},
"head": {
"type": "string",
"description": "The HEAD commit SHA of this branch. Used for the trunk branch."
},
"base": {
"type": "string",
"description": "The parent branch's HEAD SHA at the time of last sync/rebase. Used to identify which commits are unique to this branch."
},
"pullRequest": {
"$ref": "#/$defs/pullRequestRef",
"description": "Associated pull request information, if a PR exists for this branch."
}
}
},
"pullRequestRef": {
"type": "object",
"description": "A snapshot of pull request metadata.",
"required": ["number"],
"properties": {
"number": {
"type": "integer",
"description": "The PR number, scoped to the repository."
},
"id": {
"type": "string",
"description": "The PR global node ID."
},
"url": {
"type": "string",
"format": "uri",
"description": "Direct URL to the pull request."
},
"merged": {
"type": "boolean",
"description": "Whether the pull request has been merged."
}
}
}
}
}