@usine/github 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/LICENSE +661 -21
  2. package/README.md +35 -56
  3. package/dist/access.d.ts +30 -8
  4. package/dist/access.d.ts.map +1 -1
  5. package/dist/access.js +31 -8
  6. package/dist/access.js.map +1 -1
  7. package/dist/credentials.d.ts +6 -6
  8. package/dist/credentials.d.ts.map +1 -1
  9. package/dist/credentials.js +6 -6
  10. package/dist/credentials.js.map +1 -1
  11. package/dist/error.d.ts +28 -10
  12. package/dist/error.d.ts.map +1 -1
  13. package/dist/error.js +34 -7
  14. package/dist/error.js.map +1 -1
  15. package/dist/github-app.d.ts +19 -10
  16. package/dist/github-app.d.ts.map +1 -1
  17. package/dist/github-app.js +69 -30
  18. package/dist/github-app.js.map +1 -1
  19. package/dist/graphql.d.ts +11 -0
  20. package/dist/graphql.d.ts.map +1 -0
  21. package/dist/graphql.js +47 -0
  22. package/dist/graphql.js.map +1 -0
  23. package/dist/http.d.ts +11 -5
  24. package/dist/http.d.ts.map +1 -1
  25. package/dist/http.js +27 -9
  26. package/dist/http.js.map +1 -1
  27. package/dist/installation.d.ts +17 -9
  28. package/dist/installation.d.ts.map +1 -1
  29. package/dist/installation.js +17 -9
  30. package/dist/installation.js.map +1 -1
  31. package/dist/item-history.d.ts +57 -0
  32. package/dist/item-history.d.ts.map +1 -0
  33. package/dist/item-history.js +190 -0
  34. package/dist/item-history.js.map +1 -0
  35. package/dist/item-writer.d.ts +3 -3
  36. package/dist/item-writer.d.ts.map +1 -1
  37. package/dist/item-writer.js +2 -2
  38. package/dist/item-writer.js.map +1 -1
  39. package/dist/jwt.d.ts +3 -3
  40. package/dist/jwt.d.ts.map +1 -1
  41. package/dist/jwt.js +4 -4
  42. package/dist/jwt.js.map +1 -1
  43. package/dist/label-writer.d.ts +3 -3
  44. package/dist/label-writer.d.ts.map +1 -1
  45. package/dist/label-writer.js +3 -3
  46. package/dist/label-writer.js.map +1 -1
  47. package/dist/local-secrets.d.ts +2 -2
  48. package/dist/local-secrets.d.ts.map +1 -1
  49. package/dist/local-secrets.js +6 -6
  50. package/dist/local-secrets.js.map +1 -1
  51. package/dist/polling/content.js +2 -2
  52. package/dist/polling/detection.d.ts +21 -10
  53. package/dist/polling/detection.d.ts.map +1 -1
  54. package/dist/polling/detection.js +20 -10
  55. package/dist/polling/detection.js.map +1 -1
  56. package/dist/polling/labels.d.ts +5 -5
  57. package/dist/polling/labels.d.ts.map +1 -1
  58. package/dist/polling/labels.js +5 -5
  59. package/dist/polling/labels.js.map +1 -1
  60. package/dist/polling/payload.d.ts +12 -8
  61. package/dist/polling/payload.d.ts.map +1 -1
  62. package/dist/polling/payload.js +17 -12
  63. package/dist/polling/payload.js.map +1 -1
  64. package/dist/polling/polling.d.ts +27 -9
  65. package/dist/polling/polling.d.ts.map +1 -1
  66. package/dist/polling/polling.js +94 -56
  67. package/dist/polling/polling.js.map +1 -1
  68. package/dist/polling/queries.d.ts +6 -1
  69. package/dist/polling/queries.d.ts.map +1 -1
  70. package/dist/polling/queries.js +16 -0
  71. package/dist/polling/queries.js.map +1 -1
  72. package/package.json +14 -9
@@ -1 +1 @@
1
- {"version":3,"file":"local-secrets.js","sourceRoot":"","sources":["../src/local-secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAEhE,MAAM,OAAO,2BAA4B,SAAQ,MAAM,CAAC,WAAW,CACjE,2CAA2C,CA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OAAO,IAAI,cAAc,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;QACpD,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;KACpE,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,IAAuB,EAC+D,EAAE,CACxF,KAAK,CAAC,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  /**
3
- * Timestamp fields in the payload schemas in payload.ts. Add each new timestamp
4
- * field here so changes to it remain outside the content hash (ADR 0007).
3
+ * The timestamp fields in the payload.ts schemas, excluded from the content hash (ADR 0007).
4
+ * Add each new timestamp field here.
5
5
  */
6
6
  const TIMESTAMP_FIELDS = new Set([
7
7
  "closedAt",
@@ -1,12 +1,23 @@
1
1
  import { Schema } from "effect";
2
- /** GitHub's opaque HTTP validator for a conditional repository or label-catalog request. */
2
+ /** GitHub's opaque HTTP validator for a conditional repository, label-catalog, or branch request. */
3
3
  export declare const EntityTag: Schema.brand<Schema.NonEmptyString, "GitHubEntityTag">;
4
4
  export type EntityTag = typeof EntityTag.Type;
5
+ /** The name of the branch a pull request merges into, without the `refs/heads/` prefix. */
6
+ export declare const BaseRefName: Schema.brand<Schema.NonEmptyString, "GitHubBaseRefName">;
7
+ export type BaseRefName = typeof BaseRefName.Type;
8
+ declare const BaseRefHead_base: Schema.Class<BaseRefHead, Schema.Struct<{
9
+ readonly baseRefName: Schema.brand<Schema.NonEmptyString, "GitHubBaseRefName">;
10
+ readonly sha: Schema.brand<Schema.String, "CommitSha">;
11
+ readonly entityTag: Schema.OptionFromNullOr<Schema.brand<Schema.NonEmptyString, "GitHubEntityTag">>;
12
+ }>, {}>;
13
+ /** The commit at the tip of a base branch, with the ETag for the next conditional read. */
14
+ export declare class BaseRefHead extends BaseRefHead_base {
15
+ }
5
16
  declare const PollCursor_base: Schema.Class<PollCursor, Schema.Struct<{
6
17
  readonly entityTag: Schema.OptionFromNullOr<Schema.brand<Schema.NonEmptyString, "GitHubEntityTag">>;
7
18
  readonly watermark: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
8
19
  }>, {}>;
9
- /** REST cursor for efficiency only. Losing it is safe because Event dedup is permanent (ADR 0007). */
20
+ /** A REST cursor used only for efficiency; losing it is safe because Event deduplication is permanent (ADR 0007). */
10
21
  export declare class PollCursor extends PollCursor_base {
11
22
  static readonly empty: PollCursor;
12
23
  }
@@ -14,38 +25,38 @@ declare const ChangedIssue_base: Schema.Class<ChangedIssue, Schema.TaggedStruct<
14
25
  readonly number: Schema.Int;
15
26
  readonly updatedAt: Schema.DateTimeUtc;
16
27
  }>, {}>;
17
- /** An issue number and update time reported by repository change detection. */
28
+ /** An issue number and update time from repository change detection. */
18
29
  export declare class ChangedIssue extends ChangedIssue_base {
19
30
  }
20
31
  declare const ChangedPullRequest_base: Schema.Class<ChangedPullRequest, Schema.TaggedStruct<"ChangedPullRequest", {
21
32
  readonly number: Schema.Int;
22
33
  readonly updatedAt: Schema.DateTimeUtc;
23
34
  }>, {}>;
24
- /** A pull request number and update time reported by repository change detection. */
35
+ /** A pull request number and update time from repository change detection. */
25
36
  export declare class ChangedPullRequest extends ChangedPullRequest_base {
26
37
  }
27
- /** An issue or pull request whose payload needs to be fetched after change detection. */
38
+ /** An issue or pull request whose payload must be fetched after change detection. */
28
39
  export declare const ChangedItem: Schema.Union<readonly [typeof ChangedIssue, typeof ChangedPullRequest]>;
29
40
  export type ChangedItem = typeof ChangedItem.Type;
30
41
  declare const RepositoryNotModified_base: Schema.Class<RepositoryNotModified, Schema.TaggedStruct<"RepositoryNotModified", {
31
42
  readonly cursor: typeof PollCursor;
32
43
  readonly nextPollAt: Schema.Option<Schema.DateTimeUtc>;
33
- /** Request backoff from rate pressure or Retry-After; excludes the normal polling interval. */
44
+ /** The backoff from rate pressure or `Retry-After`, not including the normal polling interval. */
34
45
  readonly backoffUntil: Schema.withConstructorDefault<Schema.Option<Schema.DateTimeUtc>>;
35
46
  }>, {}>;
36
- /** GitHub confirmed that the repository cursor still describes its current state. */
47
+ /** The result when GitHub confirms that the repository cursor is current. */
37
48
  export declare class RepositoryNotModified extends RepositoryNotModified_base {
38
49
  }
39
50
  declare const RepositoryChanges_base: Schema.Class<RepositoryChanges, Schema.TaggedStruct<"RepositoryChanges", {
40
51
  readonly cursor: typeof PollCursor;
41
52
  readonly items: Schema.$Array<Schema.Union<readonly [typeof ChangedIssue, typeof ChangedPullRequest]>>;
42
- /** True when the page cap ended the walk early. The rest arrives next cycle. */
53
+ /** Whether the page cap ended the walk early; the rest is fetched next cycle. */
43
54
  readonly backlog: Schema.Boolean;
44
55
  readonly nextPollAt: Schema.Option<Schema.DateTimeUtc>;
45
- /** Request backoff from rate pressure or Retry-After; excludes the normal polling interval. */
56
+ /** The backoff from rate pressure or `Retry-After`, not including the normal polling interval. */
46
57
  readonly backoffUntil: Schema.withConstructorDefault<Schema.Option<Schema.DateTimeUtc>>;
47
58
  }>, {}>;
48
- /** Changed Items, the next cursor, and whether the page cap left more Items to fetch. */
59
+ /** Changed Items, the next cursor, and whether the page cap left Items unfetched. */
49
60
  export declare class RepositoryChanges extends RepositoryChanges_base {
50
61
  }
51
62
  /** The result of checking repository changes, including the earliest next poll time. */
@@ -1 +1 @@
1
- {"version":3,"file":"detection.d.ts","sourceRoot":"","sources":["../../src/polling/detection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhD,4FAA4F;AAC5F,eAAO,MAAM,SAAS,wDAA8D,CAAC;AACrF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;;;;;AAE9C,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AAmB,SAAQ,uBAKtC;CAAG;AAEL,qFAAqF;AACrF,eAAO,MAAM,WAAW,yEAAmD,CAAC;AAC5E,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;;;;IAQhD,kGAAkG;;;AANpG,6EAA6E;AAC7E,qBAAa,qBAAsB,SAAQ,0BASzC;CAAG;;;;IAQH,iFAAiF;;;IAGjF,kGAAkG;;;AATpG,qFAAqF;AACrF,qBAAa,iBAAkB,SAAQ,sBAYrC;CAAG;AAEL,wFAAwF;AACxF,eAAO,MAAM,eAAe,iFAA2D,CAAC;AACxF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC"}
@@ -1,7 +1,17 @@
1
+ import { CommitSha } from "@usine/core/repository";
1
2
  import { Effect, Option, Schema } from "effect";
2
- /** GitHub's opaque HTTP validator for a conditional repository or label-catalog request. */
3
+ /** GitHub's opaque HTTP validator for a conditional repository, label-catalog, or branch request. */
3
4
  export const EntityTag = Schema.NonEmptyString.pipe(Schema.brand("GitHubEntityTag"));
4
- /** REST cursor for efficiency only. Losing it is safe because Event dedup is permanent (ADR 0007). */
5
+ /** The name of the branch a pull request merges into, without the `refs/heads/` prefix. */
6
+ export const BaseRefName = Schema.NonEmptyString.pipe(Schema.brand("GitHubBaseRefName"));
7
+ /** The commit at the tip of a base branch, with the ETag for the next conditional read. */
8
+ export class BaseRefHead extends Schema.Class("@usine/github/BaseRefHead")({
9
+ baseRefName: BaseRefName,
10
+ sha: CommitSha,
11
+ entityTag: Schema.OptionFromNullOr(EntityTag),
12
+ }) {
13
+ }
14
+ /** A REST cursor used only for efficiency; losing it is safe because Event deduplication is permanent (ADR 0007). */
5
15
  export class PollCursor extends Schema.Class("@usine/github/PollCursor")({
6
16
  entityTag: Schema.OptionFromNullOr(EntityTag),
7
17
  watermark: Schema.OptionFromNullOr(Schema.DateTimeUtcFromString),
@@ -11,36 +21,36 @@ export class PollCursor extends Schema.Class("@usine/github/PollCursor")({
11
21
  watermark: Option.none(),
12
22
  });
13
23
  }
14
- /** An issue number and update time reported by repository change detection. */
24
+ /** An issue number and update time from repository change detection. */
15
25
  export class ChangedIssue extends Schema.TaggedClass("@usine/github/ChangedIssue")("ChangedIssue", {
16
26
  number: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)),
17
27
  updatedAt: Schema.DateTimeUtc,
18
28
  }) {
19
29
  }
20
- /** A pull request number and update time reported by repository change detection. */
30
+ /** A pull request number and update time from repository change detection. */
21
31
  export class ChangedPullRequest extends Schema.TaggedClass("@usine/github/ChangedPullRequest")("ChangedPullRequest", {
22
32
  number: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)),
23
33
  updatedAt: Schema.DateTimeUtc,
24
34
  }) {
25
35
  }
26
- /** An issue or pull request whose payload needs to be fetched after change detection. */
36
+ /** An issue or pull request whose payload must be fetched after change detection. */
27
37
  export const ChangedItem = Schema.Union([ChangedIssue, ChangedPullRequest]);
28
- /** GitHub confirmed that the repository cursor still describes its current state. */
38
+ /** The result when GitHub confirms that the repository cursor is current. */
29
39
  export class RepositoryNotModified extends Schema.TaggedClass("@usine/github/RepositoryNotModified")("RepositoryNotModified", {
30
40
  cursor: PollCursor,
31
41
  nextPollAt: Schema.Option(Schema.DateTimeUtc),
32
- /** Request backoff from rate pressure or Retry-After; excludes the normal polling interval. */
42
+ /** The backoff from rate pressure or `Retry-After`, not including the normal polling interval. */
33
43
  backoffUntil: Schema.Option(Schema.DateTimeUtc).pipe(Schema.withConstructorDefault(Effect.succeed(Option.none()))),
34
44
  }) {
35
45
  }
36
- /** Changed Items, the next cursor, and whether the page cap left more Items to fetch. */
46
+ /** Changed Items, the next cursor, and whether the page cap left Items unfetched. */
37
47
  export class RepositoryChanges extends Schema.TaggedClass("@usine/github/RepositoryChanges")("RepositoryChanges", {
38
48
  cursor: PollCursor,
39
49
  items: Schema.Array(ChangedItem),
40
- /** True when the page cap ended the walk early. The rest arrives next cycle. */
50
+ /** Whether the page cap ended the walk early; the rest is fetched next cycle. */
41
51
  backlog: Schema.Boolean,
42
52
  nextPollAt: Schema.Option(Schema.DateTimeUtc),
43
- /** Request backoff from rate pressure or Retry-After; excludes the normal polling interval. */
53
+ /** The backoff from rate pressure or `Retry-After`, not including the normal polling interval. */
44
54
  backoffUntil: Schema.Option(Schema.DateTimeUtc).pipe(Schema.withConstructorDefault(Effect.succeed(Option.none()))),
45
55
  }) {
46
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"detection.js","sourceRoot":"","sources":["../../src/polling/detection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhD,4FAA4F;AAC5F,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAGrF,sGAAsG;AACtG,MAAM,OAAO,UAAW,SAAQ,MAAM,CAAC,KAAK,CAAa,0BAA0B,CAAC,CAAC;IACnF,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,qBAAqB,CAAC;CACjE,CAAC;IACA,MAAM,CAAU,KAAK,GAAG,IAAI,UAAU,CAAC;QACrC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE;QACxB,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE;KACzB,CAAC,CAAC;CACJ;AAED,+EAA+E;AAC/E,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,WAAW,CAAe,4BAA4B,CAAC,CAC9F,cAAc,EACd;IACE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC1D,SAAS,EAAE,MAAM,CAAC,WAAW;CAC9B,CACF;CAAG;AAEJ,qFAAqF;AACrF,MAAM,O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,WAAW,CAAC;IAChC,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC,OAAO;IACvB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;IAC7C,kGAAkG;IAClG,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAClD,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAC7D;CACF,CAAC;CAAG;AAEL,wFAAwF;AACxF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { Schema } from "effect";
2
- /** A repository label name as returned by GitHub, preserved without case conversion. */
2
+ /** A repository label name as returned by GitHub, with case preserved. */
3
3
  export declare const RepositoryLabelName: Schema.brand<Schema.NonEmptyString, "GitHubRepositoryLabelName">;
4
4
  export type RepositoryLabelName = typeof RepositoryLabelName.Type;
5
- /** GitHub stores label colors as six hex digits without the leading hash. */
5
+ /** A label color as six hex digits without the leading `#`. */
6
6
  export declare const RepositoryLabelColor: Schema.brand<Schema.String, "GitHubRepositoryLabelColor">;
7
7
  export type RepositoryLabelColor = typeof RepositoryLabelColor.Type;
8
8
  declare const RepositoryLabel_base: Schema.Class<RepositoryLabel, Schema.Struct<{
@@ -10,7 +10,7 @@ declare const RepositoryLabel_base: Schema.Class<RepositoryLabel, Schema.Struct<
10
10
  readonly color: Schema.brand<Schema.String, "GitHubRepositoryLabelColor">;
11
11
  readonly description: Schema.OptionFromNullOr<Schema.String>;
12
12
  }>, {}>;
13
- /** One repository label as GitHub defines it. The name routes lanes, and color and description are presentation only. */
13
+ /** A repository label. The name selects lanes; color and description are for display only. */
14
14
  export declare class RepositoryLabel extends RepositoryLabel_base {
15
15
  }
16
16
  declare const RepositoryLabelCatalog_base: Schema.Class<RepositoryLabelCatalog, Schema.Struct<{
@@ -21,10 +21,10 @@ declare const RepositoryLabelCatalog_base: Schema.Class<RepositoryLabelCatalog,
21
21
  export declare class RepositoryLabelCatalog extends RepositoryLabelCatalog_base {
22
22
  }
23
23
  declare const RepositoryLabelsNotModified_base: Schema.Class<RepositoryLabelsNotModified, Schema.TaggedStruct<"RepositoryLabelsNotModified", {}>, {}>;
24
- /** GitHub confirmed the catalog named by its ETag has not changed. */
24
+ /** The result when GitHub confirms that the catalog with this ETag hasn't changed. */
25
25
  export declare class RepositoryLabelsNotModified extends RepositoryLabelsNotModified_base {
26
26
  }
27
- /** A complete label catalog or confirmation that the cached catalog is unchanged. */
27
+ /** A complete label catalog, or confirmation that the cached catalog is unchanged. */
28
28
  export declare const RepositoryLabelDetection: Schema.Union<readonly [typeof RepositoryLabelCatalog, typeof RepositoryLabelsNotModified]>;
29
29
  export type RepositoryLabelDetection = typeof RepositoryLabelDetection.Type;
30
30
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/polling/labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,kEAE/B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAElE,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,2DAEiB,CAAC;AACnD,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC;;;;;;AAEpE,yHAAyH;AACzH,qBAAa,eAAgB,SAAQ,oBAMpC;CAAG;;;;;AAOJ,wEAAwE;AACxE,qBAAa,sBAAuB,SAAQ,2BAK1C;CAAG;;AAEL,sEAAsE;AACtE,qBAAa,2BAA4B,SAAQ,gCAEb;CAAG;AAEvC,qFAAqF;AACrF,eAAO,MAAM,wBAAwB,4FAGnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC,IAAI,CAAC"}
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/polling/labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,kEAE/B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAElE,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,2DAEiB,CAAC;AACnD,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC;;;;;;AAEpE,8FAA8F;AAC9F,qBAAa,eAAgB,SAAQ,oBAMpC;CAAG;;;;;AAOJ,wEAAwE;AACxE,qBAAa,sBAAuB,SAAQ,2BAK1C;CAAG;;AAEL,sFAAsF;AACtF,qBAAa,2BAA4B,SAAQ,gCAEb;CAAG;AAEvC,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,4FAGnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC,IAAI,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { Schema } from "effect";
2
2
  import { EntityTag } from "./detection.js";
3
- /** A repository label name as returned by GitHub, preserved without case conversion. */
3
+ /** A repository label name as returned by GitHub, with case preserved. */
4
4
  export const RepositoryLabelName = Schema.NonEmptyString.pipe(Schema.brand("GitHubRepositoryLabelName"));
5
- /** GitHub stores label colors as six hex digits without the leading hash. */
5
+ /** A label color as six hex digits without the leading `#`. */
6
6
  export const RepositoryLabelColor = Schema.String.check(Schema.isPattern(/^[0-9a-fA-F]{6}$/u, { message: "Expected a six-digit hex label color" })).pipe(Schema.brand("GitHubRepositoryLabelColor"));
7
- /** One repository label as GitHub defines it. The name routes lanes, and color and description are presentation only. */
7
+ /** A repository label. The name selects lanes; color and description are for display only. */
8
8
  export class RepositoryLabel extends Schema.Class("@usine/github/RepositoryLabel")({
9
9
  name: RepositoryLabelName,
10
10
  color: RepositoryLabelColor,
@@ -18,10 +18,10 @@ export class RepositoryLabelCatalog extends Schema.Class("@usine/github/Reposito
18
18
  labels: Schema.Array(RepositoryLabel).check(uniqueLabelNames),
19
19
  }) {
20
20
  }
21
- /** GitHub confirmed the catalog named by its ETag has not changed. */
21
+ /** The result when GitHub confirms that the catalog with this ETag hasn't changed. */
22
22
  export class RepositoryLabelsNotModified extends Schema.TaggedClass("@usine/github/RepositoryLabelsNotModified")("RepositoryLabelsNotModified", {}) {
23
23
  }
24
- /** A complete label catalog or confirmation that the cached catalog is unchanged. */
24
+ /** A complete label catalog, or confirmation that the cached catalog is unchanged. */
25
25
  export const RepositoryLabelDetection = Schema.Union([
26
26
  RepositoryLabelCatalog,
27
27
  RepositoryLabelsNotModified,
@@ -1 +1 @@
1
- {"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/polling/labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,wFAAwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAC3D,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAC1C,CAAC;AAGF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CACrD,MAAM,CAAC,SAAS,CAAC,mBAAmB,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC,CAC3F,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC;AAGnD,yHAAyH;AACzH,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,KAAK,CAAkB,+BAA+B,CAAC,CACjG;IACE,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,oBAA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
1
1
  import { Schema } from "effect";
2
- /** The issue payload slice that `if:` expressions and prompt interpolation range over. */
2
+ /** The issue payload slice available to `if:` expressions and prompt interpolation. */
3
3
  export declare const IssuePayload: Schema.Struct<{
4
4
  readonly number: Schema.Int;
5
5
  readonly title: Schema.String;
@@ -91,7 +91,7 @@ export declare const IssuePayload: Schema.Struct<{
91
91
  }, never, never>>, never, never>;
92
92
  }>;
93
93
  export type IssuePayload = typeof IssuePayload.Type;
94
- /** The pull-request payload slice that `if:` expressions and prompt interpolation range over. */
94
+ /** The pull request payload slice available to `if:` expressions and prompt interpolation. */
95
95
  export declare const PullRequestPayload: Schema.Struct<{
96
96
  readonly number: Schema.Int;
97
97
  readonly title: Schema.String;
@@ -106,13 +106,15 @@ export declare const PullRequestPayload: Schema.Struct<{
106
106
  readonly author: Schema.NullOr<Schema.Struct<{
107
107
  readonly login: Schema.NonEmptyString;
108
108
  }>>;
109
- readonly baseRefName: Schema.String;
109
+ readonly baseRefName: Schema.brand<Schema.NonEmptyString, "GitHubBaseRefName">;
110
110
  readonly headRefName: Schema.String;
111
111
  readonly headRefOid: Schema.NonEmptyString;
112
112
  readonly additions: Schema.Int;
113
113
  readonly deletions: Schema.Int;
114
114
  readonly changedFiles: Schema.Int;
115
115
  readonly reviewDecision: Schema.NullOr<Schema.String>;
116
+ readonly mergeable: Schema.withDecodingDefaultKey<Schema.String, never>;
117
+ readonly mergeStateStatus: Schema.withDecodingDefaultKey<Schema.String, never>;
116
118
  readonly statusCheckRollup: Schema.NullOr<Schema.Struct<{
117
119
  readonly state: Schema.String;
118
120
  }>>;
@@ -273,7 +275,7 @@ export declare const PullRequestPayload: Schema.Struct<{
273
275
  }, never, never>>, never, never>;
274
276
  }>;
275
277
  export type PullRequestPayload = typeof PullRequestPayload.Type;
276
- /** Identifies an Item's payload content for Event deduplication; timestamp-only changes keep the same hash. */
278
+ /** The hash of an Item's payload content for Event deduplication; timestamp-only changes keep the same hash. */
277
279
  export declare const ContentHash: Schema.brand<Schema.String, "GitHubContentHash">;
278
280
  export type ContentHash = typeof ContentHash.Type;
279
281
  declare const IssueSnapshot_base: Schema.Class<IssueSnapshot, Schema.TaggedStruct<"IssueSnapshot", {
@@ -369,7 +371,7 @@ declare const IssueSnapshot_base: Schema.Class<IssueSnapshot, Schema.TaggedStruc
369
371
  }>;
370
372
  readonly contentHash: Schema.brand<Schema.String, "GitHubContentHash">;
371
373
  }>, {}>;
372
- /** An issue's observed payload and the content identity used to decide whether it represents new work. */
374
+ /** An issue's payload and the content hash used to decide whether it's new work. */
373
375
  export declare class IssueSnapshot extends IssueSnapshot_base {
374
376
  }
375
377
  declare const PullRequestSnapshot_base: Schema.Class<PullRequestSnapshot, Schema.TaggedStruct<"PullRequestSnapshot", {
@@ -387,13 +389,15 @@ declare const PullRequestSnapshot_base: Schema.Class<PullRequestSnapshot, Schema
387
389
  readonly author: Schema.NullOr<Schema.Struct<{
388
390
  readonly login: Schema.NonEmptyString;
389
391
  }>>;
390
- readonly baseRefName: Schema.String;
392
+ readonly baseRefName: Schema.brand<Schema.NonEmptyString, "GitHubBaseRefName">;
391
393
  readonly headRefName: Schema.String;
392
394
  readonly headRefOid: Schema.NonEmptyString;
393
395
  readonly additions: Schema.Int;
394
396
  readonly deletions: Schema.Int;
395
397
  readonly changedFiles: Schema.Int;
396
398
  readonly reviewDecision: Schema.NullOr<Schema.String>;
399
+ readonly mergeable: Schema.withDecodingDefaultKey<Schema.String, never>;
400
+ readonly mergeStateStatus: Schema.withDecodingDefaultKey<Schema.String, never>;
397
401
  readonly statusCheckRollup: Schema.NullOr<Schema.Struct<{
398
402
  readonly state: Schema.String;
399
403
  }>>;
@@ -555,10 +559,10 @@ declare const PullRequestSnapshot_base: Schema.Class<PullRequestSnapshot, Schema
555
559
  }>;
556
560
  readonly contentHash: Schema.brand<Schema.String, "GitHubContentHash">;
557
561
  }>, {}>;
558
- /** A pull request's observed payload and the content identity used to decide whether it represents new work. */
562
+ /** A pull request's payload and the content hash used to decide whether it's new work. */
559
563
  export declare class PullRequestSnapshot extends PullRequestSnapshot_base {
560
564
  }
561
- /** The fetched Item state shared by selection, prompt rendering, and Event deduplication. */
565
+ /** The fetched Item state used by selection, prompt rendering, and Event deduplication. */
562
566
  export declare const PayloadSnapshot: Schema.Union<readonly [typeof IssueSnapshot, typeof PullRequestSnapshot]>;
563
567
  export type PayloadSnapshot = typeof PayloadSnapshot.Type;
564
568
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/polling/payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,QAAQ,CAAC;AA8C9C,0FAA0F;AAC1F,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AAiBpD,iGAAiG;AACjG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsD7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAEhE,+GAA+G;AAC/G,eAAO,MAAM,WAAW,kDAEiB,CAAC;AAC1C,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,0GAA0G;AAC1G,qBAAa,aAAc,SAAQ,kBAMlC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,oFAAoF;AACpF,qBAAa,aAAc,SAAQ,kBAMlC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEJ,0FAA0F;AAC1F,qBAAa,mBAAoB,SAAQ,wBAKvC;CAAG;AAEL,2FAA2F;AAC3F,eAAO,MAAM,eAAe,2EAAqD,CAAC;AAClF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC"}
@@ -1,13 +1,13 @@
1
- import { Schema, SchemaGetter } from "effect";
1
+ import { Effect, Schema, SchemaGetter } from "effect";
2
+ import { BaseRefName } from "./detection.js";
2
3
  const PositiveInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1));
3
4
  const NonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
4
5
  const Timestamp = Schema.String.check(Schema.isPattern(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/u, {
5
6
  message: "Expected a GitHub UTC timestamp",
6
7
  }));
7
8
  /**
8
- * GitHub declares most GraphQL connections nullable, and a null connection means
9
- * the same as an empty one. Decoding null to empty keeps the payload type
10
- * non-null and hashes both shapes identically.
9
+ * Decodes a nullable GraphQL connection with null as `empty`, so the payload type is non-null
10
+ * and both shapes hash the same.
11
11
  */
12
12
  const orEmpty = (schema, empty) => Schema.NullOr(schema).pipe(Schema.decodeTo(schema, {
13
13
  decode: SchemaGetter.transform((value) => value ?? empty),
@@ -27,7 +27,7 @@ const IssueComments = Schema.Struct({
27
27
  totalCount: NonNegativeInt,
28
28
  nodes: Schema.Array(IssueComment),
29
29
  });
30
- /** The issue payload slice that `if:` expressions and prompt interpolation range over. */
30
+ /** The issue payload slice available to `if:` expressions and prompt interpolation. */
31
31
  export const IssuePayload = Schema.Struct({
32
32
  number: PositiveInt,
33
33
  title: Schema.String,
@@ -54,7 +54,7 @@ export const IssuePayload = Schema.Struct({
54
54
  })),
55
55
  }), emptyConnection),
56
56
  });
57
- /** Null when the reviewer is a deleted user or a mannequin. That null is real content and stays in the payload. */
57
+ /** Null for a deleted user or a mannequin; the null is kept in the payload. */
58
58
  const RequestedReviewer = Schema.NullOr(Schema.Struct({ login: Schema.optionalKey(Schema.NonEmptyString) }));
59
59
  const Review = Schema.Struct({
60
60
  author: NullableActor,
@@ -64,7 +64,7 @@ const Review = Schema.Struct({
64
64
  commit: Schema.NullOr(Schema.Struct({ oid: Schema.NonEmptyString })),
65
65
  });
66
66
  const ReviewThreadComment = Schema.Struct({ author: NullableActor, body: Schema.String });
67
- /** The pull-request payload slice that `if:` expressions and prompt interpolation range over. */
67
+ /** The pull request payload slice available to `if:` expressions and prompt interpolation. */
68
68
  export const PullRequestPayload = Schema.Struct({
69
69
  number: PositiveInt,
70
70
  title: Schema.String,
@@ -77,13 +77,18 @@ export const PullRequestPayload = Schema.Struct({
77
77
  updatedAt: Timestamp,
78
78
  mergedAt: Schema.NullOr(Timestamp),
79
79
  author: NullableActor,
80
- baseRefName: Schema.String,
80
+ baseRefName: BaseRefName,
81
81
  headRefName: Schema.String,
82
82
  headRefOid: Schema.NonEmptyString,
83
83
  additions: NonNegativeInt,
84
84
  deletions: NonNegativeInt,
85
85
  changedFiles: NonNegativeInt,
86
86
  reviewDecision: Schema.NullOr(Schema.String),
87
+ // GitHub computes mergeability lazily, so the first fetch after the base changes can return
88
+ // UNKNOWN. Polling fetches an open PR again after its base branch moves, and on every poll while
89
+ // the value is UNKNOWN. Older projections decode as UNKNOWN until then.
90
+ mergeable: Schema.String.pipe(Schema.withDecodingDefaultKey(Effect.succeed("UNKNOWN"))),
91
+ mergeStateStatus: Schema.String.pipe(Schema.withDecodingDefaultKey(Effect.succeed("UNKNOWN"))),
87
92
  statusCheckRollup: Schema.NullOr(Schema.Struct({ state: Schema.String })),
88
93
  labels: orEmpty(Labels, emptyConnection),
89
94
  reviewRequests: orEmpty(Schema.Struct({
@@ -109,20 +114,20 @@ export const PullRequestPayload = Schema.Struct({
109
114
  nodes: Schema.Array(Schema.Struct({ number: PositiveInt, state: Schema.String })),
110
115
  }), emptyConnection),
111
116
  });
112
- /** Identifies an Item's payload content for Event deduplication; timestamp-only changes keep the same hash. */
117
+ /** The hash of an Item's payload content for Event deduplication; timestamp-only changes keep the same hash. */
113
118
  export const ContentHash = Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/u, { message: "Expected a SHA-256 content hash" })).pipe(Schema.brand("GitHubContentHash"));
114
- /** An issue's observed payload and the content identity used to decide whether it represents new work. */
119
+ /** An issue's payload and the content hash used to decide whether it's new work. */
115
120
  export class IssueSnapshot extends Schema.TaggedClass("@usine/github/IssueSnapshot")("IssueSnapshot", {
116
121
  payload: IssuePayload,
117
122
  contentHash: ContentHash,
118
123
  }) {
119
124
  }
120
- /** A pull request's observed payload and the content identity used to decide whether it represents new work. */
125
+ /** A pull request's payload and the content hash used to decide whether it's new work. */
121
126
  export class PullRequestSnapshot extends Schema.TaggedClass("@usine/github/PullRequestSnapshot")("PullRequestSnapshot", {
122
127
  payload: PullRequestPayload,
123
128
  contentHash: ContentHash,
124
129
  }) {
125
130
  }
126
- /** The fetched Item state shared by selection, prompt rendering, and Event deduplication. */
131
+ /** The fetched Item state used by selection, prompt rendering, and Event deduplication. */
127
132
  export const PayloadSnapshot = Schema.Union([IssueSnapshot, PullRequestSnapshot]);
128
133
  //# sourceMappingURL=payload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../src/polling/payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM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W,CAAgB,6BAA6B,CAAC,CACjG,eAAe,EACf;IACE,OAAO,EAAE,YAAY;IACrB,WAAW,EAAE,WAAW;CACzB,CACF;CAAG;AAEJ,0FAA0F;AAC1F,MAAM,OAAO,mBAAoB,SAAQ,MAAM,CAAC,WAAW,CACzD,mCAAmC,CACpC,CAAC,qBAAqB,EAAE;IACvB,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EAAE,WAAW;CACzB,CAAC;CAAG;AAEL,2FAA2F;AAC3F,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC"}
@@ -1,24 +1,42 @@
1
+ import { ItemNumber } from "@usine/core/item";
1
2
  import { RepositoryName } from "@usine/core/repository";
2
3
  import { Context, Crypto, Effect, Layer, Option } from "effect";
3
- import { HttpClient } from "effect/unstable/http";
4
+ import { HttpClient } from "effect/http";
4
5
  import { GitHubApp } from "../github-app.ts";
5
- import { type GitHubAppError } from "../error.ts";
6
- import { EntityTag, PollCursor, type ChangeDetection, type ChangedItem } from "./detection.ts";
6
+ import { GitHubItemNotFoundError, type GitHubAppError } from "../error.ts";
7
+ import { BaseRefHead, type BaseRefName, EntityTag, PollCursor, type ChangeDetection, type ChangedItem } from "./detection.ts";
7
8
  import { type PayloadSnapshot } from "./payload.ts";
8
9
  import { RepositoryLabelCatalog, RepositoryLabelsNotModified } from "./labels.ts";
9
10
  declare const GitHubPolling_base: Context.ServiceClass<GitHubPolling, "@usine/github/GitHubPolling", {
10
- /** Finds issue and PR updates since the saved cursor; persist the returned cursor after processing the detected Items. */
11
+ /** Returns issue and PR updates since the saved cursor. Persist the returned cursor after processing the detected Items. */
11
12
  readonly changes: (repository: RepositoryName, cursor: PollCursor) => Effect.Effect<ChangeDetection, GitHubAppError>;
12
- /** Reads the repository's label catalog, or confirms the catalog named by `entityTag` is unchanged. */
13
+ /** Returns the repository's label catalog, or confirms that the catalog with `entityTag` is unchanged. */
13
14
  readonly labels: (repository: RepositoryName, entityTag: Option.Option<EntityTag>) => Effect.Effect<RepositoryLabelCatalog | RepositoryLabelsNotModified, GitHubAppError>;
14
- /** Fetches an Item's selection and prompt payload together with its timestamp-independent content hash. */
15
- readonly snapshot: (repository: RepositoryName, item: ChangedItem) => Effect.Effect<PayloadSnapshot, GitHubAppError>;
15
+ /**
16
+ * Returns the head commit of branch `baseRefName`. Sends the ETag of `known`, a head read
17
+ * earlier for the same branch, and returns `known` if GitHub answers 304, which costs no rate
18
+ * limit. Fails with a 404 `GitHubApiError` if the branch doesn't exist.
19
+ */
20
+ readonly baseRefHead: (repository: RepositoryName, baseRefName: BaseRefName, known: Option.Option<BaseRefHead>) => Effect.Effect<BaseRefHead, GitHubAppError>;
21
+ /**
22
+ * Returns an Item's selection and prompt payload with its content hash. Fails with
23
+ * `GitHubItemNotFoundError` if the repository responds but has no such Item.
24
+ */
25
+ readonly snapshot: (repository: RepositoryName, item: ChangedItem) => Effect.Effect<PayloadSnapshot, GitHubAppError | GitHubItemNotFoundError>;
26
+ /**
27
+ * Returns the issue numbers in `numbers` that the repository no longer has (deleted,
28
+ * transferred, or not readable by the App). Sends sequential GraphQL requests of 50 numbers,
29
+ * and none for an empty list. Fails with `InvalidGitHubResponseError` if the repository is
30
+ * null.
31
+ */
32
+ readonly missingIssues: (repository: RepositoryName, numbers: ReadonlyArray<ItemNumber>) => Effect.Effect<ReadonlyArray<ItemNumber>, GitHubAppError>;
16
33
  }>;
17
- /** Finds changed GitHub Items and fetches the snapshots used to select work for Loops. */
34
+ /** The service that finds changed GitHub Items and fetches their snapshots for Loop selection. */
18
35
  export declare class GitHubPolling extends GitHubPolling_base {
19
36
  static readonly layer: Layer.Layer<GitHubPolling, never, Crypto.Crypto | GitHubApp | HttpClient.HttpClient>;
20
37
  }
21
- export { EntityTag, PollCursor, ChangedIssue, ChangedPullRequest, ChangedItem, RepositoryNotModified, RepositoryChanges, ChangeDetection, } from "./detection.ts";
38
+ export { EntityTag, BaseRefName, BaseRefHead, PollCursor, ChangedIssue, ChangedPullRequest, ChangedItem, RepositoryNotModified, RepositoryChanges, ChangeDetection, } from "./detection.ts";
22
39
  export { RepositoryLabelName, RepositoryLabelColor, RepositoryLabel, RepositoryLabelCatalog, RepositoryLabelsNotModified, RepositoryLabelDetection, } from "./labels.ts";
40
+ export { GitHubItemNotFoundError } from "../error.ts";
23
41
  export { ContentHash, IssuePayload, PullRequestPayload, IssueSnapshot, PullRequestSnapshot, PayloadSnapshot, } from "./payload.ts";
24
42
  //# sourceMappingURL=polling.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"polling.d.ts","sourceRoot":"","sources":["../../src/polling/polling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAS,OAAO,EAAE,MAAM,EAAY,MAAM,EAAE,KAAK,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACzF,OAAO,EAAE,UAAU,EAAyC,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAY7C,OAAO,EAAwB,KAAK,cAAc,EAAwB,MAAM,aAAa,CAAC;AAC9F,OAAO,EAGL,SAAS,EACT,UAAU,EAGV,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,sBAAsB,EAEtB,2BAA2B,EAE5B,MAAM,aAAa,CAAC;;IAkJjB,0HAA0H;sBACxG,CAChB,UAAU,EAAE,cAAc,EAC1B,MAAM,EAAE,UAAU,KACf,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC;IACnD,uGAAuG;qBACtF,CACf,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAChC,MAAM,CAAC,MAAM,CAAC,sBAAsB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