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

Refactor [github] initialization #1861

Merged
merged 5 commits into from
Aug 9, 2018
Merged

Refactor [github] initialization #1861

merged 5 commits into from
Aug 9, 2018

Conversation

paulmelnikow
Copy link
Member

@paulmelnikow paulmelnikow commented Aug 8, 2018

This creates a new convenience class which consolidates all the Github initialization. It supports dependency injection and facilitates refactoring the persistence along the lines of #1205.

Also ref #1848

This creates a new convenience class which consolidates all the Github initialization. It supports dependency injection and facilitates refactoring the persistence along the lines of #1205.
@shields-ci
Copy link

Warnings
⚠️

This PR modified the server but none of the service tests. That's okay so long as it's refactoring existing code.

⚠️

This PR modified helper functions in lib/ but not accompanying tests. That's okay so long as it's refactoring existing code.

Messages
📖

✨ Thanks for your contribution to Shields, @paulmelnikow!

Generated by 🚫 dangerJS

@paulmelnikow paulmelnikow added the core Server, BaseService, GitHub auth, Shared helpers label Aug 8, 2018
@paulmelnikow paulmelnikow requested a review from PyvesB August 8, 2018 02:36
Copy link
Member

@PyvesB PyvesB left a comment

Choose a reason for hiding this comment

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

Reviewed, the implementation makes sense. 👍

Should we add a few tests to github-constellation.js, to check what's going on in the initialize and stop functions?

@paulmelnikow
Copy link
Member Author

Should we add a few tests to github-constellation.js, to check what's going on in the initialize and stop functions?

I’m not sure it makes sense to add any. All they could really do is mock all the method calls, and if we do that we still don’t know the code actually works. IMO it’s better to test at a lower level, with specs for persistence, the token logic, and maybe the acceptor routes, and at a higher level, to depend on the service tests making sure we can hit github.

Copy link
Member

@PyvesB PyvesB left a comment

Choose a reason for hiding this comment

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

Fair enough, let's get this merged then!

@paulmelnikow
Copy link
Member Author

Thanks!

@paulmelnikow paulmelnikow merged commit c11d97a into badges:master Aug 9, 2018
@shields-deployment
Copy link

This pull request was merged to master branch. Now this change is waiting for deployment.
Deploys usually happen every few weeks. After deployment changes are copied to gh-pages branch.

This badge displays deployment status:

@paulmelnikow paulmelnikow deleted the github-constellation branch August 9, 2018 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Server, BaseService, GitHub auth, Shared helpers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants