@sanoma-ai/connector-github 0.1.0 → 0.4.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.
- package/README.md +12 -10
- package/dist/connector.js +11 -1
- package/dist/connector.js.map +1 -1
- package/dist/driver.d.ts +3 -2
- package/dist/driver.js +81 -8
- package/dist/driver.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -8,15 +8,17 @@ GitHub resources for [`@sanoma-ai/workflows`](https://www.npmjs.com/package/@san
|
|
|
8
8
|
npm install @sanoma-ai/connector-github
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Each resource type has two operations, both effect `read` and idempotent, with the
|
|
11
|
+
Each resource type has two operations, both effect `read` and idempotent, with the id as the policy's `target`; a repository is writable, so it has the change operations too, which only apply calls:
|
|
12
12
|
|
|
13
|
-
| Type | Operations
|
|
14
|
-
| ------------------- |
|
|
15
|
-
| `repository` | `github.repository.read`,
|
|
16
|
-
| `branch_protection` | `github.branch_protection.read`, `github.branch_protection.import`
|
|
17
|
-
| `team_membership` | `github.team_membership.read`, `github.team_membership.import`
|
|
13
|
+
| Type | Operations | Identity | Binding id |
|
|
14
|
+
| ------------------- | --------------------------------------------------------------------------------- | ----------------------- | --------------------------- |
|
|
15
|
+
| `repository` | `github.repository.read`, `.import`, and `.plan`, `.create`, `.update`, `.delete` | `name` | `node_id` |
|
|
16
|
+
| `branch_protection` | `github.branch_protection.read`, `github.branch_protection.import` | `repository_id:pattern` | `id` (its node id, `BPR_…`) |
|
|
17
|
+
| `team_membership` | `github.team_membership.read`, `github.team_membership.import` | `team_id:username` | `id` (`team_id:username`) |
|
|
18
18
|
|
|
19
|
-
`import` takes `{ id }
|
|
19
|
+
`import` takes `{ id }`, an identity or a binding id (what the [lockfile](https://github.com/Sanoma-AI/sanoma/blob/main/packages/workflows/README.md#bindings) keeps, which a rename does not change), and returns the object's `state`. The provider imports a repository by its name and a rule by `repository:pattern`, so the driver resolves a node id (`R_…`, `BPR_…`) to those first, with one GraphQL `node(id)` query, and refuses one in a repository of another owner than `GITHUB_OWNER` (default: the token's user); a node id GitHub does not know is gone. The fake finds an object by its binding id too, with no query; `read` takes a state an earlier call returned (`{ id, state, handle }`), or just `{ id }`, and returns its fresh `state`, or `gone: true` when it no longer exists. See [Resources](https://github.com/Sanoma-AI/sanoma/blob/main/packages/workflows/README.md#resources).
|
|
20
|
+
|
|
21
|
+
A repository's `create`, `update` and `delete` plan and apply through the provider (see [`@sanoma-ai/bridge`](https://github.com/Sanoma-AI/sanoma/blob/main/packages/bridge/README.md#connectors-for-opentofu-providers)); a create's `id` is the new repository's node id. Their tests replay synthetic replies of an empty repository (`sanoma-apply-test*` in `@sanoma-ai/bridge`'s `testdata/replies`) until they are recorded in a test organization.
|
|
20
22
|
|
|
21
23
|
A data file declares resources with the constructors in `@sanoma-ai/connector-github/resources`:
|
|
22
24
|
|
|
@@ -35,7 +37,7 @@ The logo is GitHub's mark from [Octicons](https://primer.style/octicons/) (`mark
|
|
|
35
37
|
|
|
36
38
|
## Resource types
|
|
37
39
|
|
|
38
|
-
`src/resources.gen.ts` is generated from the provider's schema by `pnpm generate`, which runs [`@sanoma-ai/bridge/tfschema`](https://github.com/Sanoma-AI/sanoma/blob/main/packages/bridge/src/tfschema/AGENTS.md) with `src/resources.config.ts`: the provider (its release, sha256 and recorded schema are `@sanoma-ai/bridge`'s pin and fixture), the types to generate, and the attributes whose change replaces the object (ForceNew in the provider's source, which the schema does not carry). It is checked in and never edited by hand; `pnpm generate` on a clean tree changes nothing. `src/connector.ts` is the rest, one `tfConnector` record from [`@sanoma-ai/bridge/connector`](https://github.com/Sanoma-AI/sanoma/blob/main/packages/bridge/README.md#connectors-for-opentofu-providers): each type's title, identity and `
|
|
40
|
+
`src/resources.gen.ts` is generated from the provider's schema by `pnpm generate`, which runs [`@sanoma-ai/bridge/tfschema`](https://github.com/Sanoma-AI/sanoma/blob/main/packages/bridge/src/tfschema/AGENTS.md) with `src/resources.config.ts`: the provider (its release, sha256 and recorded schema are `@sanoma-ai/bridge`'s pin and fixture), the types to generate, and the attributes whose change replaces the object (ForceNew in the provider's source, which the schema does not carry). It is checked in and never edited by hand; `pnpm generate` on a clean tree changes nothing. `src/connector.ts` is the rest, one `tfConnector` record from [`@sanoma-ai/bridge/connector`](https://github.com/Sanoma-AI/sanoma/blob/main/packages/bridge/README.md#connectors-for-opentofu-providers): each type's title, identity, `find` and `bindingId`, the field that names another resource (`branch_protection.repository_id`), and GitHub's title, logo and package. The connector, the constructors, the driver and the fake all derive from it.
|
|
39
41
|
|
|
40
42
|
Attributes that are computed and not optional (`html_url`, `repo_id`) are vendor-owned: never drift, and a data file may not declare them. Those the provider marks computed and optional (`etag`, `topics`, `visibility`, `default_branch`) are yours to set, and compared only when declared.
|
|
41
43
|
|
|
@@ -51,7 +53,7 @@ export default defineConfig({ workflows, connectors: [github], policy });
|
|
|
51
53
|
|
|
52
54
|
`./driver` (`githubDriver`; `githubDriver({ bridge })` reads through a bridge of your own) and `./fake` (`fakeGithub`) are internal entries, for tests.
|
|
53
55
|
|
|
54
|
-
Without `bridge`, it reads through the process's `defaultBridge()` from `@sanoma-ai/bridge`, started on the first call
|
|
56
|
+
Without `bridge`, it reads through the process's `defaultBridge()` from `@sanoma-ai/bridge`, started on the first call with the binary `startBridge` finds; `bridge` is any `ProviderClient` (a `Bridge` from `startBridge()`, or `stateBridge` in tests). It configures the provider on the first call with `{ owner, token }` from the environment, and again when either changes (closing it first: the bridge refuses a second config), when the provider has exited, or when the bridge has forgotten it (`ensureConfigured`). `read` without a state (or with one that has no `id`) imports, which reads the object too. States leave the driver in the resource's shape, with sensitive attributes set to `null`; the provider's private data and state version travel in the opaque `handle`.
|
|
55
57
|
|
|
56
58
|
### Environment
|
|
57
59
|
|
|
@@ -62,7 +64,7 @@ Read on every call, never when the config loads:
|
|
|
62
64
|
| `GITHUB_TOKEN` | A GitHub token that can read the repositories, rules and teams named. |
|
|
63
65
|
| `GITHUB_OWNER` | Optional: the organization or user whose repositories the data files describe. Default: the token's own user. |
|
|
64
66
|
|
|
65
|
-
When the token is unset, a call fails, not retryable, naming it; the worker starts regardless, and the app's connector page shows and sets both. The bridge passes the token and the owner to the provider through its config only, never through the provider's environment. The default bridge's binary
|
|
67
|
+
When the token is unset, a call fails, not retryable, naming it; the worker starts regardless, and the app's connector page shows and sets both. The bridge passes the token and the owner to the provider through its config only, never through the provider's environment. The default bridge's binary comes with `@sanoma-ai/bridge` or from `SANOMA_BRIDGE_BIN` (see [the bridge](https://www.npmjs.com/package/@sanoma-ai/bridge#the-binary)), not a credential of the connector.
|
|
66
68
|
|
|
67
69
|
### Errors and retries
|
|
68
70
|
|
package/dist/connector.js
CHANGED
|
@@ -14,7 +14,17 @@ export const githubTf = tfConnector({
|
|
|
14
14
|
vendor: "github",
|
|
15
15
|
provider,
|
|
16
16
|
types: {
|
|
17
|
-
|
|
17
|
+
// Bound by its node id, which a rename keeps, as a rule is by its own (its `id`); the driver
|
|
18
|
+
// resolves either to what the provider imports by.
|
|
19
|
+
repository: {
|
|
20
|
+
tf: github_repository,
|
|
21
|
+
title: "Repository",
|
|
22
|
+
identity: "name",
|
|
23
|
+
find: ({ name }) => name,
|
|
24
|
+
bindingId: ({ node_id }) => String(node_id),
|
|
25
|
+
// Apply creates, changes and deletes repositories.
|
|
26
|
+
writable: true,
|
|
27
|
+
},
|
|
18
28
|
branch_protection: {
|
|
19
29
|
tf: github_branch_protection,
|
|
20
30
|
title: "Branch protection rule",
|
package/dist/connector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.js","sourceRoot":"","sources":["../src/connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnH;;;GAGG;AACH,MAAM,IAAI,GA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B;YAC1B,KAAK,EAAE,iBAAiB;YACxB,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,GAAG,OAAO,IAAI,QAAQ,EAAE;SAC1D;KACF;IACD,6FAA6F;IAC7F,UAAU,EAAE,EAAE,iBAAiB,EAAE,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE;IAC5G,8FAA8F;IAC9F,oGAAoG;IACpG,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,IAAI,KAAK,WAAW;QACtB,CAAC,CAAC,CAAC,IAAI,KAAK,qBAAqB,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC1G,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE;QACrD,OAAO,EAAE,6BAA6B;QACtC,QAAQ,EAAE,wEAAwE;KACnF;CACF,CAAC,CAAC"}
|
package/dist/driver.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
export interface GithubDriverOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The provider bridge to read through. Default: the process's `defaultBridge()`, started on the
|
|
6
|
-
* first call
|
|
6
|
+
* first call (`startBridge`'s binary). One per tenant: it holds the token once configured.
|
|
7
7
|
*/
|
|
8
8
|
bridge?: ProviderClient;
|
|
9
9
|
}
|
|
@@ -11,7 +11,8 @@ export interface GithubDriverOptions {
|
|
|
11
11
|
* Reads GitHub resources through the `integrations/github` OpenTofu provider on `bridge` (the
|
|
12
12
|
* default bridge when none is given), with the token in `GITHUB_TOKEN` and the owner in
|
|
13
13
|
* `GITHUB_OWNER`, read on every call. The provider is configured on the first call, and again
|
|
14
|
-
* when the token or the owner changes or the provider has exited.
|
|
14
|
+
* when the token or the owner changes or the provider has exited. A repository's or a rule's
|
|
15
|
+
* import takes its node id (its binding id) too, resolved first (`importIdOf`).
|
|
15
16
|
*/
|
|
16
17
|
export declare function githubDriver({ bridge }?: GithubDriverOptions): Readonly<{
|
|
17
18
|
vendor: string;
|
package/dist/driver.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultBridge } from "@sanoma-ai/bridge";
|
|
2
|
-
import { DriverError } from "@sanoma-ai/workflows";
|
|
2
|
+
import { DriverError, retryableStatus } from "@sanoma-ai/workflows";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { githubTf } from "./connector.js";
|
|
5
5
|
/** The environment variables the driver reads, on every call. */
|
|
@@ -14,19 +14,92 @@ const env = z.object({
|
|
|
14
14
|
.optional()
|
|
15
15
|
.describe("the organization or user whose repositories the data files describe; default: the token's own user"),
|
|
16
16
|
});
|
|
17
|
+
/**
|
|
18
|
+
* The node ids a binding keeps that the provider cannot import by, by type: a repository's (`R_kgD…`, not `R_` alone, which begins names too,
|
|
19
|
+
* or the legacy base64 of `010:Repository…`) and a branch protection rule's (`BPR_…`).
|
|
20
|
+
*/
|
|
21
|
+
const NODE_IDS = {
|
|
22
|
+
repository: /^(R_kgD[\w-]+|MDEwOlJlcG9zaXRvcnk[\w+/=]+)$/,
|
|
23
|
+
branch_protection: /^BPR_[\w-]+$/,
|
|
24
|
+
};
|
|
25
|
+
const NODE_QUERY = `query($id: ID!) {
|
|
26
|
+
node(id: $id) {
|
|
27
|
+
... on Repository { name owner { login } }
|
|
28
|
+
... on BranchProtectionRule { pattern repository { name owner { login } } }
|
|
29
|
+
}
|
|
30
|
+
viewer { login }
|
|
31
|
+
}`;
|
|
32
|
+
const Repo = z.object({ name: z.string(), owner: z.object({ login: z.string() }) });
|
|
33
|
+
const NodeReply = z.object({
|
|
34
|
+
data: z
|
|
35
|
+
.object({
|
|
36
|
+
node: Repo.partial().extend({ pattern: z.string().optional(), repository: Repo.optional() }).nullable(),
|
|
37
|
+
viewer: z.object({ login: z.string() }),
|
|
38
|
+
})
|
|
39
|
+
.nullish(),
|
|
40
|
+
errors: z.array(z.object({ type: z.string().optional(), message: z.string() })).optional(),
|
|
41
|
+
message: z.string().optional(),
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* The provider's import id for a node id, from one GraphQL `node(id)` query: a repository's
|
|
45
|
+
* name, a rule's `repository:pattern`. Refused when the repository is not the provider's owner's
|
|
46
|
+
* (`GITHUB_OWNER`, else the token's user). The id itself when GitHub has no such node, so the
|
|
47
|
+
* import says it is gone.
|
|
48
|
+
*/
|
|
49
|
+
async function importIdOf(id, { token, owner }) {
|
|
50
|
+
let status;
|
|
51
|
+
let json;
|
|
52
|
+
try {
|
|
53
|
+
const res = await fetch("https://api.github.com/graphql", {
|
|
54
|
+
method: "POST",
|
|
55
|
+
headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },
|
|
56
|
+
body: JSON.stringify({ query: NODE_QUERY, variables: { id } }),
|
|
57
|
+
signal: AbortSignal.timeout(30_000),
|
|
58
|
+
});
|
|
59
|
+
status = res.status;
|
|
60
|
+
json = await res.json().catch(() => undefined);
|
|
61
|
+
}
|
|
62
|
+
catch (cause) {
|
|
63
|
+
throw new DriverError(`github: resolving the node ${id}: the request failed`, { retryable: true, cause });
|
|
64
|
+
}
|
|
65
|
+
const reply = NodeReply.safeParse(json).data;
|
|
66
|
+
// GraphQL answers an id it has no node for with a null node and a NOT_FOUND error.
|
|
67
|
+
const failed = reply?.errors?.find((e) => e.type !== "NOT_FOUND");
|
|
68
|
+
if (status !== 200 || !reply?.data || failed) {
|
|
69
|
+
throw new DriverError(`github: resolving the node ${id}: ${failed?.message ?? reply?.message ?? `HTTP ${status}`}`, {
|
|
70
|
+
retryable: retryableStatus(status) || failed?.type === "RATE_LIMITED",
|
|
71
|
+
status,
|
|
72
|
+
...(failed?.type && { vendorCode: failed.type }),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const { node, viewer } = reply.data;
|
|
76
|
+
const repo = node?.repository ?? (node?.name && node.owner ? { name: node.name, owner: node.owner } : undefined);
|
|
77
|
+
if (!repo)
|
|
78
|
+
return id;
|
|
79
|
+
const expected = owner ?? viewer.login;
|
|
80
|
+
if (repo.owner.login.toLowerCase() !== expected.toLowerCase()) {
|
|
81
|
+
throw new DriverError(`github: ${id} is in ${repo.owner.login}/${repo.name}, not a repository of ${expected}`, {
|
|
82
|
+
retryable: false,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return node?.pattern === undefined ? repo.name : `${repo.name}:${node.pattern}`;
|
|
86
|
+
}
|
|
87
|
+
/** The provider's config, from the environment, read on every call. */
|
|
88
|
+
function config() {
|
|
89
|
+
const token = process.env.GITHUB_TOKEN;
|
|
90
|
+
if (!token)
|
|
91
|
+
throw new DriverError("github: GITHUB_TOKEN is not set", { retryable: false });
|
|
92
|
+
return { owner: process.env.GITHUB_OWNER || null, token };
|
|
93
|
+
}
|
|
17
94
|
/**
|
|
18
95
|
* Reads GitHub resources through the `integrations/github` OpenTofu provider on `bridge` (the
|
|
19
96
|
* default bridge when none is given), with the token in `GITHUB_TOKEN` and the owner in
|
|
20
97
|
* `GITHUB_OWNER`, read on every call. The provider is configured on the first call, and again
|
|
21
|
-
* when the token or the owner changes or the provider has exited.
|
|
98
|
+
* when the token or the owner changes or the provider has exited. A repository's or a rule's
|
|
99
|
+
* import takes its node id (its binding id) too, resolved first (`importIdOf`).
|
|
22
100
|
*/
|
|
23
101
|
export function githubDriver({ bridge = defaultBridge() } = {}) {
|
|
24
|
-
const driver = githubTf.driver(bridge, () =>
|
|
25
|
-
const token = process.env.GITHUB_TOKEN;
|
|
26
|
-
if (!token)
|
|
27
|
-
throw new DriverError("github: GITHUB_TOKEN is not set", { retryable: false });
|
|
28
|
-
return { owner: process.env.GITHUB_OWNER || null, token };
|
|
29
|
-
});
|
|
102
|
+
const driver = githubTf.driver(bridge, config, (type, id) => NODE_IDS[type]?.test(id) ? importIdOf(id, config()) : id);
|
|
30
103
|
return Object.freeze({ ...driver, env });
|
|
31
104
|
}
|
|
32
105
|
//# sourceMappingURL=driver.js.map
|
package/dist/driver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../src/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../src/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAU1C,iEAAiE;AACjE,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,gHAAgH,CACjH;IACH,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,oGAAoG,CAAC;CAClH,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,QAAQ,GAAqC;IACjD,UAAU,EAAE,6CAA6C;IACzD,iBAAiB,EAAE,cAAc;CAClC,CAAC;AAEF,MAAM,UAAU,GAAG;;;;;;EAMjB,CAAC;AAEH,MAAM,IAAI,GAAG,CA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IAAI,EAAE,EAAE,EAAE,EAAE,CAC1D,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CACzD,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;AAC3C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanoma-ai/connector-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "GitHub resources (repositories, branch protection, team membership) for Sanoma, read through the OpenTofu provider",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"connector",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"
|
|
52
|
-
"@sanoma-ai/
|
|
53
|
-
"
|
|
51
|
+
"@sanoma-ai/bridge": "0.4.0",
|
|
52
|
+
"@sanoma-ai/workflows": "0.4.0",
|
|
53
|
+
"zod": "^4.6.5"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@sanoma-ai/bridge": "^0.
|
|
57
|
-
"@sanoma-ai/workflows": "^0.
|
|
56
|
+
"@sanoma-ai/bridge": "^0.4.0",
|
|
57
|
+
"@sanoma-ai/workflows": "^0.4.0",
|
|
58
58
|
"zod": "^4"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|