forges 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/LICENCE +21 -0
  2. package/README.md +72 -0
  3. package/dist/azure-devops/index.d.mts +2 -0
  4. package/dist/azure-devops/index.mjs +1 -0
  5. package/dist/azure-devops-DwQvL4TV.mjs +1355 -0
  6. package/dist/bitbucket/index.d.mts +2 -0
  7. package/dist/bitbucket/index.mjs +1 -0
  8. package/dist/bitbucket-CpcfJlYi.mjs +1171 -0
  9. package/dist/crypto-CQNEyYHD.mjs +156 -0
  10. package/dist/cursor-origin/index.d.mts +2 -0
  11. package/dist/cursor-origin/index.mjs +1 -0
  12. package/dist/cursor-origin-BhqYx2oW.mjs +980 -0
  13. package/dist/define-B2_4ob2i.d.mts +307 -0
  14. package/dist/define-D3yEXtKK.mjs +2276 -0
  15. package/dist/env.d.mts +46 -0
  16. package/dist/env.mjs +283 -0
  17. package/dist/fake/index.d.mts +227 -0
  18. package/dist/fake/index.mjs +1001 -0
  19. package/dist/fetch-D4pSRvvA.d.mts +1723 -0
  20. package/dist/forgejo/index.d.mts +2 -0
  21. package/dist/forgejo/index.mjs +1 -0
  22. package/dist/forgejo-BCefbHUN.mjs +2005 -0
  23. package/dist/gitea/index.d.mts +2 -0
  24. package/dist/gitea/index.mjs +22 -0
  25. package/dist/gitee/index.d.mts +2 -0
  26. package/dist/gitee/index.mjs +1 -0
  27. package/dist/gitee-CA-f7Rs8.mjs +1272 -0
  28. package/dist/github/index.d.mts +2 -0
  29. package/dist/github/index.mjs +1 -0
  30. package/dist/github-B0umL8_f.mjs +3259 -0
  31. package/dist/gitlab/index.d.mts +2 -0
  32. package/dist/gitlab/index.mjs +1 -0
  33. package/dist/gitlab-Bsr__Z0C.mjs +2378 -0
  34. package/dist/graphql-D7uGzZTf.mjs +366 -0
  35. package/dist/index-BQ6VS31s.d.mts +32 -0
  36. package/dist/index-C-jz9Mo3.d.mts +16 -0
  37. package/dist/index-C4fYzmK3.d.mts +102 -0
  38. package/dist/index-CQiIX4SH.d.mts +27 -0
  39. package/dist/index-CTj5gQzl.d.mts +35 -0
  40. package/dist/index-CliBWzOF.d.mts +23 -0
  41. package/dist/index-Cz_y-t3d.d.mts +36 -0
  42. package/dist/index-DEt25E1w.d.mts +77 -0
  43. package/dist/index-DIuS0EOy.d.mts +43 -0
  44. package/dist/index-uSpsMCrC.d.mts +26 -0
  45. package/dist/index.d.mts +41 -0
  46. package/dist/index.mjs +13 -0
  47. package/dist/kit.d.mts +183 -0
  48. package/dist/kit.mjs +4 -0
  49. package/dist/provider-CoZ7cCxp.d.mts +1439 -0
  50. package/dist/provider-Ed1YhkQN.mjs +169 -0
  51. package/dist/pushin/index.d.mts +2 -0
  52. package/dist/pushin/index.mjs +1 -0
  53. package/dist/pushin-CkxgJ2cU.mjs +343 -0
  54. package/dist/schema/Actor.json +96 -0
  55. package/dist/schema/AlertSupport.json +49 -0
  56. package/dist/schema/AuthKind.json +15 -0
  57. package/dist/schema/Branch.json +31 -0
  58. package/dist/schema/ChangedFile.json +58 -0
  59. package/dist/schema/Check.json +169 -0
  60. package/dist/schema/CheckRef.json +114 -0
  61. package/dist/schema/CheckState.json +14 -0
  62. package/dist/schema/ChecksSummary.json +34 -0
  63. package/dist/schema/CiJob.json +186 -0
  64. package/dist/schema/CiJobRef.json +132 -0
  65. package/dist/schema/CiRun.json +234 -0
  66. package/dist/schema/CiRunRef.json +103 -0
  67. package/dist/schema/CodeFragment.json +19 -0
  68. package/dist/schema/CodeMatch.json +128 -0
  69. package/dist/schema/Collaborator.json +169 -0
  70. package/dist/schema/Comment.json +336 -0
  71. package/dist/schema/CommentRef.json +158 -0
  72. package/dist/schema/Commit.json +307 -0
  73. package/dist/schema/CommitRef.json +104 -0
  74. package/dist/schema/CommitSignature.json +118 -0
  75. package/dist/schema/Comparison.json +355 -0
  76. package/dist/schema/Cursor.json +21 -0
  77. package/dist/schema/EventAction.json +33 -0
  78. package/dist/schema/EventDetail.json +649 -0
  79. package/dist/schema/EventKind.json +26 -0
  80. package/dist/schema/FileContent.json +73 -0
  81. package/dist/schema/FileStatus.json +15 -0
  82. package/dist/schema/ForgeCapabilities.json +737 -0
  83. package/dist/schema/ForgeEvent.json +789 -0
  84. package/dist/schema/ForgeInstance.json +7 -0
  85. package/dist/schema/ForgeKind.json +32 -0
  86. package/dist/schema/ForgeWarning.json +49 -0
  87. package/dist/schema/ForgeWarningCode.json +7 -0
  88. package/dist/schema/GetManyResult.json +699 -0
  89. package/dist/schema/Installation.json +131 -0
  90. package/dist/schema/InstallationToken.json +31 -0
  91. package/dist/schema/KnownForgeKind.json +19 -0
  92. package/dist/schema/Label.json +22 -0
  93. package/dist/schema/MergeMethod.json +14 -0
  94. package/dist/schema/Milestone.json +40 -0
  95. package/dist/schema/Notification.json +498 -0
  96. package/dist/schema/NotificationReason.json +28 -0
  97. package/dist/schema/NotificationRef.json +60 -0
  98. package/dist/schema/NotificationSubject.json +376 -0
  99. package/dist/schema/PerKind.json +49 -0
  100. package/dist/schema/PullBranches.json +125 -0
  101. package/dist/schema/PushCommit.json +24 -0
  102. package/dist/schema/Reaction.json +148 -0
  103. package/dist/schema/ReactionContent.json +17 -0
  104. package/dist/schema/ReactionSummary.json +70 -0
  105. package/dist/schema/Release.json +286 -0
  106. package/dist/schema/ReleaseAsset.json +169 -0
  107. package/dist/schema/ReleaseAssetRef.json +138 -0
  108. package/dist/schema/ReleaseRef.json +107 -0
  109. package/dist/schema/Repo.json +354 -0
  110. package/dist/schema/RepoFeatures.json +35 -0
  111. package/dist/schema/RepoPermissions.json +35 -0
  112. package/dist/schema/RepoRef.json +77 -0
  113. package/dist/schema/RepoRole.json +15 -0
  114. package/dist/schema/RepoVisibility.json +12 -0
  115. package/dist/schema/Review.json +371 -0
  116. package/dist/schema/ReviewComment.json +280 -0
  117. package/dist/schema/ReviewCommentInput.json +34 -0
  118. package/dist/schema/ReviewRef.json +158 -0
  119. package/dist/schema/ReviewState.json +15 -0
  120. package/dist/schema/Reviewer.json +133 -0
  121. package/dist/schema/SecurityAlert.json +219 -0
  122. package/dist/schema/SecurityAlertKind.json +14 -0
  123. package/dist/schema/SecurityAlertRef.json +122 -0
  124. package/dist/schema/SecuritySeverity.json +14 -0
  125. package/dist/schema/SourceKind.json +12 -0
  126. package/dist/schema/SubscriptionState.json +12 -0
  127. package/dist/schema/Support.json +23 -0
  128. package/dist/schema/Tag.json +25 -0
  129. package/dist/schema/TextLimits.json +18 -0
  130. package/dist/schema/Thread.json +653 -0
  131. package/dist/schema/ThreadKind.json +14 -0
  132. package/dist/schema/ThreadRef.json +131 -0
  133. package/dist/schema/ThreadStack.json +146 -0
  134. package/dist/schema/ThreadState.json +13 -0
  135. package/dist/schema/TreeEntry.json +46 -0
  136. package/dist/schema/TreeEntryType.json +13 -0
  137. package/dist/schema/UpsertCommentResult.json +355 -0
  138. package/dist/schema/User.json +123 -0
  139. package/dist/schema/Webhook.json +188 -0
  140. package/dist/schema/WebhookDeliveryRecord.json +173 -0
  141. package/dist/schema/WebhookDeliveryRef.json +135 -0
  142. package/dist/schema/WebhookRef.json +105 -0
  143. package/dist/schema/index.d.mts +4 -0
  144. package/dist/schema/index.mjs +3219 -0
  145. package/dist/tangled/index.d.mts +2 -0
  146. package/dist/tangled/index.mjs +1 -0
  147. package/dist/tangled-ChdPmiv-.mjs +1570 -0
  148. package/dist/testing/index.d.mts +123 -0
  149. package/dist/testing/index.mjs +242 -0
  150. package/dist/webhooks-rn9-8lxT.mjs +70 -0
  151. package/package.json +115 -3
  152. package/dist/.gitkeep +0 -0
@@ -0,0 +1,132 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "forge": {
6
+ "$ref": "#/definitions/ForgeKind"
7
+ },
8
+ "instance": {
9
+ "$ref": "#/definitions/ForgeInstance",
10
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
11
+ },
12
+ "repo": {
13
+ "$ref": "#/definitions/RepoRef"
14
+ },
15
+ "id": {
16
+ "type": "string"
17
+ },
18
+ "run": {
19
+ "$ref": "#/definitions/CiRunRef"
20
+ }
21
+ },
22
+ "required": [
23
+ "forge",
24
+ "id",
25
+ "instance",
26
+ "repo"
27
+ ],
28
+ "description": "One job inside a run. `run` is absent when the job was addressed on its own.",
29
+ "x-forges-type": "CiJobRef",
30
+ "definitions": {
31
+ "CiRunRef": {
32
+ "type": "object",
33
+ "properties": {
34
+ "forge": {
35
+ "$ref": "#/definitions/ForgeKind"
36
+ },
37
+ "instance": {
38
+ "$ref": "#/definitions/ForgeInstance",
39
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
40
+ },
41
+ "repo": {
42
+ "$ref": "#/definitions/RepoRef"
43
+ },
44
+ "id": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "required": [
49
+ "forge",
50
+ "id",
51
+ "instance",
52
+ "repo"
53
+ ],
54
+ "description": "A CI run: a workflow run, a pipeline, or a build.",
55
+ "x-forges-type": "CiRunRef"
56
+ },
57
+ "ForgeInstance": {
58
+ "type": "string",
59
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
60
+ "x-forges-type": "ForgeInstance"
61
+ },
62
+ "ForgeKind": {
63
+ "anyOf": [
64
+ {
65
+ "$ref": "#/definitions/KnownForgeKind"
66
+ },
67
+ {
68
+ "type": "string"
69
+ }
70
+ ],
71
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
72
+ "x-forges-type": "ForgeKind"
73
+ },
74
+ "KnownForgeKind": {
75
+ "type": "string",
76
+ "enum": [
77
+ "github",
78
+ "gitlab",
79
+ "bitbucket",
80
+ "forgejo",
81
+ "gitea",
82
+ "tangled",
83
+ "gitee",
84
+ "azure-devops",
85
+ "cursor-origin",
86
+ "pushin"
87
+ ],
88
+ "description": "The forges this package ships providers for.",
89
+ "x-forges-type": "KnownForgeKind"
90
+ },
91
+ "RepoRef": {
92
+ "type": "object",
93
+ "properties": {
94
+ "forge": {
95
+ "$ref": "#/definitions/ForgeKind"
96
+ },
97
+ "instance": {
98
+ "$ref": "#/definitions/ForgeInstance",
99
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
100
+ },
101
+ "owner": {
102
+ "type": "string",
103
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
104
+ },
105
+ "name": {
106
+ "type": "string",
107
+ "description": "Repository name. Empty for namespace-scoped refs."
108
+ },
109
+ "kind": {
110
+ "type": "string",
111
+ "enum": [
112
+ "repo",
113
+ "namespace"
114
+ ],
115
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
116
+ },
117
+ "externalId": {
118
+ "type": "string",
119
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
120
+ }
121
+ },
122
+ "required": [
123
+ "forge",
124
+ "instance",
125
+ "name",
126
+ "owner"
127
+ ],
128
+ "description": "Addresses a repository by its forge, instance, owner and name.",
129
+ "x-forges-type": "RepoRef"
130
+ }
131
+ }
132
+ }
@@ -0,0 +1,234 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "ref": {
6
+ "$ref": "#/definitions/CiRunRef"
7
+ },
8
+ "name": {
9
+ "type": "string"
10
+ },
11
+ "state": {
12
+ "$ref": "#/definitions/CheckState"
13
+ },
14
+ "stateRaw": {
15
+ "type": "string"
16
+ },
17
+ "number": {
18
+ "type": "string",
19
+ "description": "Per-repo run number, where the forge has one."
20
+ },
21
+ "eventRaw": {
22
+ "type": "string",
23
+ "description": "What triggered the run, as the forge names it."
24
+ },
25
+ "branch": {
26
+ "type": "string"
27
+ },
28
+ "sha": {
29
+ "type": "string",
30
+ "description": "The commit that the run ran on."
31
+ },
32
+ "url": {
33
+ "type": "string"
34
+ },
35
+ "actor": {
36
+ "$ref": "#/definitions/Actor"
37
+ },
38
+ "createdAt": {
39
+ "type": "string",
40
+ "format": "date-time"
41
+ },
42
+ "startedAt": {
43
+ "type": "string",
44
+ "format": "date-time"
45
+ },
46
+ "completedAt": {
47
+ "type": "string",
48
+ "format": "date-time"
49
+ },
50
+ "raw": {}
51
+ },
52
+ "required": [
53
+ "ref",
54
+ "name",
55
+ "state",
56
+ "stateRaw",
57
+ "raw"
58
+ ],
59
+ "description": "A CI run, such as a workflow run or a pipeline.",
60
+ "x-forges-type": "CiRun",
61
+ "definitions": {
62
+ "Actor": {
63
+ "type": "object",
64
+ "properties": {
65
+ "forge": {
66
+ "$ref": "#/definitions/ForgeKind"
67
+ },
68
+ "instance": {
69
+ "$ref": "#/definitions/ForgeInstance",
70
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
71
+ },
72
+ "login": {
73
+ "type": "string"
74
+ },
75
+ "id": {
76
+ "type": "string"
77
+ },
78
+ "name": {
79
+ "type": "string"
80
+ },
81
+ "avatarUrl": {
82
+ "type": "string"
83
+ },
84
+ "url": {
85
+ "type": "string"
86
+ },
87
+ "typeRaw": {
88
+ "type": "string",
89
+ "description": "Forge-reported account type, retained verbatim for callers that classify further."
90
+ },
91
+ "isBotHint": {
92
+ "type": "boolean",
93
+ "description": "Hint derived from forge metadata that the actor is automation. Callers own the classification policy."
94
+ },
95
+ "app": {
96
+ "type": "object",
97
+ "properties": {
98
+ "slug": {
99
+ "type": "string"
100
+ },
101
+ "id": {
102
+ "type": "string"
103
+ }
104
+ },
105
+ "required": [
106
+ "slug"
107
+ ],
108
+ "description": "The app behind a bot account, where the forge ties one to it (GitHub Apps' `slug[bot]` users)."
109
+ }
110
+ },
111
+ "required": [
112
+ "forge",
113
+ "id",
114
+ "instance",
115
+ "isBotHint",
116
+ "login"
117
+ ],
118
+ "description": "An account: a user, an organisation or a bot.",
119
+ "x-forges-type": "Actor"
120
+ },
121
+ "CheckState": {
122
+ "type": "string",
123
+ "enum": [
124
+ "pending",
125
+ "success",
126
+ "failure",
127
+ "neutral",
128
+ "unknown"
129
+ ],
130
+ "description": "`neutral` covers skipped and informational results, which neither pass nor fail.",
131
+ "x-forges-type": "CheckState"
132
+ },
133
+ "CiRunRef": {
134
+ "type": "object",
135
+ "properties": {
136
+ "forge": {
137
+ "$ref": "#/definitions/ForgeKind"
138
+ },
139
+ "instance": {
140
+ "$ref": "#/definitions/ForgeInstance",
141
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
142
+ },
143
+ "repo": {
144
+ "$ref": "#/definitions/RepoRef"
145
+ },
146
+ "id": {
147
+ "type": "string"
148
+ }
149
+ },
150
+ "required": [
151
+ "forge",
152
+ "id",
153
+ "instance",
154
+ "repo"
155
+ ],
156
+ "description": "A CI run: a workflow run, a pipeline, or a build.",
157
+ "x-forges-type": "CiRunRef"
158
+ },
159
+ "ForgeInstance": {
160
+ "type": "string",
161
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
162
+ "x-forges-type": "ForgeInstance"
163
+ },
164
+ "ForgeKind": {
165
+ "anyOf": [
166
+ {
167
+ "$ref": "#/definitions/KnownForgeKind"
168
+ },
169
+ {
170
+ "type": "string"
171
+ }
172
+ ],
173
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
174
+ "x-forges-type": "ForgeKind"
175
+ },
176
+ "KnownForgeKind": {
177
+ "type": "string",
178
+ "enum": [
179
+ "github",
180
+ "gitlab",
181
+ "bitbucket",
182
+ "forgejo",
183
+ "gitea",
184
+ "tangled",
185
+ "gitee",
186
+ "azure-devops",
187
+ "cursor-origin",
188
+ "pushin"
189
+ ],
190
+ "description": "The forges this package ships providers for.",
191
+ "x-forges-type": "KnownForgeKind"
192
+ },
193
+ "RepoRef": {
194
+ "type": "object",
195
+ "properties": {
196
+ "forge": {
197
+ "$ref": "#/definitions/ForgeKind"
198
+ },
199
+ "instance": {
200
+ "$ref": "#/definitions/ForgeInstance",
201
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
202
+ },
203
+ "owner": {
204
+ "type": "string",
205
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
206
+ },
207
+ "name": {
208
+ "type": "string",
209
+ "description": "Repository name. Empty for namespace-scoped refs."
210
+ },
211
+ "kind": {
212
+ "type": "string",
213
+ "enum": [
214
+ "repo",
215
+ "namespace"
216
+ ],
217
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
218
+ },
219
+ "externalId": {
220
+ "type": "string",
221
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
222
+ }
223
+ },
224
+ "required": [
225
+ "forge",
226
+ "instance",
227
+ "name",
228
+ "owner"
229
+ ],
230
+ "description": "Addresses a repository by its forge, instance, owner and name.",
231
+ "x-forges-type": "RepoRef"
232
+ }
233
+ }
234
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "forge": {
6
+ "$ref": "#/definitions/ForgeKind"
7
+ },
8
+ "instance": {
9
+ "$ref": "#/definitions/ForgeInstance",
10
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
11
+ },
12
+ "repo": {
13
+ "$ref": "#/definitions/RepoRef"
14
+ },
15
+ "id": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "required": [
20
+ "forge",
21
+ "id",
22
+ "instance",
23
+ "repo"
24
+ ],
25
+ "description": "A CI run: a workflow run, a pipeline, or a build.",
26
+ "x-forges-type": "CiRunRef",
27
+ "definitions": {
28
+ "ForgeInstance": {
29
+ "type": "string",
30
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
31
+ "x-forges-type": "ForgeInstance"
32
+ },
33
+ "ForgeKind": {
34
+ "anyOf": [
35
+ {
36
+ "$ref": "#/definitions/KnownForgeKind"
37
+ },
38
+ {
39
+ "type": "string"
40
+ }
41
+ ],
42
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
43
+ "x-forges-type": "ForgeKind"
44
+ },
45
+ "KnownForgeKind": {
46
+ "type": "string",
47
+ "enum": [
48
+ "github",
49
+ "gitlab",
50
+ "bitbucket",
51
+ "forgejo",
52
+ "gitea",
53
+ "tangled",
54
+ "gitee",
55
+ "azure-devops",
56
+ "cursor-origin",
57
+ "pushin"
58
+ ],
59
+ "description": "The forges this package ships providers for.",
60
+ "x-forges-type": "KnownForgeKind"
61
+ },
62
+ "RepoRef": {
63
+ "type": "object",
64
+ "properties": {
65
+ "forge": {
66
+ "$ref": "#/definitions/ForgeKind"
67
+ },
68
+ "instance": {
69
+ "$ref": "#/definitions/ForgeInstance",
70
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
71
+ },
72
+ "owner": {
73
+ "type": "string",
74
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
75
+ },
76
+ "name": {
77
+ "type": "string",
78
+ "description": "Repository name. Empty for namespace-scoped refs."
79
+ },
80
+ "kind": {
81
+ "type": "string",
82
+ "enum": [
83
+ "repo",
84
+ "namespace"
85
+ ],
86
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
87
+ },
88
+ "externalId": {
89
+ "type": "string",
90
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
91
+ }
92
+ },
93
+ "required": [
94
+ "forge",
95
+ "instance",
96
+ "name",
97
+ "owner"
98
+ ],
99
+ "description": "Addresses a repository by its forge, instance, owner and name.",
100
+ "x-forges-type": "RepoRef"
101
+ }
102
+ }
103
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "text": {
6
+ "type": "string"
7
+ },
8
+ "line": {
9
+ "type": "number",
10
+ "description": "The line the excerpt starts on, where the forge reports it."
11
+ }
12
+ },
13
+ "required": [
14
+ "text"
15
+ ],
16
+ "description": "An excerpt of a file that matched a code search.",
17
+ "x-forges-type": "CodeFragment",
18
+ "definitions": {}
19
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "repo": {
6
+ "$ref": "#/definitions/RepoRef"
7
+ },
8
+ "path": {
9
+ "type": "string"
10
+ },
11
+ "ref": {
12
+ "type": "string",
13
+ "description": "The branch, tag or sha the forge searched, where it reports one."
14
+ },
15
+ "fragments": {
16
+ "type": "array",
17
+ "items": {
18
+ "$ref": "#/definitions/CodeFragment"
19
+ },
20
+ "description": "The excerpts of the file that matched."
21
+ },
22
+ "url": {
23
+ "type": "string"
24
+ },
25
+ "raw": {}
26
+ },
27
+ "required": [
28
+ "repo",
29
+ "path",
30
+ "fragments",
31
+ "raw"
32
+ ],
33
+ "description": "A file that a code search found. A file whose excerpts span two pages comes back on both.",
34
+ "x-forges-type": "CodeMatch",
35
+ "definitions": {
36
+ "CodeFragment": {
37
+ "type": "object",
38
+ "properties": {
39
+ "text": {
40
+ "type": "string"
41
+ },
42
+ "line": {
43
+ "type": "number",
44
+ "description": "The line the excerpt starts on, where the forge reports it."
45
+ }
46
+ },
47
+ "required": [
48
+ "text"
49
+ ],
50
+ "description": "An excerpt of a file that matched a code search.",
51
+ "x-forges-type": "CodeFragment"
52
+ },
53
+ "ForgeInstance": {
54
+ "type": "string",
55
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
56
+ "x-forges-type": "ForgeInstance"
57
+ },
58
+ "ForgeKind": {
59
+ "anyOf": [
60
+ {
61
+ "$ref": "#/definitions/KnownForgeKind"
62
+ },
63
+ {
64
+ "type": "string"
65
+ }
66
+ ],
67
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
68
+ "x-forges-type": "ForgeKind"
69
+ },
70
+ "KnownForgeKind": {
71
+ "type": "string",
72
+ "enum": [
73
+ "github",
74
+ "gitlab",
75
+ "bitbucket",
76
+ "forgejo",
77
+ "gitea",
78
+ "tangled",
79
+ "gitee",
80
+ "azure-devops",
81
+ "cursor-origin",
82
+ "pushin"
83
+ ],
84
+ "description": "The forges this package ships providers for.",
85
+ "x-forges-type": "KnownForgeKind"
86
+ },
87
+ "RepoRef": {
88
+ "type": "object",
89
+ "properties": {
90
+ "forge": {
91
+ "$ref": "#/definitions/ForgeKind"
92
+ },
93
+ "instance": {
94
+ "$ref": "#/definitions/ForgeInstance",
95
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
96
+ },
97
+ "owner": {
98
+ "type": "string",
99
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
100
+ },
101
+ "name": {
102
+ "type": "string",
103
+ "description": "Repository name. Empty for namespace-scoped refs."
104
+ },
105
+ "kind": {
106
+ "type": "string",
107
+ "enum": [
108
+ "repo",
109
+ "namespace"
110
+ ],
111
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
112
+ },
113
+ "externalId": {
114
+ "type": "string",
115
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
116
+ }
117
+ },
118
+ "required": [
119
+ "forge",
120
+ "instance",
121
+ "name",
122
+ "owner"
123
+ ],
124
+ "description": "Addresses a repository by its forge, instance, owner and name.",
125
+ "x-forges-type": "RepoRef"
126
+ }
127
+ }
128
+ }