@usine/github 0.4.1-next.344.gd950835.1.1 → 0.4.1-next.347.ga29a3d7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,7 @@ The 0.x APIs can change between minor releases.
13
13
 
14
14
  ## Set up the App
15
15
 
16
- [Run a factory](https://docs.usine.dev/guides/) gives the steps under Connect a GitHub App: an App installable only on your account, with an active webhook for deliveries mode, with Contents, Issues, and Pull requests read and write, Checks and Metadata read-only, and **No access** for everything else, including Workflows, Administration, and all organization and account permissions.
16
+ [Run a factory](https://docs.usine.dev/guides/) gives the steps under Connect a GitHub App: an App installable only on your account, with an active webhook for deliveries mode, with Contents, Issues, and Pull requests read and write, Checks and Metadata read-only, optionally Actions read-only for CI job logs, and **No access** for everything else, including Workflows, Administration, and all organization and account permissions.
17
17
 
18
18
  GitHub grants Metadata read access automatically. Contents lets installation tokens use Git over HTTPS; with Workflows off, worker tokens can't edit `.github/workflows/`. User authorization isn't required. Install the App once, on the account that owns the managed repos, for every repo in `usine.yaml`; a factory expects one installation. GitHub's references are [Registering a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app) and [Choosing permissions for a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/choosing-permissions-for-a-github-app).
19
19
 
@@ -122,3 +122,9 @@ Enable the App webhook to record deliveries. A delivery with a failed HTTP statu
122
122
  `GitHubApp.installationUrl()` returns the App's installation page, including before its first installation. It reads the authenticated App metadata and uses the same typed errors as other App requests.
123
123
 
124
124
  `@usine/github/local-secrets` accepts optional `client_id`, `client_secret`, and `webhook_secret` fields alongside `app_id` and `private_key`. `loadLocalSecrets` returns `None` for an absent file and rejects invalid contents or permissions. `writeLocalSecrets` atomically replaces the runtime file with mode 0600; credential values remain redacted in memory. Legacy files with only the App ID and private key continue to load.
125
+
126
+ ## CI checks
127
+
128
+ `GitHubChecks` from `/checks` reads the live PR head and aggregate check state. Missing checks stay pending. Failure diagnostics include failed check names and up to 12,000 characters from the ends of four Actions job logs; legacy commit statuses provide their context and description. Grant the App **Actions: read-only** to read job logs. Without this optional permission, diagnostics use the check output. Rate limits propagate to the caller's polling backoff. `GitHubChecks.layer` needs `GitHubApp` and an Effect HTTP client.
129
+
130
+ `ItemLabelMutation.add` and `remove` can each be empty. Removal-only actions send no additions request, and repeated removals ignore missing labels.
@@ -0,0 +1,30 @@
1
+ import { ItemNumber } from "@usine/core/item";
2
+ import { CommitSha, RepositoryName } from "@usine/core/repository";
3
+ import { Context, Effect, Layer, Schema } from "effect";
4
+ import { HttpClient } from "effect/http";
5
+ import { GitHubApp } from "./github-app.ts";
6
+ import type { GitHubAppError } from "./error.ts";
7
+ declare const CheckSnapshot_base: Schema.Class<CheckSnapshot, Schema.Struct<{
8
+ readonly head: Schema.brand<Schema.String, "CommitSha">;
9
+ readonly state: Schema.Literals<readonly ["pending", "success", "failure"]>;
10
+ }>, {}>;
11
+ /** The current PR head and GitHub's aggregate check state; missing checks remain pending. */
12
+ export declare class CheckSnapshot extends CheckSnapshot_base {
13
+ }
14
+ declare const CheckFailureEvidence_base: Schema.Class<CheckFailureEvidence, Schema.Struct<{
15
+ readonly jobs: Schema.$Array<Schema.NonEmptyString>;
16
+ readonly excerpt: Schema.String;
17
+ }>, {}>;
18
+ /** Failed check names and a bounded log excerpt for a fix attempt. */
19
+ export declare class CheckFailureEvidence extends CheckFailureEvidence_base {
20
+ }
21
+ declare const GitHubChecks_base: Context.ServiceClass<GitHubChecks, "@usine/github/GitHubChecks", {
22
+ readonly snapshot: (repository: RepositoryName, item: ItemNumber) => Effect.Effect<CheckSnapshot, GitHubAppError>;
23
+ readonly failures: (repository: RepositoryName, head: CommitSha) => Effect.Effect<CheckFailureEvidence, GitHubAppError>;
24
+ }>;
25
+ /** Reads aggregate CI and failure diagnostics without starting an agent. */
26
+ export declare class GitHubChecks extends GitHubChecks_base {
27
+ static readonly layer: Layer.Layer<GitHubChecks, never, GitHubApp | HttpClient.HttpClient>;
28
+ }
29
+ export {};
30
+ //# sourceMappingURL=checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAS,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAyC,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;;;;;AAIjD,6FAA6F;AAC7F,qBAAa,aAAc,SAAQ,kBAGjC;CAAG;;;;;AAEL,sEAAsE;AACtE,qBAAa,oBAAqB,SAAQ,yBAKxC;CAAG;;uBAuDkB,CACjB,UAAU,EAAE,cAAc,EAC1B,IAAI,EAAE,UAAU,KACb,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC;uBAC9B,CACjB,UAAU,EAAE,cAAc,EAC1B,IAAI,EAAE,SAAS,KACZ,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,cAAc,CAAC;;AAX5D,4EAA4E;AAC5E,qBAAa,YAAa,SAAQ,iBAYD;IAC/B,MAAM,CAAC,QAAQ,CAAC,KAAK,sEA8HnB;CACH"}
package/dist/checks.js ADDED
@@ -0,0 +1,146 @@
1
+ import { ItemNumber } from "@usine/core/item";
2
+ import { CommitSha, RepositoryName, splitRepositoryName } from "@usine/core/repository";
3
+ import { Clock, Context, Effect, Layer, Schema } from "effect";
4
+ import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
5
+ import { GitHubApp } from "./github-app.js";
6
+ import { queryGraphql } from "./graphql.js";
7
+ import { API_ROOT, authorized, invalidResponse, statusError, transportError } from "./http.js";
8
+ /** The current PR head and GitHub's aggregate check state; missing checks remain pending. */
9
+ export class CheckSnapshot extends Schema.Class("CheckSnapshot")({
10
+ head: CommitSha,
11
+ state: Schema.Literals(["pending", "success", "failure"]),
12
+ }) {
13
+ }
14
+ /** Failed check names and a bounded log excerpt for a fix attempt. */
15
+ export class CheckFailureEvidence extends Schema.Class("CheckFailureEvidence")({
16
+ jobs: Schema.Array(Schema.NonEmptyString),
17
+ excerpt: Schema.String.check(Schema.isMaxLength(12000)),
18
+ }) {
19
+ }
20
+ const Head = Schema.Struct({
21
+ repository: Schema.NullOr(Schema.Struct({
22
+ pullRequest: Schema.NullOr(Schema.Struct({
23
+ headRefOid: CommitSha,
24
+ statusCheckRollup: Schema.NullOr(Schema.Struct({ state: Schema.String })),
25
+ })),
26
+ })),
27
+ });
28
+ const HEAD_QUERY = `query($owner: String!, $name: String!, $number: Int!) {
29
+ repository(owner: $owner, name: $name) {
30
+ pullRequest(number: $number) { headRefOid statusCheckRollup { state } }
31
+ }
32
+ }`;
33
+ const Checks = Schema.Struct({
34
+ total_count: Schema.Int,
35
+ check_runs: Schema.Array(Schema.Struct({
36
+ name: Schema.NonEmptyString,
37
+ conclusion: Schema.NullOr(Schema.String),
38
+ details_url: Schema.NullOr(Schema.String),
39
+ output: Schema.Struct({
40
+ summary: Schema.NullOr(Schema.String),
41
+ text: Schema.NullOr(Schema.String),
42
+ }),
43
+ })),
44
+ });
45
+ const Statuses = Schema.Struct({
46
+ statuses: Schema.Array(Schema.Struct({
47
+ context: Schema.NonEmptyString,
48
+ state: Schema.String,
49
+ description: Schema.NullOr(Schema.String),
50
+ })),
51
+ });
52
+ const FAILED_CONCLUSIONS = new Set([
53
+ "failure",
54
+ "timed_out",
55
+ "cancelled",
56
+ "action_required",
57
+ "startup_failure",
58
+ "stale",
59
+ ]);
60
+ /** Reads aggregate CI and failure diagnostics without starting an agent. */
61
+ export class GitHubChecks extends Context.Service()("@usine/github/GitHubChecks") {
62
+ static layer = Layer.effect(GitHubChecks, Effect.gen(function* () {
63
+ const app = yield* GitHubApp;
64
+ const http = yield* HttpClient.HttpClient;
65
+ const get = Effect.fn("GitHubChecks.get")(function* (path) {
66
+ const token = yield* app.installationToken();
67
+ const response = yield* http
68
+ .execute(HttpClientRequest.get(`${API_ROOT}/${path}`).pipe(authorized(token.value)))
69
+ .pipe(Effect.mapError((error) => transportError("read-ci-checks", error)));
70
+ if (response.status !== 200)
71
+ return yield* statusError("read-ci-checks", response, yield* Clock.currentTimeMillis);
72
+ return response;
73
+ });
74
+ return {
75
+ snapshot: Effect.fn("GitHubChecks.snapshot")(function* (repository, item) {
76
+ yield* Effect.annotateCurrentSpan({ repository, item });
77
+ const { owner, name } = splitRepositoryName(repository);
78
+ const result = yield* queryGraphql(http, yield* app.installationToken(), "read-ci-checks", HEAD_QUERY, { owner, name, number: item }, Head);
79
+ const pr = result.repository?.pullRequest;
80
+ if (pr === undefined || pr === null)
81
+ return yield* invalidResponse("read-ci-checks", "The pull request awaiting CI is unavailable");
82
+ const state = pr.statusCheckRollup?.state;
83
+ return new CheckSnapshot({
84
+ head: pr.headRefOid,
85
+ state: state === "SUCCESS"
86
+ ? "success"
87
+ : state === "FAILURE" || state === "ERROR"
88
+ ? "failure"
89
+ : "pending",
90
+ });
91
+ }),
92
+ failures: Effect.fn("GitHubChecks.failures")(function* (repository, head) {
93
+ yield* Effect.annotateCurrentSpan({ repository, head });
94
+ const { owner, name } = splitRepositoryName(repository);
95
+ const prefix = `repos/${encodeURIComponent(owner)}/${encodeURIComponent(name)}`;
96
+ const failed = [];
97
+ for (let page = 1; page <= 10; page++) {
98
+ const response = yield* get(`${prefix}/commits/${head}/check-runs?per_page=100&filter=latest&page=${page}`);
99
+ const checks = yield* HttpClientResponse.schemaBodyJson(Checks)(response).pipe(Effect.mapError((error) => invalidResponse("read-ci-checks", error.message)));
100
+ failed.push(...checks.check_runs.filter(({ conclusion }) => conclusion !== null && FAILED_CONCLUSIONS.has(conclusion)));
101
+ if (page * 100 >= checks.total_count)
102
+ break;
103
+ }
104
+ const excerpts = [];
105
+ for (const check of failed.slice(0, 4)) {
106
+ const job = check.details_url?.match(/\/actions\/runs\/\d+\/job\/(\d+)(?:\?|$)/u)?.[1];
107
+ const log = job === undefined
108
+ ? Effect.succeed(check.output.text ?? check.output.summary ?? "")
109
+ : get(`${prefix}/actions/jobs/${job}/logs`).pipe(Effect.flatMap((response) => response.text.pipe(Effect.mapError((error) => invalidResponse("read-ci-checks", error.message)))));
110
+ const output = yield* log.pipe(Effect.catch((error) => error._tag === "GitHubRateLimitError"
111
+ ? Effect.fail(error)
112
+ : Effect.logWarning("CI job log unavailable; using the check output", {
113
+ repository,
114
+ head,
115
+ job: check.name,
116
+ errorTag: error._tag,
117
+ }).pipe(Effect.as(check.output.text ?? check.output.summary ?? error.message))));
118
+ excerpts.push(`${check.name}\n${output.slice(-2800)}`);
119
+ }
120
+ if (failed.length === 0) {
121
+ const response = yield* get(`${prefix}/commits/${head}/status?per_page=100`);
122
+ const statuses = yield* HttpClientResponse.schemaBodyJson(Statuses)(response).pipe(Effect.mapError((error) => invalidResponse("read-ci-checks", error.message)));
123
+ const failures = statuses.statuses.filter(({ state }) => state === "failure" || state === "error");
124
+ return new CheckFailureEvidence({
125
+ jobs: failures.map(({ context }) => context),
126
+ excerpt: failures
127
+ .slice(0, 4)
128
+ .map(({ context, description }) => `${context}\n${description ?? ""}`.slice(-2900))
129
+ .join("\n\n")
130
+ .slice(-12000),
131
+ });
132
+ }
133
+ yield* Effect.logInfo("Read failed CI checks", {
134
+ repository,
135
+ head,
136
+ jobs: failed.map(({ name }) => name),
137
+ });
138
+ return new CheckFailureEvidence({
139
+ jobs: failed.map(({ name }) => name),
140
+ excerpt: excerpts.join("\n\n").slice(-12000),
141
+ });
142
+ }),
143
+ };
144
+ }));
145
+ }
146
+ //# sourceMappingURL=checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.js","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 import { Schema } from "effect";
2
2
  import { InstallationDiscoveryError } from "./installation.ts";
3
3
  import { AppPermissionError } from "./access.ts";
4
4
  /** The GitHub request that failed, used by API, rate-limit, and response errors. */
5
- export declare const GitHubOperation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "update-item-labels"]>;
5
+ export declare const GitHubOperation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "read-ci-checks", "update-item-labels"]>;
6
6
  export type GitHubOperation = typeof GitHubOperation.Type;
7
7
  declare const GitHubApiError_base: Schema.Class<GitHubApiError, Schema.TaggedStruct<"GitHubApiError", {
8
8
  /** The GitHub operation that failed. */
9
- readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "update-item-labels"]>;
9
+ readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "read-ci-checks", "update-item-labels"]>;
10
10
  /** The HTTP response status, or `None` when transport failed before a response arrived. */
11
11
  readonly status: Schema.Option<Schema.Int>;
12
12
  /** An operator-facing explanation; branch on the error tag and fields instead of matching this text. */
@@ -17,7 +17,7 @@ export declare class GitHubApiError extends GitHubApiError_base {
17
17
  }
18
18
  declare const GitHubRateLimitError_base: Schema.Class<GitHubRateLimitError, Schema.TaggedStruct<"GitHubRateLimitError", {
19
19
  /** The GitHub operation that failed. */
20
- readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "update-item-labels"]>;
20
+ readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "read-ci-checks", "update-item-labels"]>;
21
21
  /** The earliest UTC retry time derived from GitHub's retry or rate-limit headers. */
22
22
  readonly retryAt: Schema.DateTimeUtc;
23
23
  /** An operator-facing explanation; branch on the error tag and fields instead of matching this text. */
@@ -28,7 +28,7 @@ export declare class GitHubRateLimitError extends GitHubRateLimitError_base {
28
28
  }
29
29
  declare const InvalidGitHubResponseError_base: Schema.Class<InvalidGitHubResponseError, Schema.TaggedStruct<"InvalidGitHubResponseError", {
30
30
  /** The GitHub operation that failed. */
31
- readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "update-item-labels"]>;
31
+ readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "read-ci-checks", "update-item-labels"]>;
32
32
  /** An operator-facing explanation; branch on the error tag and fields instead of matching this text. */
33
33
  readonly message: Schema.NonEmptyString;
34
34
  /** The decode path, missing field, or GraphQL errors. */
@@ -39,7 +39,7 @@ export declare class InvalidGitHubResponseError extends InvalidGitHubResponseErr
39
39
  }
40
40
  declare const GitHubItemNotFoundError_base: Schema.Class<GitHubItemNotFoundError, Schema.TaggedStruct<"GitHubItemNotFoundError", {
41
41
  /** The GitHub operation that failed. */
42
- readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "update-item-labels"]>;
42
+ readonly operation: Schema.Literals<readonly ["configure-webhook", "create-repository-label", "discover-installation", "fetch-base-ref-head", "fetch-item-labels", "fetch-issue-snapshot", "fetch-item-timeline", "fetch-pull-request-snapshot", "find-missing-issues", "list-installation-repositories", "list-repository-labels", "mint-installation-token", "mint-worker-token", "poll-repository-changes", "poll-webhook-deliveries", "read-bot-account", "read-app", "read-ci-checks", "update-item-labels"]>;
43
43
  /** The issue or pull request number that the responding repository could not return. */
44
44
  readonly item: Schema.Int;
45
45
  /** An operator-facing explanation; branch on the error tag and fields instead of matching this text. */
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,oFAAoF;AACpF,eAAO,MAAM,eAAe,8cAmB1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;;IAMxD,wCAAwC;;IAExC,2FAA2F;;IAE3F,wGAAwG;;;AAR1G,gFAAgF;AAChF,qBAAa,cAAe,SAAQ,mBASlC;CAAG;;IAMH,wCAAwC;;IAExC,qFAAqF;;IAErF,wGAAwG;;;AAR1G,gEAAgE;AAChE,qBAAa,oBAAqB,SAAQ,yBASxC;CAAG;;IAMH,wCAAwC;;IAExC,wGAAwG;;IAExG,yDAAyD;;;AAR3D,mFAAmF;AACnF,qBAAa,0BAA2B,SAAQ,+BAS9C;CAAG;;IASH,wCAAwC;;IAExC,wFAAwF;;IAExF,wGAAwG;;;AAX1G;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,4BAS3C;CAAG;AAEL,iFAAiF;AACjF,eAAO,MAAM,cAAc,8KAMzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,UAAW,cAAc,KAAG,OAQ9C,CAAC"}
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,oFAAoF;AACpF,eAAO,MAAM,eAAe,geAoB1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;;IAMxD,wCAAwC;;IAExC,2FAA2F;;IAE3F,wGAAwG;;;AAR1G,gFAAgF;AAChF,qBAAa,cAAe,SAAQ,mBASlC;CAAG;;IAMH,wCAAwC;;IAExC,qFAAqF;;IAErF,wGAAwG;;;AAR1G,gEAAgE;AAChE,qBAAa,oBAAqB,SAAQ,yBASxC;CAAG;;IAMH,wCAAwC;;IAExC,wGAAwG;;IAExG,yDAAyD;;;AAR3D,mFAAmF;AACnF,qBAAa,0BAA2B,SAAQ,+BAS9C;CAAG;;IASH,wCAAwC;;IAExC,wFAAwF;;IAExF,wGAAwG;;;AAX1G;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,4BAS3C;CAAG;AAEL,iFAAiF;AACjF,eAAO,MAAM,cAAc,8KAMzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,UAAW,cAAc,KAAG,OAQ9C,CAAC"}
package/dist/error.js CHANGED
@@ -20,6 +20,7 @@ export const GitHubOperation = Schema.Literals([
20
20
  "poll-webhook-deliveries",
21
21
  "read-bot-account",
22
22
  "read-app",
23
+ "read-ci-checks",
23
24
  "update-item-labels",
24
25
  ]);
25
26
  /** A failed GitHub request, with the HTTP status if a response was received. */
package/dist/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,oFAAoF;AACpF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC7C,mBAAmB;IACnB,yBAAyB;IACzB,u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,EAAE,eAAe;IAC1B,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IACxD,wGAAwG;IACxG,OAAO,EAAE,MAAM,CAAC,cAAc;CAC/B,CAAC;CAAG;AAEL,iFAAiF;AACjF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;IACzC,0BAA0B;IAC1B,kBAAkB;IAClB,cAAc;IACd,oBAAoB;IACpB,0BAA0B;CAC3B,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAW,EAAE,CAC1D,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE;IACrB,0BAA0B,EAAE,GAAG,EAAE,CAAC,IAAI;IACtC,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI;IAC9B,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAC7B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC;IAC5F,oBAAoB,EAAE,GAAG,EAAE,CAAC,KAAK;IACjC,0BAA0B,EAAE,GAAG,EAAE,CAAC,KAAK;CACxC,CAAC,CAAC"}
package/dist/graphql.d.ts CHANGED
@@ -7,5 +7,5 @@ import type { InstallationToken } from "./installation.ts";
7
7
  * `GitHubRateLimitError` on rate limiting, and with GitHub's messages on other errors. A
8
8
  * NOT_FOUND error leaves its null field for `dataSchema` to decode.
9
9
  */
10
- export declare const queryGraphql: <S extends Schema.Codec<unknown, unknown, never, unknown>>(http: HttpClient.HttpClient, token: InstallationToken, operation: "configure-webhook" | "create-repository-label" | "discover-installation" | "fetch-base-ref-head" | "fetch-issue-snapshot" | "fetch-item-labels" | "fetch-item-timeline" | "fetch-pull-request-snapshot" | "find-missing-issues" | "list-installation-repositories" | "list-repository-labels" | "mint-installation-token" | "mint-worker-token" | "poll-repository-changes" | "poll-webhook-deliveries" | "read-app" | "read-bot-account" | "update-item-labels", query: string, variables: Readonly<Record<string, Schema.Json>>, dataSchema: S) => Effect.Effect<S["Type"], import("./error.ts").GitHubApiError | GitHubRateLimitError | import("./error.ts").InvalidGitHubResponseError, S["DecodingServices"]>;
10
+ export declare const queryGraphql: <S extends Schema.Codec<unknown, unknown, never, unknown>>(http: HttpClient.HttpClient, token: InstallationToken, operation: "configure-webhook" | "create-repository-label" | "discover-installation" | "fetch-base-ref-head" | "fetch-issue-snapshot" | "fetch-item-labels" | "fetch-item-timeline" | "fetch-pull-request-snapshot" | "find-missing-issues" | "list-installation-repositories" | "list-repository-labels" | "mint-installation-token" | "mint-worker-token" | "poll-repository-changes" | "poll-webhook-deliveries" | "read-app" | "read-bot-account" | "read-ci-checks" | "update-item-labels", query: string, variables: Readonly<Record<string, Schema.Json>>, dataSchema: S) => Effect.Effect<S["Type"], import("./error.ts").GitHubApiError | GitHubRateLimitError | import("./error.ts").InvalidGitHubResponseError, S["DecodingServices"]>;
11
11
  //# sourceMappingURL=graphql.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjE,OAAO,EAAE,KAAK,UAAU,EAAyC,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAwB,MAAM,YAAY,CAAC;AASxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAkB3D;;;;GAIG;AACH,eAAO,MAAM,YAAY,GACvB,CAAC,SAAS,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,uvBA8CxD,CAAC"}
1
+ {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjE,OAAO,EAAE,KAAK,UAAU,EAAyC,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAwB,MAAM,YAAY,CAAC;AASxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAkB3D;;;;GAIG;AACH,eAAO,MAAM,YAAY,GACvB,CAAC,SAAS,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,0wBA8CxD,CAAC"}
@@ -5,7 +5,7 @@ import { HttpClient } from "effect/http";
5
5
  import { GitHubApp } from "./github-app.ts";
6
6
  import type { GitHubAppError } from "./error.ts";
7
7
  declare const ItemLabelMutation_base: Schema.Class<ItemLabelMutation, Schema.Struct<{
8
- /** A nonempty list of unique labels to add before removing labels. */
8
+ /** Unique labels to add before removing labels. */
9
9
  readonly add: Schema.$Array<Schema.NonEmptyString>;
10
10
  /** Unique labels to remove after additions; labels already absent are ignored. */
11
11
  readonly remove: Schema.$Array<Schema.NonEmptyString>;
@@ -1 +1 @@
1
- {"version":3,"file":"item-writer.d.ts","sourceRoot":"","sources":["../src/item-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAS,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAyC,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;;IAS/C,sEAAsE;;IAE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C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,CA+E1F;CACL"}
@@ -8,8 +8,8 @@ const LabelResponse = Schema.Array(Schema.Struct({ name: Schema.NonEmptyString }
8
8
  const LabelNames = Schema.Array(Schema.NonEmptyString).check(Schema.isUnique());
9
9
  /** The labels to add and remove on one item; other labels are unchanged. */
10
10
  export class ItemLabelMutation extends Schema.Class("@usine/github/ItemLabelMutation")({
11
- /** A nonempty list of unique labels to add before removing labels. */
12
- add: LabelNames.check(Schema.isNonEmpty()),
11
+ /** Unique labels to add before removing labels. */
12
+ add: LabelNames,
13
13
  /** Unique labels to remove after additions; labels already absent are ignored. */
14
14
  remove: LabelNames,
15
15
  }) {
@@ -35,15 +35,18 @@ export class GitHubItemWriter extends Context.Service()("@usine/github/GitHubIte
35
35
  updateLabels: Effect.fn("GitHubItemWriter.updateLabels")(function* (repository, item, mutation) {
36
36
  yield* Effect.annotateCurrentSpan({ repository, item });
37
37
  const token = yield* app.installationToken();
38
- const addResponse = yield* send(HttpClientRequest.post(labelsUrl(repository, item)).pipe(HttpClientRequest.bodyJsonUnsafe({ labels: mutation.add }), authorized(token.value)));
39
- if (addResponse.status < 200 || addResponse.status >= 300) {
40
- return yield* statusError("update-item-labels", addResponse, yield* Clock.currentTimeMillis);
38
+ let applied = [];
39
+ if (mutation.add.length > 0) {
40
+ const addResponse = yield* send(HttpClientRequest.post(labelsUrl(repository, item)).pipe(HttpClientRequest.bodyJsonUnsafe({ labels: mutation.add }), authorized(token.value)));
41
+ if (addResponse.status < 200 || addResponse.status >= 300) {
42
+ return yield* statusError("update-item-labels", addResponse, yield* Clock.currentTimeMillis);
43
+ }
44
+ applied = yield* decode(addResponse);
41
45
  }
42
- let applied = yield* decode(addResponse);
43
46
  for (const label of mutation.remove) {
44
47
  const removeResponse = yield* send(HttpClientRequest.delete(labelUrl(repository, item, label)).pipe(authorized(token.value)));
45
48
  if (removeResponse.status === 404) {
46
- yield* Effect.logDebug("Lane label was already absent during Board move", {
49
+ yield* Effect.logDebug("Item label was already absent", {
47
50
  repository,
48
51
  item,
49
52
  label,
@@ -55,7 +58,7 @@ export class GitHubItemWriter extends Context.Service()("@usine/github/GitHubIte
55
58
  }
56
59
  applied = yield* decode(removeResponse);
57
60
  }
58
- yield* Effect.logInfo("GitHub Item lane labels updated from a Board move", {
61
+ yield* Effect.logInfo("GitHub item labels updated", {
59
62
  repository,
60
63
  item,
61
64
  addedLabels: mutation.add.join(", "),
@@ -1 +1 @@
1
- {"version":3,"file":"item-writer.js","sourceRoot":"","sources":["../src/item-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG/F,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AACnF,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEhF,4EAA4E;AAC5E,MAAM,OAAO,iBAAkB,SAAQ,MAAM,CAAC,KAAK,CACjD,iCAAiC,CAClC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UAAU;4BACV,IAAI;4BACJ,KAAK;yBACN,CAAC,CAAC;wBACH,SAAS;oBACX,CAAC;oBACD,IAAI,cAAc,CAAC,MAAM,GAAG,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;wBAChE,OAAO,KAAK,CAAC,CAAC,WAAW,CACvB,oBAAoB,EACpB,cAAc,EACd,KAAK,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAC/B,CAAC;oBACJ,CAAC;oBACD,OAAO,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBAC1C,CAAC;gBACD,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,4BAA4B,EAAE;oBAClD,UAAU;oBACV,IAAI;oBACJ,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;oBACpC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;oBACzC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;iBACnD,CAAC,CAAC;gBACH,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC,CAAC;SACH,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;CACL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usine/github",
3
- "version": "0.4.1-next.344.gd950835.1.1",
3
+ "version": "0.4.1-next.347.ga29a3d7.1.1",
4
4
  "description": "GitHub App authentication, installation discovery, project coverage, and scoped token minting for usine.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -38,13 +38,17 @@
38
38
  "./github-app": {
39
39
  "types": "./dist/github-app.d.ts",
40
40
  "default": "./dist/github-app.js"
41
+ },
42
+ "./checks": {
43
+ "types": "./dist/checks.d.ts",
44
+ "default": "./dist/checks.js"
41
45
  }
42
46
  },
43
47
  "publishConfig": {
44
48
  "access": "public"
45
49
  },
46
50
  "dependencies": {
47
- "@usine/core": "0.6.1-next.344.gd950835.1.1"
51
+ "@usine/core": "0.6.1-next.347.ga29a3d7.1.1"
48
52
  },
49
53
  "devDependencies": {
50
54
  "@effect/platform-node": "4.0.6",