@useairfoil/producer-github 0.0.2 → 0.0.3
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.
- package/LICENSE.txt +201 -0
- package/dist/index.mjs +1 -1
- package/dist/main.mjs +6 -4
- package/dist/main.mjs.map +1 -1
- package/dist/{src-D6cTmVtF.mjs → src-DKDUc00e.mjs} +272 -275
- package/dist/src-DKDUc00e.mjs.map +1 -0
- package/package.json +17 -17
- package/src/create-table.ts +6 -1
- package/src/main.ts +8 -2
- package/src/schemas/check-runs.ts +46 -22
- package/src/schemas/commit-statuses.ts +32 -12
- package/src/schemas/commits.ts +49 -33
- package/src/schemas/issue-comments.ts +22 -12
- package/src/schemas/issues.ts +38 -24
- package/src/schemas/pull-request-commits.ts +26 -12
- package/src/schemas/pull-request-review-comments.ts +41 -23
- package/src/schemas/pull-request-reviews.ts +29 -13
- package/src/schemas/pull-requests.ts +64 -44
- package/src/schemas/releases.ts +49 -32
- package/src/schemas/repositories.ts +40 -20
- package/src/schemas/shared.ts +24 -34
- package/src/schemas/workflow-jobs.ts +51 -27
- package/src/schemas/workflow-runs.ts +47 -30
- package/src/start.ts +2 -2
- package/dist/src-D6cTmVtF.mjs.map +0 -1
|
@@ -159,7 +159,6 @@ const layer$1 = (config) => Layer.effect(GitHubClient)(make$1()).pipe(Layer.prov
|
|
|
159
159
|
const layerConfig$1 = (config) => Layer.unwrap(Config.unwrap(config).pipe(Effect.map(layer$1)));
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/schemas/shared.ts
|
|
162
|
-
const field = (fieldId, description) => Iceberg.field(fieldId, { description });
|
|
163
162
|
/** IDs and counts. Connector Kit maps whole numbers to Iceberg longs. */
|
|
164
163
|
const Long = Schema.Int.pipe(Schema.decodeTo(Schema.BigInt, SchemaTransformation.transform({
|
|
165
164
|
decode: (value) => BigInt(value),
|
|
@@ -176,68 +175,66 @@ const optionalList = (item) => Schema.optionalKey(Schema.NullOr(Schema.Array(ite
|
|
|
176
175
|
decode: (value) => value ?? [],
|
|
177
176
|
encode: (value) => value
|
|
178
177
|
}))));
|
|
179
|
-
const user =
|
|
180
|
-
id: Long.pipe(
|
|
181
|
-
login: Schema.String.pipe(
|
|
182
|
-
type: Schema.String.pipe(
|
|
183
|
-
});
|
|
184
|
-
const label =
|
|
185
|
-
id: Long.pipe(
|
|
186
|
-
name: Schema.String.pipe(
|
|
187
|
-
});
|
|
188
|
-
const milestone =
|
|
189
|
-
id: Long.pipe(
|
|
190
|
-
number: Long.pipe(
|
|
191
|
-
title: Schema.String.pipe(
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
const list = (elementId, item) => Schema.Array(item.annotate({ fieldId: elementId }));
|
|
195
|
-
const version = (fieldId, object) => Schema.Date.pipe(field(fieldId, `Time GitHub last updated the ${object}.`));
|
|
178
|
+
const user = Schema.Struct({
|
|
179
|
+
id: Long.pipe(Schema.annotateKey({ description: "GitHub user ID." })),
|
|
180
|
+
login: Schema.String.pipe(Schema.annotateKey({ description: "GitHub username." })),
|
|
181
|
+
type: Schema.String.pipe(Schema.annotateKey({ description: "Account type, such as User, Bot, or Organization." }))
|
|
182
|
+
});
|
|
183
|
+
const label = Schema.Struct({
|
|
184
|
+
id: Long.pipe(Schema.annotateKey({ description: "Label ID." })),
|
|
185
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Label name." }))
|
|
186
|
+
});
|
|
187
|
+
const milestone = Schema.Struct({
|
|
188
|
+
id: Long.pipe(Schema.annotateKey({ description: "Milestone ID." })),
|
|
189
|
+
number: Long.pipe(Schema.annotateKey({ description: "Milestone number in the repository." })),
|
|
190
|
+
title: Schema.String.pipe(Schema.annotateKey({ description: "Milestone title." }))
|
|
191
|
+
});
|
|
192
|
+
const version = (object) => Schema.Date.pipe(Schema.annotateKey({ description: `Time GitHub last updated the ${object}.` }));
|
|
196
193
|
/** For objects without an update time. A newer read wins. */
|
|
197
|
-
const readVersion = (
|
|
198
|
-
const deleted = (
|
|
194
|
+
const readVersion = (object) => Schema.Date.pipe(Schema.annotateKey({ description: `Time the connector read the ${object}. GitHub has no update time for it.` }));
|
|
195
|
+
const deleted = (object) => Schema.optional(Schema.Boolean).pipe(Schema.annotateKey({ description: `Whether the ${object} was deleted in GitHub.` }));
|
|
199
196
|
const ObjectRefSchema = Schema.Struct({ id: Long });
|
|
200
197
|
//#endregion
|
|
201
198
|
//#region src/schemas/check-runs.ts
|
|
202
199
|
const CheckRunSchema = Schema.Struct({
|
|
203
|
-
id: Long.pipe(
|
|
204
|
-
version: readVersion(
|
|
205
|
-
node_id: Schema.String.pipe(
|
|
206
|
-
repository_id: Long.pipe(
|
|
207
|
-
head_sha: Schema.String.pipe(
|
|
208
|
-
name: Schema.String.pipe(
|
|
209
|
-
status: Schema.String.pipe(
|
|
210
|
-
conclusion: Schema.NullOr(Schema.String).pipe(
|
|
211
|
-
started_at: Schema.NullOr(Timestamp).pipe(
|
|
212
|
-
completed_at: Schema.NullOr(Timestamp).pipe(
|
|
200
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique check run ID." })),
|
|
201
|
+
version: readVersion("check run"),
|
|
202
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the check run." })),
|
|
203
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the check run belongs to." })),
|
|
204
|
+
head_sha: Schema.String.pipe(Schema.annotateKey({ description: "SHA of the commit the check ran on." })),
|
|
205
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Check name." })),
|
|
206
|
+
status: Schema.String.pipe(Schema.annotateKey({ description: "Status, such as queued, in_progress, or completed." })),
|
|
207
|
+
conclusion: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Result of a completed check, such as success or failure." })),
|
|
208
|
+
started_at: Schema.NullOr(Timestamp).pipe(Schema.annotateKey({ description: "Time the check started." })),
|
|
209
|
+
completed_at: Schema.NullOr(Timestamp).pipe(Schema.annotateKey({ description: "Time the check completed." })),
|
|
213
210
|
app: Schema.NullOr(Schema.Struct({
|
|
214
|
-
id: Long.pipe(
|
|
215
|
-
name: Schema.String.pipe(
|
|
216
|
-
})).pipe(
|
|
217
|
-
check_suite: Schema.NullOr(Schema.Struct({ id: Long.pipe(
|
|
211
|
+
id: Long.pipe(Schema.annotateKey({ description: "GitHub App ID." })),
|
|
212
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "GitHub App name." }))
|
|
213
|
+
})).pipe(Schema.annotateKey({ description: "GitHub App that created the check, such as GitHub Actions." })),
|
|
214
|
+
check_suite: Schema.NullOr(Schema.Struct({ id: Long.pipe(Schema.annotateKey({ description: "Check suite ID." })) })).pipe(Schema.annotateKey({ description: "Check suite the check run belongs to." })),
|
|
218
215
|
output: Schema.Struct({
|
|
219
|
-
title: Schema.NullOr(Schema.String).pipe(
|
|
220
|
-
summary: Schema.NullOr(Schema.String).pipe(
|
|
221
|
-
}).pipe(
|
|
222
|
-
external_id: Schema.NullOr(Schema.String).pipe(
|
|
223
|
-
details_url: Schema.NullOr(Schema.String).pipe(
|
|
224
|
-
html_url: Schema.NullOr(Schema.String).pipe(
|
|
216
|
+
title: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Output title." })),
|
|
217
|
+
summary: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Output summary in Markdown." }))
|
|
218
|
+
}).pipe(Schema.annotateKey({ description: "Output the check reported." })),
|
|
219
|
+
external_id: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "ID the app gave the check." })),
|
|
220
|
+
details_url: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Details page from the app." })),
|
|
221
|
+
html_url: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Check run page on GitHub." }))
|
|
225
222
|
}).annotate({ description: "Check runs, such as GitHub Actions jobs. Polled for default-branch commits; webhooks cover all branches." }).pipe(Iceberg.identifier("id"));
|
|
226
223
|
const CheckRunObjectSchema = CheckRunSchema.mapFields((fields) => Struct.omit(fields, ["version", "repository_id"]));
|
|
227
224
|
//#endregion
|
|
228
225
|
//#region src/schemas/issue-comments.ts
|
|
229
226
|
const IssueCommentSchema = Schema.Struct({
|
|
230
|
-
id: Long.pipe(
|
|
231
|
-
version: version(
|
|
232
|
-
node_id: Schema.String.pipe(
|
|
233
|
-
repository_id: Long.pipe(
|
|
234
|
-
issue_number: Long.pipe(
|
|
235
|
-
user: Schema.NullOr(user
|
|
236
|
-
author_association: Schema.String.pipe(
|
|
237
|
-
body: Text.pipe(
|
|
238
|
-
created_at: Timestamp.pipe(
|
|
239
|
-
html_url: Schema.String.pipe(
|
|
240
|
-
_deleted: deleted(
|
|
227
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique comment ID." })),
|
|
228
|
+
version: version("comment"),
|
|
229
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the comment." })),
|
|
230
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the comment belongs to." })),
|
|
231
|
+
issue_number: Long.pipe(Schema.annotateKey({ description: "Number of the issue or pull request the comment is on, in its repository." })),
|
|
232
|
+
user: Schema.NullOr(user).pipe(Schema.annotateKey({ description: "Account that wrote the comment." })),
|
|
233
|
+
author_association: Schema.String.pipe(Schema.annotateKey({ description: "Author's relation to the repository, such as OWNER or CONTRIBUTOR." })),
|
|
234
|
+
body: Text.pipe(Schema.annotateKey({ description: "Comment in Markdown. Empty when not set." })),
|
|
235
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the comment was written." })),
|
|
236
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Comment on GitHub." })),
|
|
237
|
+
_deleted: deleted("comment")
|
|
241
238
|
}).annotate({ description: "Comments on issues and pull requests. Pull request review comments are not included." }).pipe(Iceberg.identifier("id"));
|
|
242
239
|
const IssueCommentObjectSchema = IssueCommentSchema.mapFields((fields) => ({
|
|
243
240
|
...Struct.omit(fields, [
|
|
@@ -252,26 +249,26 @@ const IssueCommentObjectSchema = IssueCommentSchema.mapFields((fields) => ({
|
|
|
252
249
|
//#endregion
|
|
253
250
|
//#region src/schemas/issues.ts
|
|
254
251
|
const IssueSchema = Schema.Struct({
|
|
255
|
-
id: Long.pipe(
|
|
256
|
-
version: version(
|
|
257
|
-
node_id: Schema.String.pipe(
|
|
258
|
-
repository_id: Long.pipe(
|
|
259
|
-
number: Long.pipe(
|
|
260
|
-
title: Schema.String.pipe(
|
|
261
|
-
body: Text.pipe(
|
|
262
|
-
state: Schema.String.pipe(
|
|
263
|
-
state_reason: Schema.NullOr(Schema.String).pipe(
|
|
264
|
-
locked: Schema.Boolean.pipe(
|
|
265
|
-
user: Schema.NullOr(user
|
|
266
|
-
author_association: Schema.String.pipe(
|
|
267
|
-
labels:
|
|
268
|
-
assignees:
|
|
269
|
-
milestone: Schema.NullOr(milestone
|
|
270
|
-
comments: Long.pipe(
|
|
271
|
-
created_at: Timestamp.pipe(
|
|
272
|
-
closed_at: Schema.NullOr(Timestamp).pipe(
|
|
273
|
-
html_url: Schema.String.pipe(
|
|
274
|
-
_deleted: deleted(
|
|
252
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique issue ID." })),
|
|
253
|
+
version: version("issue"),
|
|
254
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the issue." })),
|
|
255
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the issue belongs to." })),
|
|
256
|
+
number: Long.pipe(Schema.annotateKey({ description: "Issue number in the repository." })),
|
|
257
|
+
title: Schema.String.pipe(Schema.annotateKey({ description: "Issue title." })),
|
|
258
|
+
body: Text.pipe(Schema.annotateKey({ description: "Issue description in Markdown. Empty when not set." })),
|
|
259
|
+
state: Schema.String.pipe(Schema.annotateKey({ description: "State: open or closed." })),
|
|
260
|
+
state_reason: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Why the issue was closed or reopened, such as completed or not_planned." })),
|
|
261
|
+
locked: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the conversation is locked." })),
|
|
262
|
+
user: Schema.NullOr(user).pipe(Schema.annotateKey({ description: "Account that opened the issue." })),
|
|
263
|
+
author_association: Schema.String.pipe(Schema.annotateKey({ description: "Author's relation to the repository, such as OWNER or CONTRIBUTOR." })),
|
|
264
|
+
labels: Schema.Array(label).pipe(Schema.annotateKey({ description: "Labels on the issue." })),
|
|
265
|
+
assignees: Schema.Array(user).pipe(Schema.annotateKey({ description: "Accounts assigned to the issue." })),
|
|
266
|
+
milestone: Schema.NullOr(milestone).pipe(Schema.annotateKey({ description: "Milestone of the issue." })),
|
|
267
|
+
comments: Long.pipe(Schema.annotateKey({ description: "Number of comments." })),
|
|
268
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the issue was opened." })),
|
|
269
|
+
closed_at: Schema.NullOr(Timestamp).pipe(Schema.annotateKey({ description: "Time the issue was closed. Null while it is open." })),
|
|
270
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Issue page on GitHub." })),
|
|
271
|
+
_deleted: deleted("issue")
|
|
275
272
|
}).annotate({ description: "Issues in the installation's repositories. Pull requests are not included." }).pipe(Iceberg.identifier("id"));
|
|
276
273
|
const IssueObjectSchema = IssueSchema.mapFields((fields) => ({
|
|
277
274
|
...Struct.omit(fields, [
|
|
@@ -282,35 +279,35 @@ const IssueObjectSchema = IssueSchema.mapFields((fields) => ({
|
|
|
282
279
|
"_deleted"
|
|
283
280
|
]),
|
|
284
281
|
updated_at: Timestamp,
|
|
285
|
-
labels: optionalList(label
|
|
286
|
-
assignees: optionalList(user
|
|
282
|
+
labels: optionalList(label),
|
|
283
|
+
assignees: optionalList(user),
|
|
287
284
|
pull_request: Schema.optionalKey(Schema.Unknown)
|
|
288
285
|
}));
|
|
289
286
|
//#endregion
|
|
290
287
|
//#region src/schemas/pull-request-review-comments.ts
|
|
291
288
|
const PullRequestReviewCommentSchema = Schema.Struct({
|
|
292
|
-
id: Long.pipe(
|
|
293
|
-
version: version(
|
|
294
|
-
node_id: Schema.String.pipe(
|
|
295
|
-
repository_id: Long.pipe(
|
|
296
|
-
pull_request_number: Long.pipe(
|
|
297
|
-
pull_request_review_id: Schema.NullOr(Long).pipe(
|
|
298
|
-
in_reply_to_id: Schema.optionalKey(Long).pipe(
|
|
299
|
-
user: Schema.NullOr(user
|
|
300
|
-
author_association: Schema.String.pipe(
|
|
301
|
-
body: Schema.String.pipe(
|
|
302
|
-
path: Schema.String.pipe(
|
|
303
|
-
commit_id: Schema.String.pipe(
|
|
304
|
-
original_commit_id: Schema.String.pipe(
|
|
305
|
-
diff_hunk: Schema.String.pipe(
|
|
306
|
-
line: Schema.optionalKey(Schema.NullOr(Long)).pipe(
|
|
307
|
-
original_line: Schema.optionalKey(Schema.NullOr(Long)).pipe(
|
|
308
|
-
start_line: Schema.optionalKey(Schema.NullOr(Long)).pipe(
|
|
309
|
-
side: Schema.optionalKey(Schema.NullOr(Schema.String)).pipe(
|
|
310
|
-
subject_type: Schema.optionalKey(Schema.String).pipe(
|
|
311
|
-
created_at: Timestamp.pipe(
|
|
312
|
-
html_url: Schema.String.pipe(
|
|
313
|
-
_deleted: deleted(
|
|
289
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique review comment ID." })),
|
|
290
|
+
version: version("review comment"),
|
|
291
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the review comment." })),
|
|
292
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the comment belongs to." })),
|
|
293
|
+
pull_request_number: Long.pipe(Schema.annotateKey({ description: "Number of the pull request the comment is on, in its repository." })),
|
|
294
|
+
pull_request_review_id: Schema.NullOr(Long).pipe(Schema.annotateKey({ description: "ID of the review the comment belongs to." })),
|
|
295
|
+
in_reply_to_id: Schema.optionalKey(Long).pipe(Schema.annotateKey({ description: "ID of the comment this one replies to." })),
|
|
296
|
+
user: Schema.NullOr(user).pipe(Schema.annotateKey({ description: "Account that wrote the comment." })),
|
|
297
|
+
author_association: Schema.String.pipe(Schema.annotateKey({ description: "Author's relation to the repository, such as OWNER or CONTRIBUTOR." })),
|
|
298
|
+
body: Schema.String.pipe(Schema.annotateKey({ description: "Comment in Markdown." })),
|
|
299
|
+
path: Schema.String.pipe(Schema.annotateKey({ description: "Path of the file the comment is on." })),
|
|
300
|
+
commit_id: Schema.String.pipe(Schema.annotateKey({ description: "SHA of the commit the comment is on now." })),
|
|
301
|
+
original_commit_id: Schema.String.pipe(Schema.annotateKey({ description: "SHA of the commit the comment was written on." })),
|
|
302
|
+
diff_hunk: Schema.String.pipe(Schema.annotateKey({ description: "Part of the diff the comment is on." })),
|
|
303
|
+
line: Schema.optionalKey(Schema.NullOr(Long)).pipe(Schema.annotateKey({ description: "Last line of the commented range in the current diff." })),
|
|
304
|
+
original_line: Schema.optionalKey(Schema.NullOr(Long)).pipe(Schema.annotateKey({ description: "Last line of the commented range in the original diff." })),
|
|
305
|
+
start_line: Schema.optionalKey(Schema.NullOr(Long)).pipe(Schema.annotateKey({ description: "First line of a multi-line comment." })),
|
|
306
|
+
side: Schema.optionalKey(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Side of the diff: LEFT or RIGHT." })),
|
|
307
|
+
subject_type: Schema.optionalKey(Schema.String).pipe(Schema.annotateKey({ description: "What the comment is on: line or file." })),
|
|
308
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the comment was written." })),
|
|
309
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Comment on GitHub." })),
|
|
310
|
+
_deleted: deleted("review comment")
|
|
314
311
|
}).annotate({ description: "Review comments on pull request diffs." }).pipe(Iceberg.identifier("id"));
|
|
315
312
|
const PullRequestReviewCommentObjectSchema = PullRequestReviewCommentSchema.mapFields((fields) => ({
|
|
316
313
|
...Struct.omit(fields, [
|
|
@@ -324,34 +321,34 @@ const PullRequestReviewCommentObjectSchema = PullRequestReviewCommentSchema.mapF
|
|
|
324
321
|
}));
|
|
325
322
|
//#endregion
|
|
326
323
|
//#region src/schemas/pull-requests.ts
|
|
327
|
-
const branch =
|
|
328
|
-
ref: Schema.String.pipe(
|
|
329
|
-
sha: Schema.String.pipe(
|
|
330
|
-
label: Schema.String.pipe(
|
|
324
|
+
const branch = Schema.Struct({
|
|
325
|
+
ref: Schema.String.pipe(Schema.annotateKey({ description: "Branch name." })),
|
|
326
|
+
sha: Schema.String.pipe(Schema.annotateKey({ description: "Commit SHA." })),
|
|
327
|
+
label: Schema.String.pipe(Schema.annotateKey({ description: "Owner and branch, such as octocat:main." }))
|
|
331
328
|
});
|
|
332
329
|
const PullRequestSchema = Schema.Struct({
|
|
333
|
-
id: Long.pipe(
|
|
334
|
-
version: version(
|
|
335
|
-
node_id: Schema.String.pipe(
|
|
336
|
-
repository_id: Long.pipe(
|
|
337
|
-
number: Long.pipe(
|
|
338
|
-
title: Schema.String.pipe(
|
|
339
|
-
body: Text.pipe(
|
|
340
|
-
state: Schema.String.pipe(
|
|
341
|
-
draft: Schema.optionalKey(Schema.Boolean).pipe(
|
|
342
|
-
locked: Schema.Boolean.pipe(
|
|
343
|
-
user: Schema.NullOr(user
|
|
344
|
-
author_association: Schema.String.pipe(
|
|
345
|
-
labels:
|
|
346
|
-
assignees:
|
|
347
|
-
requested_reviewers:
|
|
348
|
-
milestone: Schema.NullOr(milestone
|
|
349
|
-
head: branch
|
|
350
|
-
base: branch
|
|
351
|
-
created_at: Timestamp.pipe(
|
|
352
|
-
closed_at: Schema.NullOr(Timestamp).pipe(
|
|
353
|
-
merged_at: Schema.NullOr(Timestamp).pipe(
|
|
354
|
-
html_url: Schema.String.pipe(
|
|
330
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique pull request ID. Not the ID of its issue." })),
|
|
331
|
+
version: version("pull request"),
|
|
332
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the pull request." })),
|
|
333
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the pull request belongs to." })),
|
|
334
|
+
number: Long.pipe(Schema.annotateKey({ description: "Pull request number in the repository." })),
|
|
335
|
+
title: Schema.String.pipe(Schema.annotateKey({ description: "Pull request title." })),
|
|
336
|
+
body: Text.pipe(Schema.annotateKey({ description: "Pull request description in Markdown. Empty when not set." })),
|
|
337
|
+
state: Schema.String.pipe(Schema.annotateKey({ description: "State: open or closed. Merged pull requests are closed." })),
|
|
338
|
+
draft: Schema.optionalKey(Schema.Boolean).pipe(Schema.annotateKey({ description: "Whether the pull request is a draft." })),
|
|
339
|
+
locked: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the conversation is locked." })),
|
|
340
|
+
user: Schema.NullOr(user).pipe(Schema.annotateKey({ description: "Account that opened the pull request." })),
|
|
341
|
+
author_association: Schema.String.pipe(Schema.annotateKey({ description: "Author's relation to the repository, such as OWNER or CONTRIBUTOR." })),
|
|
342
|
+
labels: Schema.Array(label).pipe(Schema.annotateKey({ description: "Labels on the pull request." })),
|
|
343
|
+
assignees: Schema.Array(user).pipe(Schema.annotateKey({ description: "Accounts assigned to the pull request." })),
|
|
344
|
+
requested_reviewers: Schema.Array(user).pipe(Schema.annotateKey({ description: "Accounts asked to review that have not reviewed yet." })),
|
|
345
|
+
milestone: Schema.NullOr(milestone).pipe(Schema.annotateKey({ description: "Milestone of the pull request." })),
|
|
346
|
+
head: branch.pipe(Schema.annotateKey({ description: "Branch the changes come from." })),
|
|
347
|
+
base: branch.pipe(Schema.annotateKey({ description: "Branch the changes merge into." })),
|
|
348
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the pull request was opened." })),
|
|
349
|
+
closed_at: Schema.NullOr(Timestamp).pipe(Schema.annotateKey({ description: "Time the pull request was closed. Null while it is open." })),
|
|
350
|
+
merged_at: Schema.NullOr(Timestamp).pipe(Schema.annotateKey({ description: "Time the pull request was merged." })),
|
|
351
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Pull request page on GitHub." }))
|
|
355
352
|
}).annotate({ description: "Pull requests in the installation's repositories." }).pipe(Iceberg.identifier("id"));
|
|
356
353
|
const PullRequestObjectSchema = PullRequestSchema.mapFields((fields) => ({
|
|
357
354
|
...Struct.omit(fields, [
|
|
@@ -362,41 +359,41 @@ const PullRequestObjectSchema = PullRequestSchema.mapFields((fields) => ({
|
|
|
362
359
|
"requested_reviewers"
|
|
363
360
|
]),
|
|
364
361
|
updated_at: Timestamp,
|
|
365
|
-
labels: optionalList(label
|
|
366
|
-
assignees: optionalList(user
|
|
367
|
-
requested_reviewers: optionalList(user
|
|
362
|
+
labels: optionalList(label),
|
|
363
|
+
assignees: optionalList(user),
|
|
364
|
+
requested_reviewers: optionalList(user)
|
|
368
365
|
}));
|
|
369
366
|
//#endregion
|
|
370
367
|
//#region src/schemas/releases.ts
|
|
371
|
-
const asset =
|
|
372
|
-
id: Long.pipe(
|
|
373
|
-
name: Schema.String.pipe(
|
|
374
|
-
label: Schema.NullOr(Schema.String).pipe(
|
|
375
|
-
state: Schema.String.pipe(
|
|
376
|
-
content_type: Schema.String.pipe(
|
|
377
|
-
size: Long.pipe(
|
|
378
|
-
download_count: Long.pipe(
|
|
379
|
-
created_at: Timestamp.pipe(
|
|
380
|
-
updated_at: Timestamp.pipe(
|
|
381
|
-
browser_download_url: Schema.String.pipe(
|
|
368
|
+
const asset = Schema.Struct({
|
|
369
|
+
id: Long.pipe(Schema.annotateKey({ description: "Asset ID." })),
|
|
370
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "File name." })),
|
|
371
|
+
label: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Label shown instead of the name." })),
|
|
372
|
+
state: Schema.String.pipe(Schema.annotateKey({ description: "State: uploaded or open." })),
|
|
373
|
+
content_type: Schema.String.pipe(Schema.annotateKey({ description: "Media type of the file." })),
|
|
374
|
+
size: Long.pipe(Schema.annotateKey({ description: "Size in bytes." })),
|
|
375
|
+
download_count: Long.pipe(Schema.annotateKey({ description: "Number of downloads when the release last changed." })),
|
|
376
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the asset was uploaded." })),
|
|
377
|
+
updated_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the asset last changed." })),
|
|
378
|
+
browser_download_url: Schema.String.pipe(Schema.annotateKey({ description: "Download link." }))
|
|
382
379
|
});
|
|
383
380
|
const ReleaseSchema = Schema.Struct({
|
|
384
|
-
id: Long.pipe(
|
|
385
|
-
version: version(
|
|
386
|
-
node_id: Schema.String.pipe(
|
|
387
|
-
repository_id: Long.pipe(
|
|
388
|
-
tag_name: Schema.String.pipe(
|
|
389
|
-
target_commitish: Schema.String.pipe(
|
|
390
|
-
name: Text.pipe(
|
|
391
|
-
body: Text.pipe(
|
|
392
|
-
draft: Schema.Boolean.pipe(
|
|
393
|
-
prerelease: Schema.Boolean.pipe(
|
|
394
|
-
author: user
|
|
395
|
-
assets:
|
|
396
|
-
created_at: Timestamp.pipe(
|
|
397
|
-
published_at: Schema.NullOr(Timestamp).pipe(
|
|
398
|
-
html_url: Schema.String.pipe(
|
|
399
|
-
_deleted: deleted(
|
|
381
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique release ID." })),
|
|
382
|
+
version: version("release"),
|
|
383
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the release." })),
|
|
384
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the release belongs to." })),
|
|
385
|
+
tag_name: Schema.String.pipe(Schema.annotateKey({ description: "Tag of the release." })),
|
|
386
|
+
target_commitish: Schema.String.pipe(Schema.annotateKey({ description: "Branch or commit the tag was created from." })),
|
|
387
|
+
name: Text.pipe(Schema.annotateKey({ description: "Release title. Empty when not set." })),
|
|
388
|
+
body: Text.pipe(Schema.annotateKey({ description: "Release notes in Markdown. Empty when not set." })),
|
|
389
|
+
draft: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the release is a draft." })),
|
|
390
|
+
prerelease: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the release is a pre-release." })),
|
|
391
|
+
author: user.pipe(Schema.annotateKey({ description: "Account that created the release." })),
|
|
392
|
+
assets: Schema.Array(asset).pipe(Schema.annotateKey({ description: "Files attached to the release." })),
|
|
393
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the release was created." })),
|
|
394
|
+
published_at: Schema.NullOr(Timestamp).pipe(Schema.annotateKey({ description: "Time the release was published." })),
|
|
395
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Release page on GitHub." })),
|
|
396
|
+
_deleted: deleted("release")
|
|
400
397
|
}).annotate({ description: "Releases in the installation's repositories, with their assets." }).pipe(Iceberg.identifier("id"));
|
|
401
398
|
const ReleaseObjectSchema = ReleaseSchema.mapFields((fields) => ({
|
|
402
399
|
...Struct.omit(fields, [
|
|
@@ -409,24 +406,24 @@ const ReleaseObjectSchema = ReleaseSchema.mapFields((fields) => ({
|
|
|
409
406
|
//#endregion
|
|
410
407
|
//#region src/schemas/repositories.ts
|
|
411
408
|
const RepositorySchema = Schema.Struct({
|
|
412
|
-
id: Long.pipe(
|
|
413
|
-
version: version(
|
|
414
|
-
node_id: Schema.String.pipe(
|
|
415
|
-
name: Schema.String.pipe(
|
|
416
|
-
full_name: Schema.String.pipe(
|
|
417
|
-
owner: user
|
|
418
|
-
private: Schema.Boolean.pipe(
|
|
419
|
-
visibility: Schema.optionalKey(Schema.String).pipe(
|
|
420
|
-
description: Text.pipe(
|
|
421
|
-
fork: Schema.Boolean.pipe(
|
|
422
|
-
archived: Schema.Boolean.pipe(
|
|
423
|
-
disabled: Schema.Boolean.pipe(
|
|
424
|
-
default_branch: Schema.String.pipe(
|
|
425
|
-
language: Schema.NullOr(Schema.String).pipe(
|
|
426
|
-
topics:
|
|
427
|
-
html_url: Schema.String.pipe(
|
|
428
|
-
created_at: Timestamp.pipe(
|
|
429
|
-
_deleted: deleted(
|
|
409
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique repository ID." })),
|
|
410
|
+
version: version("repository"),
|
|
411
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the repository." })),
|
|
412
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Repository name." })),
|
|
413
|
+
full_name: Schema.String.pipe(Schema.annotateKey({ description: "Owner and name, such as octo-org/octo-repo." })),
|
|
414
|
+
owner: user.pipe(Schema.annotateKey({ description: "Account that owns the repository." })),
|
|
415
|
+
private: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the repository is private." })),
|
|
416
|
+
visibility: Schema.optionalKey(Schema.String).pipe(Schema.annotateKey({ description: "Visibility: public, private, or internal." })),
|
|
417
|
+
description: Text.pipe(Schema.annotateKey({ description: "Repository description. Empty when not set." })),
|
|
418
|
+
fork: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the repository is a fork." })),
|
|
419
|
+
archived: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the repository is archived." })),
|
|
420
|
+
disabled: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the repository is disabled." })),
|
|
421
|
+
default_branch: Schema.String.pipe(Schema.annotateKey({ description: "Default branch name." })),
|
|
422
|
+
language: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Main language GitHub detected." })),
|
|
423
|
+
topics: Schema.Array(Schema.String).pipe(Schema.annotateKey({ description: "Repository topics." })),
|
|
424
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Repository page on GitHub." })),
|
|
425
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the repository was created." })),
|
|
426
|
+
_deleted: deleted("repository")
|
|
430
427
|
}).annotate({ description: "Repositories the GitHub App installation can read." }).pipe(Iceberg.identifier("id"));
|
|
431
428
|
const RepositoryObjectSchema = RepositorySchema.mapFields((fields) => ({
|
|
432
429
|
...Struct.omit(fields, [
|
|
@@ -447,31 +444,31 @@ const RepositoryRefSchema = Schema.Struct({
|
|
|
447
444
|
//#endregion
|
|
448
445
|
//#region src/schemas/workflow-runs.ts
|
|
449
446
|
const WorkflowRunSchema = Schema.Struct({
|
|
450
|
-
id: Long.pipe(
|
|
451
|
-
version: version(
|
|
452
|
-
node_id: Schema.String.pipe(
|
|
453
|
-
repository_id: Long.pipe(
|
|
454
|
-
workflow_id: Long.pipe(
|
|
455
|
-
name: Schema.NullOr(Schema.String).pipe(
|
|
456
|
-
display_title: Schema.String.pipe(
|
|
457
|
-
path: Schema.String.pipe(
|
|
458
|
-
event: Schema.String.pipe(
|
|
459
|
-
status: Schema.NullOr(Schema.String).pipe(
|
|
460
|
-
conclusion: Schema.NullOr(Schema.String).pipe(
|
|
461
|
-
head_branch: Schema.NullOr(Schema.String).pipe(
|
|
462
|
-
head_sha: Schema.String.pipe(
|
|
463
|
-
run_number: Long.pipe(
|
|
464
|
-
run_attempt: Schema.optionalKey(Long).pipe(
|
|
465
|
-
check_suite_id: Schema.optionalKey(Long).pipe(
|
|
466
|
-
actor: Schema.optionalKey(user
|
|
467
|
-
triggering_actor: Schema.optionalKey(user
|
|
468
|
-
pull_requests:
|
|
469
|
-
id: Long.pipe(
|
|
470
|
-
number: Long.pipe(
|
|
471
|
-
})).pipe(
|
|
472
|
-
created_at: Timestamp.pipe(
|
|
473
|
-
run_started_at: Schema.optionalKey(Timestamp).pipe(
|
|
474
|
-
html_url: Schema.String.pipe(
|
|
447
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique workflow run ID." })),
|
|
448
|
+
version: version("workflow run"),
|
|
449
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the run." })),
|
|
450
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the run belongs to." })),
|
|
451
|
+
workflow_id: Long.pipe(Schema.annotateKey({ description: "ID of the workflow." })),
|
|
452
|
+
name: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Workflow name." })),
|
|
453
|
+
display_title: Schema.String.pipe(Schema.annotateKey({ description: "Title of the run, such as the commit message." })),
|
|
454
|
+
path: Schema.String.pipe(Schema.annotateKey({ description: "Path of the workflow file." })),
|
|
455
|
+
event: Schema.String.pipe(Schema.annotateKey({ description: "Event that started the run, such as push." })),
|
|
456
|
+
status: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Status, such as queued, in_progress, or completed." })),
|
|
457
|
+
conclusion: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Result of a completed run, such as success or failure." })),
|
|
458
|
+
head_branch: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Branch the run is for." })),
|
|
459
|
+
head_sha: Schema.String.pipe(Schema.annotateKey({ description: "SHA of the commit the run is for." })),
|
|
460
|
+
run_number: Long.pipe(Schema.annotateKey({ description: "Run number of the workflow." })),
|
|
461
|
+
run_attempt: Schema.optionalKey(Long).pipe(Schema.annotateKey({ description: "Attempt number. Re-runs count up." })),
|
|
462
|
+
check_suite_id: Schema.optionalKey(Long).pipe(Schema.annotateKey({ description: "ID of the run's check suite." })),
|
|
463
|
+
actor: Schema.optionalKey(user).pipe(Schema.annotateKey({ description: "Account that started the first attempt." })),
|
|
464
|
+
triggering_actor: Schema.optionalKey(user).pipe(Schema.annotateKey({ description: "Account that started the latest attempt." })),
|
|
465
|
+
pull_requests: Schema.Array(Schema.Struct({
|
|
466
|
+
id: Long.pipe(Schema.annotateKey({ description: "Pull request ID." })),
|
|
467
|
+
number: Long.pipe(Schema.annotateKey({ description: "Pull request number." }))
|
|
468
|
+
})).pipe(Schema.annotateKey({ description: "Pull requests the run is for. Empty for forks." })),
|
|
469
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the run was created." })),
|
|
470
|
+
run_started_at: Schema.optionalKey(Timestamp).pipe(Schema.annotateKey({ description: "Time the latest attempt started." })),
|
|
471
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Run page on GitHub." }))
|
|
475
472
|
}).annotate({ description: "GitHub Actions workflow runs in the installation's repositories." }).pipe(Iceberg.identifier("id"));
|
|
476
473
|
const WorkflowRunObjectSchema = WorkflowRunSchema.mapFields((fields) => ({
|
|
477
474
|
...Struct.omit(fields, [
|
|
@@ -584,44 +581,44 @@ const StatusEventSchema = Schema.Struct({
|
|
|
584
581
|
});
|
|
585
582
|
//#endregion
|
|
586
583
|
//#region src/schemas/commits.ts
|
|
587
|
-
const gitActor =
|
|
588
|
-
name: Schema.String.pipe(
|
|
589
|
-
date: Timestamp.pipe(
|
|
584
|
+
const gitActor = Schema.Struct({
|
|
585
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Name in the commit." })),
|
|
586
|
+
date: Timestamp.pipe(Schema.annotateKey({ description: "Time in the commit." }))
|
|
590
587
|
});
|
|
591
588
|
/**
|
|
592
589
|
* The GitHub account of a commit's author or committer. GitHub sends `null` or
|
|
593
590
|
* `{}` when the email matches no account, and both become `null`.
|
|
594
591
|
*/
|
|
595
|
-
const account =
|
|
592
|
+
const account = Schema.NullOr(Schema.Union([user, Schema.Struct({})])).pipe(Schema.decodeTo(Schema.NullOr(Schema.toType(user)), SchemaTransformation.transform({
|
|
596
593
|
decode: (value) => value !== null && "id" in value ? value : null,
|
|
597
594
|
encode: (value) => value
|
|
598
595
|
})));
|
|
599
596
|
const CommitSchema = Schema.Struct({
|
|
600
|
-
key: Schema.String.pipe(
|
|
601
|
-
version: Schema.Date.pipe(
|
|
602
|
-
repository_id: Long.pipe(
|
|
603
|
-
sha: Schema.String.pipe(
|
|
604
|
-
node_id: Schema.String.pipe(
|
|
605
|
-
message: Schema.String.pipe(
|
|
606
|
-
author: gitActor
|
|
607
|
-
committer: gitActor
|
|
608
|
-
author_user: account
|
|
609
|
-
committer_user: account
|
|
610
|
-
parents:
|
|
611
|
-
verified: Schema.Boolean.pipe(
|
|
612
|
-
html_url: Schema.String.pipe(
|
|
597
|
+
key: Schema.String.pipe(Schema.annotateKey({ description: "Repository ID and SHA, such as `1406396726:9eb3a7d`." })),
|
|
598
|
+
version: Schema.Date.pipe(Schema.annotateKey({ description: "Commit time. A commit never changes." })),
|
|
599
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the commit is in." })),
|
|
600
|
+
sha: Schema.String.pipe(Schema.annotateKey({ description: "Commit SHA." })),
|
|
601
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the commit." })),
|
|
602
|
+
message: Schema.String.pipe(Schema.annotateKey({ description: "Commit message." })),
|
|
603
|
+
author: gitActor.pipe(Schema.annotateKey({ description: "Author name and time from the commit." })),
|
|
604
|
+
committer: gitActor.pipe(Schema.annotateKey({ description: "Committer name and time from the commit." })),
|
|
605
|
+
author_user: account.pipe(Schema.annotateKey({ description: "GitHub account of the author." })),
|
|
606
|
+
committer_user: account.pipe(Schema.annotateKey({ description: "GitHub account of the committer." })),
|
|
607
|
+
parents: Schema.Array(Schema.String).pipe(Schema.annotateKey({ description: "SHAs of the parent commits." })),
|
|
608
|
+
verified: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether GitHub verified the commit signature." })),
|
|
609
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Commit page on GitHub." }))
|
|
613
610
|
}).annotate({ description: "Commits on the default branch of the installation's repositories." }).pipe(Iceberg.identifier("key"));
|
|
614
611
|
const CommitObjectSchema = Schema.Struct({
|
|
615
612
|
sha: Schema.String,
|
|
616
613
|
node_id: Schema.String,
|
|
617
614
|
commit: Schema.Struct({
|
|
618
|
-
author: gitActor
|
|
619
|
-
committer: gitActor
|
|
615
|
+
author: gitActor,
|
|
616
|
+
committer: gitActor,
|
|
620
617
|
message: Schema.String,
|
|
621
618
|
verification: Schema.optionalKey(Schema.Struct({ verified: Schema.Boolean }))
|
|
622
619
|
}),
|
|
623
|
-
author: account
|
|
624
|
-
committer: account
|
|
620
|
+
author: account,
|
|
621
|
+
committer: account,
|
|
625
622
|
parents: Schema.Array(Schema.Struct({ sha: Schema.String })),
|
|
626
623
|
html_url: Schema.String
|
|
627
624
|
});
|
|
@@ -948,17 +945,17 @@ const makeCheckRuns = (client, repositories) => {
|
|
|
948
945
|
//#endregion
|
|
949
946
|
//#region src/schemas/commit-statuses.ts
|
|
950
947
|
const CommitStatusSchema = Schema.Struct({
|
|
951
|
-
id: Long.pipe(
|
|
952
|
-
version: version(
|
|
953
|
-
node_id: Schema.String.pipe(
|
|
954
|
-
repository_id: Long.pipe(
|
|
955
|
-
sha: Schema.String.pipe(
|
|
956
|
-
state: Schema.String.pipe(
|
|
957
|
-
context: Schema.String.pipe(
|
|
958
|
-
description: Text.pipe(
|
|
959
|
-
target_url: Schema.NullOr(Schema.String).pipe(
|
|
960
|
-
creator: Schema.NullOr(user
|
|
961
|
-
created_at: Timestamp.pipe(
|
|
948
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique status ID. Each new status of a context gets a new ID." })),
|
|
949
|
+
version: version("status"),
|
|
950
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the status." })),
|
|
951
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the status belongs to." })),
|
|
952
|
+
sha: Schema.String.pipe(Schema.annotateKey({ description: "SHA of the commit the status is on." })),
|
|
953
|
+
state: Schema.String.pipe(Schema.annotateKey({ description: "State: error, failure, pending, or success." })),
|
|
954
|
+
context: Schema.String.pipe(Schema.annotateKey({ description: "Label that tells the status apart, such as ci/build." })),
|
|
955
|
+
description: Text.pipe(Schema.annotateKey({ description: "Short description. Empty when not set." })),
|
|
956
|
+
target_url: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Link the status points to." })),
|
|
957
|
+
creator: Schema.NullOr(user).pipe(Schema.annotateKey({ description: "Account that created the status." })),
|
|
958
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the status was created." }))
|
|
962
959
|
}).annotate({ description: "Commit statuses. Polled for default-branch commits; webhooks cover all branches." }).pipe(Iceberg.identifier("id"));
|
|
963
960
|
const CommitStatusObjectSchema = CommitStatusSchema.mapFields((fields) => ({
|
|
964
961
|
...Struct.omit(fields, [
|
|
@@ -1082,17 +1079,17 @@ const makeIssues = (client, repositories) => Resource.entity({
|
|
|
1082
1079
|
//#endregion
|
|
1083
1080
|
//#region src/schemas/pull-request-commits.ts
|
|
1084
1081
|
const PullRequestCommitSchema = Schema.Struct({
|
|
1085
|
-
key: Schema.String.pipe(
|
|
1086
|
-
version: Schema.Date.pipe(
|
|
1087
|
-
repository_id: Long.pipe(
|
|
1088
|
-
pull_request_number: Long.pipe(
|
|
1089
|
-
sha: Schema.String.pipe(
|
|
1090
|
-
message: Schema.String.pipe(
|
|
1091
|
-
author: gitActor
|
|
1092
|
-
committer: gitActor
|
|
1093
|
-
author_user: account
|
|
1094
|
-
committer_user: account
|
|
1095
|
-
html_url: Schema.String.pipe(
|
|
1082
|
+
key: Schema.String.pipe(Schema.annotateKey({ description: "Repository ID, pull request number, and SHA, such as `1406396726:3:9eb3a7d`." })),
|
|
1083
|
+
version: Schema.Date.pipe(Schema.annotateKey({ description: "Time GitHub last updated the pull request." })),
|
|
1084
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the pull request belongs to." })),
|
|
1085
|
+
pull_request_number: Long.pipe(Schema.annotateKey({ description: "Pull request number in the repository." })),
|
|
1086
|
+
sha: Schema.String.pipe(Schema.annotateKey({ description: "Commit SHA." })),
|
|
1087
|
+
message: Schema.String.pipe(Schema.annotateKey({ description: "Commit message." })),
|
|
1088
|
+
author: gitActor.pipe(Schema.annotateKey({ description: "Author name and time from the commit." })),
|
|
1089
|
+
committer: gitActor.pipe(Schema.annotateKey({ description: "Committer name and time from the commit." })),
|
|
1090
|
+
author_user: account.pipe(Schema.annotateKey({ description: "GitHub account of the author." })),
|
|
1091
|
+
committer_user: account.pipe(Schema.annotateKey({ description: "GitHub account of the committer." })),
|
|
1092
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Commit page on GitHub." }))
|
|
1096
1093
|
}).annotate({ description: "Commits in pull requests, up to 250 per pull request. Commits removed by a force push stay." }).pipe(Iceberg.identifier("key"));
|
|
1097
1094
|
//#endregion
|
|
1098
1095
|
//#region src/resources/pull-requests.ts
|
|
@@ -1218,18 +1215,18 @@ const makePullRequestReviewComments = (client, repositories) => Resource.entity(
|
|
|
1218
1215
|
//#endregion
|
|
1219
1216
|
//#region src/schemas/pull-request-reviews.ts
|
|
1220
1217
|
const PullRequestReviewSchema = Schema.Struct({
|
|
1221
|
-
id: Long.pipe(
|
|
1222
|
-
version: readVersion(
|
|
1223
|
-
node_id: Schema.String.pipe(
|
|
1224
|
-
repository_id: Long.pipe(
|
|
1225
|
-
pull_request_number: Long.pipe(
|
|
1226
|
-
user: Schema.NullOr(user
|
|
1227
|
-
author_association: Schema.String.pipe(
|
|
1228
|
-
state: Schema.String.pipe(
|
|
1229
|
-
body: Schema.String.pipe(
|
|
1230
|
-
commit_id: Schema.NullOr(Schema.String).pipe(
|
|
1231
|
-
submitted_at: Schema.optionalKey(Timestamp).pipe(
|
|
1232
|
-
html_url: Schema.String.pipe(
|
|
1218
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique review ID." })),
|
|
1219
|
+
version: readVersion("review"),
|
|
1220
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the review." })),
|
|
1221
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the review belongs to." })),
|
|
1222
|
+
pull_request_number: Long.pipe(Schema.annotateKey({ description: "Number of the pull request the review is on, in its repository." })),
|
|
1223
|
+
user: Schema.NullOr(user).pipe(Schema.annotateKey({ description: "Account that wrote the review." })),
|
|
1224
|
+
author_association: Schema.String.pipe(Schema.annotateKey({ description: "Author's relation to the repository, such as OWNER or CONTRIBUTOR." })),
|
|
1225
|
+
state: Schema.String.pipe(Schema.annotateKey({ description: "State, such as APPROVED, CHANGES_REQUESTED, COMMENTED, or DISMISSED." })),
|
|
1226
|
+
body: Schema.String.pipe(Schema.annotateKey({ description: "Review summary in Markdown." })),
|
|
1227
|
+
commit_id: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "SHA of the commit the review is on." })),
|
|
1228
|
+
submitted_at: Schema.optionalKey(Timestamp).pipe(Schema.annotateKey({ description: "Time the review was submitted." })),
|
|
1229
|
+
html_url: Schema.String.pipe(Schema.annotateKey({ description: "Review on GitHub." }))
|
|
1233
1230
|
}).annotate({ description: "Reviews on pull requests. Pending reviews are only visible to their author." }).pipe(Iceberg.identifier("id"));
|
|
1234
1231
|
const PullRequestReviewObjectSchema = PullRequestReviewSchema.mapFields((fields) => Struct.omit(fields, [
|
|
1235
1232
|
"version",
|
|
@@ -1354,33 +1351,33 @@ const makeRepositories = (client) => Resource.entity({
|
|
|
1354
1351
|
//#endregion
|
|
1355
1352
|
//#region src/schemas/workflow-jobs.ts
|
|
1356
1353
|
const step = Schema.Struct({
|
|
1357
|
-
number: Long.pipe(
|
|
1358
|
-
name: Schema.String.pipe(
|
|
1359
|
-
status: Schema.String.pipe(
|
|
1360
|
-
conclusion: Schema.NullOr(Schema.String).pipe(
|
|
1361
|
-
started_at: Schema.optionalKey(Schema.NullOr(Timestamp)).pipe(
|
|
1362
|
-
completed_at: Schema.optionalKey(Schema.NullOr(Timestamp)).pipe(
|
|
1354
|
+
number: Long.pipe(Schema.annotateKey({ description: "Step number." })),
|
|
1355
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Step name." })),
|
|
1356
|
+
status: Schema.String.pipe(Schema.annotateKey({ description: "Status, such as queued, in_progress, or completed." })),
|
|
1357
|
+
conclusion: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Result of a completed step." })),
|
|
1358
|
+
started_at: Schema.optionalKey(Schema.NullOr(Timestamp)).pipe(Schema.annotateKey({ description: "Time the step started." })),
|
|
1359
|
+
completed_at: Schema.optionalKey(Schema.NullOr(Timestamp)).pipe(Schema.annotateKey({ description: "Time the step completed." }))
|
|
1363
1360
|
});
|
|
1364
1361
|
const WorkflowJobSchema = Schema.Struct({
|
|
1365
|
-
id: Long.pipe(
|
|
1366
|
-
version: readVersion(
|
|
1367
|
-
node_id: Schema.String.pipe(
|
|
1368
|
-
repository_id: Long.pipe(
|
|
1369
|
-
run_id: Long.pipe(
|
|
1370
|
-
run_attempt: Schema.optionalKey(Long).pipe(
|
|
1371
|
-
workflow_name: Schema.NullOr(Schema.String).pipe(
|
|
1372
|
-
name: Schema.String.pipe(
|
|
1373
|
-
head_sha: Schema.String.pipe(
|
|
1374
|
-
head_branch: Schema.NullOr(Schema.String).pipe(
|
|
1375
|
-
status: Schema.String.pipe(
|
|
1376
|
-
conclusion: Schema.NullOr(Schema.String).pipe(
|
|
1377
|
-
created_at: Timestamp.pipe(
|
|
1378
|
-
started_at: Timestamp.pipe(
|
|
1379
|
-
completed_at: Schema.NullOr(Timestamp).pipe(
|
|
1380
|
-
runner_name: Schema.NullOr(Schema.String).pipe(
|
|
1381
|
-
labels:
|
|
1382
|
-
steps:
|
|
1383
|
-
html_url: Schema.NullOr(Schema.String).pipe(
|
|
1362
|
+
id: Long.pipe(Schema.annotateKey({ description: "Unique job ID." })),
|
|
1363
|
+
version: readVersion("job"),
|
|
1364
|
+
node_id: Schema.String.pipe(Schema.annotateKey({ description: "GraphQL node ID of the job." })),
|
|
1365
|
+
repository_id: Long.pipe(Schema.annotateKey({ description: "ID of the repository the job belongs to." })),
|
|
1366
|
+
run_id: Long.pipe(Schema.annotateKey({ description: "ID of the workflow run." })),
|
|
1367
|
+
run_attempt: Schema.optionalKey(Long).pipe(Schema.annotateKey({ description: "Attempt of the run the job belongs to." })),
|
|
1368
|
+
workflow_name: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Workflow name." })),
|
|
1369
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Job name." })),
|
|
1370
|
+
head_sha: Schema.String.pipe(Schema.annotateKey({ description: "SHA of the commit the job ran on." })),
|
|
1371
|
+
head_branch: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Branch the job ran on." })),
|
|
1372
|
+
status: Schema.String.pipe(Schema.annotateKey({ description: "Status, such as queued, in_progress, or completed." })),
|
|
1373
|
+
conclusion: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Result of a completed job, such as success or failure." })),
|
|
1374
|
+
created_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the job was queued." })),
|
|
1375
|
+
started_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the job started." })),
|
|
1376
|
+
completed_at: Schema.NullOr(Timestamp).pipe(Schema.annotateKey({ description: "Time the job completed." })),
|
|
1377
|
+
runner_name: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Name of the runner." })),
|
|
1378
|
+
labels: Schema.Array(Schema.String).pipe(Schema.annotateKey({ description: "Runner labels the job asked for." })),
|
|
1379
|
+
steps: Schema.Array(step).pipe(Schema.annotateKey({ description: "Steps of the job." })),
|
|
1380
|
+
html_url: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Job page on GitHub." }))
|
|
1384
1381
|
}).annotate({ description: "Jobs of GitHub Actions workflow runs. Each run attempt has its own jobs." }).pipe(Iceberg.identifier("id"));
|
|
1385
1382
|
const WorkflowJobObjectSchema = WorkflowJobSchema.mapFields((fields) => ({
|
|
1386
1383
|
...Struct.omit(fields, [
|
|
@@ -1563,4 +1560,4 @@ const layerConfig = (config) => Layer.unwrap(Config.unwrap(config).pipe(Effect.m
|
|
|
1563
1560
|
//#endregion
|
|
1564
1561
|
export { auth_exports as C, client_exports as S, IssueObjectSchema as _, WorkflowJobSchema as a, IssueCommentSchema as b, CommitStatusSchema as c, RepositoryObjectSchema as d, RepositorySchema as f, PullRequestReviewCommentSchema as g, PullRequestSchema as h, webhookPath as i, CommitSchema as l, PullRequestObjectSchema as m, connector_exports as n, PullRequestReviewSchema as o, ReleaseSchema as p, layerConfig as r, PullRequestCommitSchema as s, GitHubConnector as t, WorkflowRunSchema as u, IssueSchema as v, CheckRunSchema as x, IssueCommentObjectSchema as y };
|
|
1565
1562
|
|
|
1566
|
-
//# sourceMappingURL=src-
|
|
1563
|
+
//# sourceMappingURL=src-DKDUc00e.mjs.map
|