@sanoma-ai/connector-github 0.4.5 → 0.5.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 +2 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -54,6 +54,8 @@ Every call is plain `fetch` with GitHub's media type and `X-GitHub-Api-Version:
|
|
|
54
54
|
|
|
55
55
|
**Webhooks:** `webhook(request, { secrets })` verifies `X-Hub-Signature-256` (HMAC SHA-256 of the body's bytes under `SANOMA_GITHUB_WEBHOOK_SECRET`, compared in constant time) and throws a `DriverError` (`bad_signature`, status 401) for a missing or wrong one, or `no_webhook_secret` when the secret is not stored. A `push` to a branch is `{ kind: "pushed", repo, branch, head }`; a `pull_request` `closed` is `{ kind: "closed", repo, branch, number, merged, sha }`, `sha` the merge commit when merged; any other event or action, a tag's push, a deleted branch and a fork's pull request are `[]`. A JSON body and a form-encoded `payload` are both read.
|
|
56
56
|
|
|
57
|
+
**A change on GitHub** ([changes](https://github.com/Sanoma-AI/sanoma/blob/main/packages/workflows/README.md#changes)): **Send for review** pushes the draft's branch `draft/<id>` and opens its pull request into `main`, titled as the change; the head's `sanoma` status says what Publish waits for and links the change's page in the app: pending, or failure while the checks fail or the policy denies. **Publish** sets it to success, squash-merges the pull request at that head as `<title> (#<number>)` and deletes the branch; **Reject** closes the pull request. Nothing else is written to the pull request: no comment and no card. A ruleset on `main` requiring a pull request and the `sanoma` status check is what makes a change outside Sanoma impossible; the Permissions page's line under the grid is `enforcement("main")`, and on a private repository on GitHub Free it reads as enforcing neither, with GitHub's reason. GitHub's deliveries reach an instance at `https://<host>/webhooks/github` (the App **Create GitHub App** makes subscribes to `push` and `pull_request`, with commit statuses), so a push to the branch or a pull request merged or closed on GitHub reaches the change, and a push to `main` applies the declared hosts; a laptop has no public address and gets none.
|
|
58
|
+
|
|
57
59
|
`owners({ secrets })` lists the accounts the App is installed on (`GET /app/installations`, signed as the App), what going live offers besides the token's own.
|
|
58
60
|
|
|
59
61
|
`@sanoma-ai/connector-github/remote` exports `githubRemote`, `githubToken`, `appJwt` and `GITHUB_APP_SECRETS`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanoma-ai/connector-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "GitHub resources (repositories, branch protection, team membership) for Sanoma, read through the OpenTofu provider",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"connector",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@sanoma-ai/bridge": "0.4.
|
|
59
|
-
"@sanoma-ai/workflows": "0.
|
|
58
|
+
"@sanoma-ai/bridge": "0.4.6",
|
|
59
|
+
"@sanoma-ai/workflows": "0.8.0",
|
|
60
60
|
"zod": "^4.6.5"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@sanoma-ai/bridge": "^0.4.
|
|
64
|
-
"@sanoma-ai/workflows": "^0.
|
|
63
|
+
"@sanoma-ai/bridge": "^0.4.6",
|
|
64
|
+
"@sanoma-ai/workflows": "^0.8.0",
|
|
65
65
|
"zod": "^4"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|