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

Add support to prerelease Integrations API #871

Merged
merged 14 commits into from
Mar 15, 2017
Merged

Conversation

tarebyte
Copy link
Member

@tarebyte tarebyte commented Mar 6, 2017

This adds the early access Integrations API (https://developer.github.com/v3/integrations/) to Octokit.

Closes #832

/cc @keavy for Integration 👀

@tarebyte tarebyte requested a review from joeyw March 6, 2017 22:49
@coveralls
Copy link

coveralls commented Mar 6, 2017

Coverage Status

Coverage decreased (-0.04%) to 99.259% when pulling 73877ab on tarebyte/integrations into 8404007 on master.

@coveralls
Copy link

coveralls commented Mar 6, 2017

Coverage Status

Coverage decreased (-0.04%) to 99.259% when pulling 7f45445 on tarebyte/integrations into 8404007 on master.

@coveralls
Copy link

coveralls commented Mar 7, 2017

Coverage Status

Coverage decreased (-0.04%) to 99.259% when pulling 648a571 on tarebyte/integrations into 8404007 on master.

#
# @return [<Sawyer::Resource>] An installation token
def create_integration_installation_access_token(installation, options = {})
options = ensure_api_media_type(:integrations, options)
Copy link
Contributor

Choose a reason for hiding this comment

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

As a pattern across the library, we avoid mutating the parameters. In other methods we usually use opts as the variable for options after mutating them. In this case it would unlikely cause issues, but would bring everything into parity to follow the same pattern.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in e0d5884

private

def new_jwt_token
private_pem = File.read(ENV['OCTOKIT_TEST_INTEGRATION_PEM_KEY'])
Copy link
Contributor

Choose a reason for hiding this comment

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

This is throwing a nil error when the env variable is not defined. This could be changed to follow the rest of the library, using fetch inside a helper method in the spec helper. The fixture used for the CI could be used for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 7a5940c

@joeyw
Copy link
Contributor

joeyw commented Mar 15, 2017

@tarebyte Aside from my nitpicking, this looks good after a quick one-over. You seem to have a firm grasp of the vcr placeholders too and how to exploit them gainfully, 👍

@coveralls
Copy link

coveralls commented Mar 15, 2017

Coverage Status

Coverage decreased (-0.04%) to 99.26% when pulling 7a5940c on tarebyte/integrations into 8404007 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 99.26% when pulling 7a5940c on tarebyte/integrations into 8404007 on master.

@tarebyte tarebyte merged commit d9b2ed7 into master Mar 15, 2017
@tarebyte tarebyte deleted the tarebyte/integrations branch March 15, 2017 13:13
@ceslami
Copy link

ceslami commented Mar 18, 2017

Thanks @tarebyte!

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.

4 participants