octokit / app.js

GitHub Apps toolset for Node.js
MIT License
158 stars 34 forks source link

[FEAT] add `getInstallationUrl` method #542

Closed rpmccarter closed 5 months ago

rpmccarter commented 5 months ago

Resolves #541


Before the change?

After the change?

Pull request checklist

Does this introduce a breaking change?

Please see our docs on breaking changes to help!


Don't love how getInstallationUrl looks so similar to getInstallationOctokit but "installation" means something different. octokit/oauth-methods.js uses getWebFlowAuthorizationUrl but getWebFlowInstallationUrl seemed a little unnecessarily long

The other caveat is that the base url gets cached, so it won't update if someone updates the name of their github app while the program is running - not sure how common github app renames are

github-actions[bot] commented 5 months ago

πŸ‘‹ Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! πŸš€

gr2m commented 5 months ago

Question: how is the state argument used? Is it passed to the post installation setup URL? I've never used it ... is that documented somewhere?

rpmccarter commented 5 months ago

@gr2m yep, the state argument is preserved and passed to subsequent redirect urls (link to the docs). In my case, we request user oauth authorization during our installation step, so the state gets passed in the oauth redirect url

rpmccarter commented 5 months ago

@gr2m is there anything left to do on my side to get this merged? I'm unable to merge myself as I don't have write access

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 15.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: