You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please select the environment(s) that are relevant to your bug report
TypeScript
Enterprise
Browsers
Node
Deno
Version
octokit@1.7.1
What happened?
I copied the code from the octokit.js readme.md wanting to test github webhooks. In the example code oauth.clientId and oauth.clientSecret are not set. Also in the octokit/app.js Constructor oauth.clientId and oauth.clientSecret are not required.
When I try to run my code, I get the error:
throw new Error("[@octokit/app] oauth.clientId / oauth.clientSecret options are not set");
I have to say though, in octokit/app.js Usage oauth.clientId, oauth.clientSecret are provided in the code example.
Is this a documentation error or a code bug?
Would you be interested in contributing a fix?
yes
The text was updated successfully, but these errors were encountered:
I agree that both the webhooks config and the oauth config should be optional. I think I tried that when implementing this initially, I think the types just got so complicated that I decided not to, at least not initially.
You should be able to just set webhooks.secret or oauth.{clientId,clientSecret} to empty strings: ""
I'm not sure exactly what the difference is but there's another import of createNodeMiddleware that doesn't require oauth to be passed. It's used in these docs and this example repo.
import { createNodeMiddleware } from '@octokit/webhooks';
I was unable to get the octokit import to work and was getting 504 responses. But was successful with the @octokit/webhooks import.
@octokit/webhooks is the underlying library for only webhooks: https://github.com/octokit/webhooks.js. That's why it does not require OAuth settings. It also doesn't set an octokit instance on the context of event handlers
Please avoid duplicates
Reproducible test case
Please select the environment(s) that are relevant to your bug report
Version
octokit@1.7.1
What happened?
I copied the code from the octokit.js readme.md wanting to test github webhooks. In the example code oauth.clientId and oauth.clientSecret are not set. Also in the octokit/app.js Constructor oauth.clientId and oauth.clientSecret are not required.
When I try to run my code, I get the error:
throw new Error("[@octokit/app] oauth.clientId / oauth.clientSecret options are not set");
I have to say though, in octokit/app.js Usage oauth.clientId, oauth.clientSecret are provided in the code example.
Is this a documentation error or a code bug?
Would you be interested in contributing a fix?
The text was updated successfully, but these errors were encountered: