@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.
@@ -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 = (baseId) => Schema.Struct({
180
- id: Long.pipe(field(baseId, "GitHub user ID.")),
181
- login: Schema.String.pipe(field(baseId + 1, "GitHub username.")),
182
- type: Schema.String.pipe(field(baseId + 2, "Account type, such as User, Bot, or Organization."))
183
- });
184
- const label = (baseId) => Schema.Struct({
185
- id: Long.pipe(field(baseId, "Label ID.")),
186
- name: Schema.String.pipe(field(baseId + 1, "Label name."))
187
- });
188
- const milestone = (baseId) => Schema.Struct({
189
- id: Long.pipe(field(baseId, "Milestone ID.")),
190
- number: Long.pipe(field(baseId + 1, "Milestone number in the repository.")),
191
- title: Schema.String.pipe(field(baseId + 2, "Milestone title."))
192
- });
193
- /** A list column. The element ID is separate from the column's field ID. */
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 = (fieldId, object) => Schema.Date.pipe(field(fieldId, `Time the connector read the ${object}. GitHub has no update time for it.`));
198
- const deleted = (fieldId, object) => Schema.optional(Schema.Boolean).pipe(field(fieldId, `Whether the ${object} was deleted in GitHub.`));
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(field(1, "Unique check run ID.")),
204
- version: readVersion(2, "check run"),
205
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the check run.")),
206
- repository_id: Long.pipe(field(4, "ID of the repository the check run belongs to.")),
207
- head_sha: Schema.String.pipe(field(5, "SHA of the commit the check ran on.")),
208
- name: Schema.String.pipe(field(6, "Check name.")),
209
- status: Schema.String.pipe(field(7, "Status, such as queued, in_progress, or completed.")),
210
- conclusion: Schema.NullOr(Schema.String).pipe(field(8, "Result of a completed check, such as success or failure.")),
211
- started_at: Schema.NullOr(Timestamp).pipe(field(9, "Time the check started.")),
212
- completed_at: Schema.NullOr(Timestamp).pipe(field(10, "Time the check completed.")),
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(field(100, "GitHub App ID.")),
215
- name: Schema.String.pipe(field(101, "GitHub App name."))
216
- })).pipe(field(11, "GitHub App that created the check, such as GitHub Actions.")),
217
- check_suite: Schema.NullOr(Schema.Struct({ id: Long.pipe(field(102, "Check suite ID.")) })).pipe(field(12, "Check suite the check run belongs to.")),
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(field(103, "Output title.")),
220
- summary: Schema.NullOr(Schema.String).pipe(field(104, "Output summary in Markdown."))
221
- }).pipe(field(13, "Output the check reported.")),
222
- external_id: Schema.NullOr(Schema.String).pipe(field(14, "ID the app gave the check.")),
223
- details_url: Schema.NullOr(Schema.String).pipe(field(15, "Details page from the app.")),
224
- html_url: Schema.NullOr(Schema.String).pipe(field(16, "Check run page on GitHub."))
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(field(1, "Unique comment ID.")),
231
- version: version(2, "comment"),
232
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the comment.")),
233
- repository_id: Long.pipe(field(4, "ID of the repository the comment belongs to.")),
234
- issue_number: Long.pipe(field(5, "Number of the issue or pull request the comment is on, in its repository.")),
235
- user: Schema.NullOr(user(100)).pipe(field(6, "Account that wrote the comment.")),
236
- author_association: Schema.String.pipe(field(7, "Author's relation to the repository, such as OWNER or CONTRIBUTOR.")),
237
- body: Text.pipe(field(8, "Comment in Markdown. Empty when not set.")),
238
- created_at: Timestamp.pipe(field(9, "Time the comment was written.")),
239
- html_url: Schema.String.pipe(field(10, "Comment on GitHub.")),
240
- _deleted: deleted(11, "comment")
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(field(1, "Unique issue ID.")),
256
- version: version(2, "issue"),
257
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the issue.")),
258
- repository_id: Long.pipe(field(4, "ID of the repository the issue belongs to.")),
259
- number: Long.pipe(field(5, "Issue number in the repository.")),
260
- title: Schema.String.pipe(field(6, "Issue title.")),
261
- body: Text.pipe(field(7, "Issue description in Markdown. Empty when not set.")),
262
- state: Schema.String.pipe(field(8, "State: open or closed.")),
263
- state_reason: Schema.NullOr(Schema.String).pipe(field(9, "Why the issue was closed or reopened, such as completed or not_planned.")),
264
- locked: Schema.Boolean.pipe(field(10, "Whether the conversation is locked.")),
265
- user: Schema.NullOr(user(100)).pipe(field(11, "Account that opened the issue.")),
266
- author_association: Schema.String.pipe(field(12, "Author's relation to the repository, such as OWNER or CONTRIBUTOR.")),
267
- labels: list(103, label(104)).pipe(field(13, "Labels on the issue.")),
268
- assignees: list(106, user(107)).pipe(field(14, "Accounts assigned to the issue.")),
269
- milestone: Schema.NullOr(milestone(110)).pipe(field(15, "Milestone of the issue.")),
270
- comments: Long.pipe(field(16, "Number of comments.")),
271
- created_at: Timestamp.pipe(field(17, "Time the issue was opened.")),
272
- closed_at: Schema.NullOr(Timestamp).pipe(field(18, "Time the issue was closed. Null while it is open.")),
273
- html_url: Schema.String.pipe(field(19, "Issue page on GitHub.")),
274
- _deleted: deleted(20, "issue")
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(104)),
286
- assignees: optionalList(user(107)),
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(field(1, "Unique review comment ID.")),
293
- version: version(2, "review comment"),
294
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the review comment.")),
295
- repository_id: Long.pipe(field(4, "ID of the repository the comment belongs to.")),
296
- pull_request_number: Long.pipe(field(5, "Number of the pull request the comment is on, in its repository.")),
297
- pull_request_review_id: Schema.NullOr(Long).pipe(field(6, "ID of the review the comment belongs to.")),
298
- in_reply_to_id: Schema.optionalKey(Long).pipe(field(7, "ID of the comment this one replies to.")),
299
- user: Schema.NullOr(user(100)).pipe(field(8, "Account that wrote the comment.")),
300
- author_association: Schema.String.pipe(field(9, "Author's relation to the repository, such as OWNER or CONTRIBUTOR.")),
301
- body: Schema.String.pipe(field(10, "Comment in Markdown.")),
302
- path: Schema.String.pipe(field(11, "Path of the file the comment is on.")),
303
- commit_id: Schema.String.pipe(field(12, "SHA of the commit the comment is on now.")),
304
- original_commit_id: Schema.String.pipe(field(13, "SHA of the commit the comment was written on.")),
305
- diff_hunk: Schema.String.pipe(field(14, "Part of the diff the comment is on.")),
306
- line: Schema.optionalKey(Schema.NullOr(Long)).pipe(field(15, "Last line of the commented range in the current diff.")),
307
- original_line: Schema.optionalKey(Schema.NullOr(Long)).pipe(field(16, "Last line of the commented range in the original diff.")),
308
- start_line: Schema.optionalKey(Schema.NullOr(Long)).pipe(field(17, "First line of a multi-line comment.")),
309
- side: Schema.optionalKey(Schema.NullOr(Schema.String)).pipe(field(18, "Side of the diff: LEFT or RIGHT.")),
310
- subject_type: Schema.optionalKey(Schema.String).pipe(field(19, "What the comment is on: line or file.")),
311
- created_at: Timestamp.pipe(field(20, "Time the comment was written.")),
312
- html_url: Schema.String.pipe(field(21, "Comment on GitHub.")),
313
- _deleted: deleted(22, "review comment")
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 = (baseId) => Schema.Struct({
328
- ref: Schema.String.pipe(field(baseId, "Branch name.")),
329
- sha: Schema.String.pipe(field(baseId + 1, "Commit SHA.")),
330
- label: Schema.String.pipe(field(baseId + 2, "Owner and branch, such as octocat:main."))
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(field(1, "Unique pull request ID. Not the ID of its issue.")),
334
- version: version(2, "pull request"),
335
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the pull request.")),
336
- repository_id: Long.pipe(field(4, "ID of the repository the pull request belongs to.")),
337
- number: Long.pipe(field(5, "Pull request number in the repository.")),
338
- title: Schema.String.pipe(field(6, "Pull request title.")),
339
- body: Text.pipe(field(7, "Pull request description in Markdown. Empty when not set.")),
340
- state: Schema.String.pipe(field(8, "State: open or closed. Merged pull requests are closed.")),
341
- draft: Schema.optionalKey(Schema.Boolean).pipe(field(9, "Whether the pull request is a draft.")),
342
- locked: Schema.Boolean.pipe(field(10, "Whether the conversation is locked.")),
343
- user: Schema.NullOr(user(100)).pipe(field(11, "Account that opened the pull request.")),
344
- author_association: Schema.String.pipe(field(12, "Author's relation to the repository, such as OWNER or CONTRIBUTOR.")),
345
- labels: list(103, label(104)).pipe(field(13, "Labels on the pull request.")),
346
- assignees: list(106, user(107)).pipe(field(14, "Accounts assigned to the pull request.")),
347
- requested_reviewers: list(110, user(111)).pipe(field(15, "Accounts asked to review that have not reviewed yet.")),
348
- milestone: Schema.NullOr(milestone(114)).pipe(field(16, "Milestone of the pull request.")),
349
- head: branch(117).pipe(field(17, "Branch the changes come from.")),
350
- base: branch(120).pipe(field(18, "Branch the changes merge into.")),
351
- created_at: Timestamp.pipe(field(19, "Time the pull request was opened.")),
352
- closed_at: Schema.NullOr(Timestamp).pipe(field(20, "Time the pull request was closed. Null while it is open.")),
353
- merged_at: Schema.NullOr(Timestamp).pipe(field(21, "Time the pull request was merged.")),
354
- html_url: Schema.String.pipe(field(22, "Pull request page on GitHub."))
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(104)),
366
- assignees: optionalList(user(107)),
367
- requested_reviewers: optionalList(user(111))
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 = (baseId) => Schema.Struct({
372
- id: Long.pipe(field(baseId, "Asset ID.")),
373
- name: Schema.String.pipe(field(baseId + 1, "File name.")),
374
- label: Schema.NullOr(Schema.String).pipe(field(baseId + 2, "Label shown instead of the name.")),
375
- state: Schema.String.pipe(field(baseId + 3, "State: uploaded or open.")),
376
- content_type: Schema.String.pipe(field(baseId + 4, "Media type of the file.")),
377
- size: Long.pipe(field(baseId + 5, "Size in bytes.")),
378
- download_count: Long.pipe(field(baseId + 6, "Number of downloads when the release last changed.")),
379
- created_at: Timestamp.pipe(field(baseId + 7, "Time the asset was uploaded.")),
380
- updated_at: Timestamp.pipe(field(baseId + 8, "Time the asset last changed.")),
381
- browser_download_url: Schema.String.pipe(field(baseId + 9, "Download link."))
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(field(1, "Unique release ID.")),
385
- version: version(2, "release"),
386
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the release.")),
387
- repository_id: Long.pipe(field(4, "ID of the repository the release belongs to.")),
388
- tag_name: Schema.String.pipe(field(5, "Tag of the release.")),
389
- target_commitish: Schema.String.pipe(field(6, "Branch or commit the tag was created from.")),
390
- name: Text.pipe(field(7, "Release title. Empty when not set.")),
391
- body: Text.pipe(field(8, "Release notes in Markdown. Empty when not set.")),
392
- draft: Schema.Boolean.pipe(field(9, "Whether the release is a draft.")),
393
- prerelease: Schema.Boolean.pipe(field(10, "Whether the release is a pre-release.")),
394
- author: user(100).pipe(field(11, "Account that created the release.")),
395
- assets: list(103, asset(104)).pipe(field(12, "Files attached to the release.")),
396
- created_at: Timestamp.pipe(field(13, "Time the release was created.")),
397
- published_at: Schema.NullOr(Timestamp).pipe(field(14, "Time the release was published.")),
398
- html_url: Schema.String.pipe(field(15, "Release page on GitHub.")),
399
- _deleted: deleted(16, "release")
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(field(1, "Unique repository ID.")),
413
- version: version(2, "repository"),
414
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the repository.")),
415
- name: Schema.String.pipe(field(4, "Repository name.")),
416
- full_name: Schema.String.pipe(field(5, "Owner and name, such as octo-org/octo-repo.")),
417
- owner: user(100).pipe(field(6, "Account that owns the repository.")),
418
- private: Schema.Boolean.pipe(field(7, "Whether the repository is private.")),
419
- visibility: Schema.optionalKey(Schema.String).pipe(field(8, "Visibility: public, private, or internal.")),
420
- description: Text.pipe(field(9, "Repository description. Empty when not set.")),
421
- fork: Schema.Boolean.pipe(field(10, "Whether the repository is a fork.")),
422
- archived: Schema.Boolean.pipe(field(11, "Whether the repository is archived.")),
423
- disabled: Schema.Boolean.pipe(field(12, "Whether the repository is disabled.")),
424
- default_branch: Schema.String.pipe(field(13, "Default branch name.")),
425
- language: Schema.NullOr(Schema.String).pipe(field(14, "Main language GitHub detected.")),
426
- topics: list(103, Schema.String).pipe(field(15, "Repository topics.")),
427
- html_url: Schema.String.pipe(field(16, "Repository page on GitHub.")),
428
- created_at: Timestamp.pipe(field(17, "Time the repository was created.")),
429
- _deleted: deleted(18, "repository")
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(field(1, "Unique workflow run ID.")),
451
- version: version(2, "workflow run"),
452
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the run.")),
453
- repository_id: Long.pipe(field(4, "ID of the repository the run belongs to.")),
454
- workflow_id: Long.pipe(field(5, "ID of the workflow.")),
455
- name: Schema.NullOr(Schema.String).pipe(field(6, "Workflow name.")),
456
- display_title: Schema.String.pipe(field(7, "Title of the run, such as the commit message.")),
457
- path: Schema.String.pipe(field(8, "Path of the workflow file.")),
458
- event: Schema.String.pipe(field(9, "Event that started the run, such as push.")),
459
- status: Schema.NullOr(Schema.String).pipe(field(10, "Status, such as queued, in_progress, or completed.")),
460
- conclusion: Schema.NullOr(Schema.String).pipe(field(11, "Result of a completed run, such as success or failure.")),
461
- head_branch: Schema.NullOr(Schema.String).pipe(field(12, "Branch the run is for.")),
462
- head_sha: Schema.String.pipe(field(13, "SHA of the commit the run is for.")),
463
- run_number: Long.pipe(field(14, "Run number of the workflow.")),
464
- run_attempt: Schema.optionalKey(Long).pipe(field(15, "Attempt number. Re-runs count up.")),
465
- check_suite_id: Schema.optionalKey(Long).pipe(field(16, "ID of the run's check suite.")),
466
- actor: Schema.optionalKey(user(100)).pipe(field(17, "Account that started the first attempt.")),
467
- triggering_actor: Schema.optionalKey(user(103)).pipe(field(18, "Account that started the latest attempt.")),
468
- pull_requests: list(106, Schema.Struct({
469
- id: Long.pipe(field(107, "Pull request ID.")),
470
- number: Long.pipe(field(108, "Pull request number."))
471
- })).pipe(field(19, "Pull requests the run is for. Empty for forks.")),
472
- created_at: Timestamp.pipe(field(20, "Time the run was created.")),
473
- run_started_at: Schema.optionalKey(Timestamp).pipe(field(21, "Time the latest attempt started.")),
474
- html_url: Schema.String.pipe(field(22, "Run page on GitHub."))
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 = (baseId) => Schema.Struct({
588
- name: Schema.String.pipe(field(baseId, "Name in the commit.")),
589
- date: Timestamp.pipe(field(baseId + 1, "Time in the commit."))
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 = (baseId) => Schema.NullOr(Schema.Union([user(baseId), Schema.Struct({})])).pipe(Schema.decodeTo(Schema.NullOr(Schema.toType(user(baseId))), SchemaTransformation.transform({
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(field(1, "Repository ID and SHA, such as `1406396726:9eb3a7d`.")),
601
- version: Schema.Date.pipe(field(2, "Commit time. A commit never changes.")),
602
- repository_id: Long.pipe(field(3, "ID of the repository the commit is in.")),
603
- sha: Schema.String.pipe(field(4, "Commit SHA.")),
604
- node_id: Schema.String.pipe(field(5, "GraphQL node ID of the commit.")),
605
- message: Schema.String.pipe(field(6, "Commit message.")),
606
- author: gitActor(100).pipe(field(7, "Author name and time from the commit.")),
607
- committer: gitActor(102).pipe(field(8, "Committer name and time from the commit.")),
608
- author_user: account(104).pipe(field(9, "GitHub account of the author.")),
609
- committer_user: account(107).pipe(field(10, "GitHub account of the committer.")),
610
- parents: list(110, Schema.String).pipe(field(11, "SHAs of the parent commits.")),
611
- verified: Schema.Boolean.pipe(field(12, "Whether GitHub verified the commit signature.")),
612
- html_url: Schema.String.pipe(field(13, "Commit page on GitHub."))
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(100),
619
- committer: gitActor(102),
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(104),
624
- committer: account(107),
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(field(1, "Unique status ID. Each new status of a context gets a new ID.")),
952
- version: version(2, "status"),
953
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the status.")),
954
- repository_id: Long.pipe(field(4, "ID of the repository the status belongs to.")),
955
- sha: Schema.String.pipe(field(5, "SHA of the commit the status is on.")),
956
- state: Schema.String.pipe(field(6, "State: error, failure, pending, or success.")),
957
- context: Schema.String.pipe(field(7, "Label that tells the status apart, such as ci/build.")),
958
- description: Text.pipe(field(8, "Short description. Empty when not set.")),
959
- target_url: Schema.NullOr(Schema.String).pipe(field(9, "Link the status points to.")),
960
- creator: Schema.NullOr(user(100)).pipe(field(10, "Account that created the status.")),
961
- created_at: Timestamp.pipe(field(11, "Time the status was created."))
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(field(1, "Repository ID, pull request number, and SHA, such as `1406396726:3:9eb3a7d`.")),
1086
- version: Schema.Date.pipe(field(2, "Time GitHub last updated the pull request.")),
1087
- repository_id: Long.pipe(field(3, "ID of the repository the pull request belongs to.")),
1088
- pull_request_number: Long.pipe(field(4, "Pull request number in the repository.")),
1089
- sha: Schema.String.pipe(field(5, "Commit SHA.")),
1090
- message: Schema.String.pipe(field(6, "Commit message.")),
1091
- author: gitActor(100).pipe(field(7, "Author name and time from the commit.")),
1092
- committer: gitActor(102).pipe(field(8, "Committer name and time from the commit.")),
1093
- author_user: account(104).pipe(field(9, "GitHub account of the author.")),
1094
- committer_user: account(107).pipe(field(10, "GitHub account of the committer.")),
1095
- html_url: Schema.String.pipe(field(11, "Commit page on GitHub."))
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(field(1, "Unique review ID.")),
1222
- version: readVersion(2, "review"),
1223
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the review.")),
1224
- repository_id: Long.pipe(field(4, "ID of the repository the review belongs to.")),
1225
- pull_request_number: Long.pipe(field(5, "Number of the pull request the review is on, in its repository.")),
1226
- user: Schema.NullOr(user(100)).pipe(field(6, "Account that wrote the review.")),
1227
- author_association: Schema.String.pipe(field(7, "Author's relation to the repository, such as OWNER or CONTRIBUTOR.")),
1228
- state: Schema.String.pipe(field(8, "State, such as APPROVED, CHANGES_REQUESTED, COMMENTED, or DISMISSED.")),
1229
- body: Schema.String.pipe(field(9, "Review summary in Markdown.")),
1230
- commit_id: Schema.NullOr(Schema.String).pipe(field(10, "SHA of the commit the review is on.")),
1231
- submitted_at: Schema.optionalKey(Timestamp).pipe(field(11, "Time the review was submitted.")),
1232
- html_url: Schema.String.pipe(field(12, "Review on GitHub."))
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(field(102, "Step number.")),
1358
- name: Schema.String.pipe(field(103, "Step name.")),
1359
- status: Schema.String.pipe(field(104, "Status, such as queued, in_progress, or completed.")),
1360
- conclusion: Schema.NullOr(Schema.String).pipe(field(105, "Result of a completed step.")),
1361
- started_at: Schema.optionalKey(Schema.NullOr(Timestamp)).pipe(field(106, "Time the step started.")),
1362
- completed_at: Schema.optionalKey(Schema.NullOr(Timestamp)).pipe(field(107, "Time the step completed."))
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(field(1, "Unique job ID.")),
1366
- version: readVersion(2, "job"),
1367
- node_id: Schema.String.pipe(field(3, "GraphQL node ID of the job.")),
1368
- repository_id: Long.pipe(field(4, "ID of the repository the job belongs to.")),
1369
- run_id: Long.pipe(field(5, "ID of the workflow run.")),
1370
- run_attempt: Schema.optionalKey(Long).pipe(field(6, "Attempt of the run the job belongs to.")),
1371
- workflow_name: Schema.NullOr(Schema.String).pipe(field(7, "Workflow name.")),
1372
- name: Schema.String.pipe(field(8, "Job name.")),
1373
- head_sha: Schema.String.pipe(field(9, "SHA of the commit the job ran on.")),
1374
- head_branch: Schema.NullOr(Schema.String).pipe(field(10, "Branch the job ran on.")),
1375
- status: Schema.String.pipe(field(11, "Status, such as queued, in_progress, or completed.")),
1376
- conclusion: Schema.NullOr(Schema.String).pipe(field(12, "Result of a completed job, such as success or failure.")),
1377
- created_at: Timestamp.pipe(field(13, "Time the job was queued.")),
1378
- started_at: Timestamp.pipe(field(14, "Time the job started.")),
1379
- completed_at: Schema.NullOr(Timestamp).pipe(field(15, "Time the job completed.")),
1380
- runner_name: Schema.NullOr(Schema.String).pipe(field(16, "Name of the runner.")),
1381
- labels: list(100, Schema.String).pipe(field(17, "Runner labels the job asked for.")),
1382
- steps: list(101, step).pipe(field(18, "Steps of the job.")),
1383
- html_url: Schema.NullOr(Schema.String).pipe(field(19, "Job page on GitHub."))
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-D6cTmVtF.mjs.map
1563
+ //# sourceMappingURL=src-DKDUc00e.mjs.map