Skip to content

Commit

Permalink
v12 (#232)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `sign` and `webhooks.sign` no default to `sha256` algorithm. In order to continue to use `sha1`, replace

```js
sign(secret, payload)
```

with

```js
sign({ secret, algorith: "sha1" }, payload)
```

BREAKING CHANGE: `webhooks.sign()` and `webhooks.verify()` are now asynchronous

BREAKING CHANGE: static `sign` and `verify` methods are no longer exported. Use `@octokit/webhooks-methods` package instead
  • Loading branch information
gr2m authored Apr 14, 2021
1 parent 137ac11 commit 7c48a3a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
20 changes: 13 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@octokit/oauth-app": "^3.2.0",
"@octokit/plugin-paginate-rest": "^2.6.0",
"@octokit/types": "^6.0.3",
"@octokit/webhooks": "^9.0.0-beta.3"
"@octokit/webhooks": "^9.0.0"
},
"devDependencies": {
"@pika/pack": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion test/readme-examples.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ describe("README examples", () => {
headers: {
"x-github-event": "issues",
"x-github-delivery": "event-id-123",
"x-hub-signature-256": app.webhooks.sign(data),
"x-hub-signature-256": await app.webhooks.sign(data),
},
data,
}).catch(console.error);
Expand Down

0 comments on commit 7c48a3a

Please sign in to comment.