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

App installation finders #1052

Merged
merged 11 commits into from
Aug 30, 2018
Merged

App installation finders #1052

merged 11 commits into from
Aug 30, 2018

Conversation

joshpuetz
Copy link
Contributor

@joshpuetz
Copy link
Contributor Author

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).

@joshpuetz
Copy link
Contributor Author

joshpuetz commented Aug 16, 2018

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

Copy link

@krames krames left a comment

Choose a reason for hiding this comment

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

Nicely implemented! 👍

@joshpuetz
Copy link
Contributor Author

Pinging @tarebyte and @kytrinyx for review, thanks!

Copy link
Member

@tarebyte tarebyte left a 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!

# @return [Sawyer::Resource] Installation information
def find_organization_installation(organization, options = {})
opts = ensure_api_media_type(:integrations, options)
get "orgs/#{organization}/installation", opts
Copy link
Member

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

# @return [Sawyer::Resource] Installation information
def find_repository_installation(repo, options = {})
opts = ensure_api_media_type(:integrations, options)
get "repos/#{repo}/installation", opts
Copy link
Member

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

# @return [Sawyer::Resource] Installation information
def find_user_installation(user, options = {})
opts = ensure_api_media_type(:integrations, options)
get "users/#{user}/installation", opts
Copy link
Member

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

@joshpuetz
Copy link
Contributor Author

Sensible suggestions, updated. Thank @tarebyte!

@joshpuetz
Copy link
Contributor Author

I think this is ready to merge, thanks @tarebyte!

@tarebyte tarebyte merged commit dfe50a3 into octokit:master Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants