Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(README): getInstallationOctokit() doesn't need destructuring #2257

Merged
merged 1 commit into from Jul 17, 2022

Conversation

gimenete
Copy link
Contributor

@gimenete gimenete commented Jul 17, 2022

Hey ocktokit team!

I've been playing around with consuming webhooks from a Next.js app so I'm not using probot and I need to create octokit instances manually. I believe this part of the docs is not correct according to the types I'm getting and also taking a look to the source code here https://github.com/octokit/app.js/blob/master/src/get-installation-octokit.ts#L19

Thanks!


View rendered README.md

@octokit-js-project-board octokit-js-project-board bot added this to Inbox in JS Jul 17, 2022
@wolfy1339 wolfy1339 added Type: Bug Something isn't working as documented Type: Documentation Improvements or additions to documentation labels Jul 17, 2022
@octokit-js-project-board octokit-js-project-board bot moved this from Inbox to Bugs in JS Jul 17, 2022
gr2m
gr2m approved these changes Jul 17, 2022
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@gr2m gr2m changed the title Fix README: getInstallationOctokit() doesn't need destructuring fix(README): getInstallationOctokit() doesn't need destructuring Jul 17, 2022
@gr2m gr2m merged commit 989b291 into octokit:main Jul 17, 2022
6 checks passed
JS automation moved this from Bugs to Done Jul 17, 2022
@github-actions
Copy link

🎉 This PR is included in version 2.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gr2m
Copy link
Contributor

gr2m commented Jul 17, 2022

I'm not using probot and I need to create octokit instances manually

You can also use the App constructor:
https://github.com/octokit/octokit.js#app-client

We also export createNodeMiddleware which is compatible with Vercel functions:
https://github.com/octokit/octokit.js#webhooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented Type: Documentation Improvements or additions to documentation
Projects
JS
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants