-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
App installation finders #1052
App installation finders #1052
Conversation
I'm not sure what's going on with the Travis build for Ruby 2: looks like it's impacting another recent PR (#1050, https://travis-ci.org/octokit/octokit.rb/jobs/416504205). |
Ah, looks like Public Suffix (https://github.com/weppos/publicsuffix-ruby) dropped support for Rubies < 2.1 with version 3.0, referenced in this PR #948 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely implemented! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments, thanks for tackling this @joshpuetz!
lib/octokit/client/apps.rb
Outdated
# @return [Sawyer::Resource] Installation information | ||
def find_organization_installation(organization, options = {}) | ||
opts = ensure_api_media_type(:integrations, options) | ||
get "orgs/#{organization}/installation", opts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the Organization.path
helper here?
get "#{Organization.path(organization)}/installation", opts
lib/octokit/client/apps.rb
Outdated
# @return [Sawyer::Resource] Installation information | ||
def find_repository_installation(repo, options = {}) | ||
opts = ensure_api_media_type(:integrations, options) | ||
get "repos/#{repo}/installation", opts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the Repository.path
helper here?
get "#{Repository.path(repo)}/installation", opts
lib/octokit/client/apps.rb
Outdated
# @return [Sawyer::Resource] Installation information | ||
def find_user_installation(user, options = {}) | ||
opts = ensure_api_media_type(:integrations, options) | ||
get "users/#{user}/installation", opts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the User.path
helper here?
get "#{User.path(user)}/installation", opts
Sensible suggestions, updated. Thank @tarebyte! |
…t.rb into app-installation-finders
I think this is ready to merge, thanks @tarebyte! |
Adds support for the following installation finders from the Github Apps preview API to Octokit: