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

feat: add github service #377

Merged
merged 26 commits into from
Feb 11, 2021
Merged

Conversation

jugaltheshah
Copy link
Contributor

@jugaltheshah jugaltheshah commented Jan 21, 2021

Issue 361 batch 1:

This PR starts work towards #361 by adding a Github service. Idea here is to abstract the calls to Github behind something so that the underlying requests then can be changed out without doing too much work on the adapter. It will also allow us the flexibility to cleanly mix-and-match REST & GraphQL calls as needed.

Note

While all Github (more specifically, octokit) calls were moved to the new service, the abstraction is a bit leaky in that some adapter calls are still tied directly to Github responses. While not ideal, I think this is adequate for now as this will be changing shortly with phase 2 and beyond. Overall, I believe this PR meets its objective of making the next phase(s) easier.

@jugaltheshah jugaltheshah marked this pull request as draft January 21, 2021 01:53
@aorinevo aorinevo self-assigned this Jan 21, 2021
@aorinevo aorinevo self-requested a review January 21, 2021 02:17
@jugaltheshah jugaltheshah marked this pull request as ready for review January 30, 2021 17:19
search_type: 'code',
search_query: 'org:testOrg path:/ filename:package.json in:path'
};

const result = await service.getActiveReposForSearchTypeAndQuery(criteria);
const criteria2 = {
search_query: 'org:testOrg path:/ filename:package.json in:path'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should one of these include a property search_type set to "" or some falsey value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense.

@aorinevo
Copy link
Collaborator

PR looks good to me. Agree that this PR meets the objective of phase 1.

@aorinevo
Copy link
Collaborator

@jugaltheshah, just need conflicts resolved before merging.

@aorinevo aorinevo added the enhancement New feature or request label Feb 10, 2021
@aorinevo
Copy link
Collaborator

Did one last round of local testing. Looks good.

@aorinevo aorinevo merged commit 7bbd54a into NerdWalletOSS:master Feb 11, 2021
aorinevo pushed a commit that referenced this pull request Feb 11, 2021
# [1.14.0](v1.13.1...v1.14.0) (2021-02-11)

### Features

* add github service ([#377](#377)) ([7bbd54a](7bbd54a))
@aorinevo
Copy link
Collaborator

🎉 This PR is included in version 1.14.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants