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 reactions to the RelationalView #840
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
teamdandelion
force-pushed
the
reactions-graphql
branch
3 times, most recently
from
September 14, 2018 23:05
b81be40
to
d71e1f7
Compare
teamdandelion
force-pushed
the
reactions-relationalview
branch
from
September 14, 2018 23:06
49e6398
to
2eeb45e
Compare
This commit updates the GitHub graphql query to also fetch reactions. We update the JSON typedefs to include this new information, add continuations from comments, and update existing continuation and query code. Also, I added a safety check when updating comments for issues that was previously unnecessary but is now needed. Test plan: - `yarn test --full` passes. - Setting the page limits to 1 and running on the example-github does not error with unexhausted pages, and loads all the expected reactions. - Running on a larger repository (go-ipfs) works as expected. - I have written dependent code that consumes these reactions in the RelationalView, and works as intended, which suggests that the type signatures are correct.
teamdandelion
force-pushed
the
reactions-relationalview
branch
from
September 14, 2018 23:12
2eeb45e
to
4f2f7fb
Compare
wchargin
approved these changes
Sep 17, 2018
teamdandelion
added a commit
that referenced
this pull request
Sep 17, 2018
This commit adds functional support for reactions in SourceCred. Only thumbs-up, heart, and hooray reactions are supported for now, as they are all unambiguously positive; adding support for negative reactions like thumbs-down will require some more thought. The reactions are added to the graph, and new edge types have been added to the UI. Test plan: The `graphView` class has been updated to do invariant checking for the reaction edges, including that the unsupported reaction types like "THUMBS_DOWN" aren't added to the graph. I've tested this feature by downloading data for a large repository (ipfs/go-ipfs). The reaction edges appear and transfer cred reasonably. The edge types are displayed in the weight config appropriately. Builds on #839, #840, and #845.
teamdandelion
added a commit
that referenced
this pull request
Sep 17, 2018
This commit adds functional support for reactions in SourceCred. Only thumbs-up, heart, and hooray reactions are supported for now, as they are all unambiguously positive; adding support for negative reactions like thumbs-down will require some more thought. The reactions are added to the graph, and new edge types have been added to the UI. Test plan: The `graphView` class has been updated to do invariant checking for the reaction edges, including that the unsupported reaction types like "THUMBS_DOWN" aren't added to the graph. I've tested this feature by downloading data for a large repository (ipfs/go-ipfs). The reaction edges appear and transfer cred reasonably. The edge types are displayed in the weight config appropriately. Builds on #839, #840, and #845.
teamdandelion
added a commit
that referenced
this pull request
Sep 17, 2018
* Define Reaction edges This adds support to `github/edges` for creating edges representing GitHub reactions. These edges are not actually added to the graph. Test plan: Unit tests * Add GitHub reactions to the graph This commit adds functional support for reactions in SourceCred. Only thumbs-up, heart, and hooray reactions are supported for now, as they are all unambiguously positive; adding support for negative reactions like thumbs-down will require some more thought. The reactions are added to the graph, and new edge types have been added to the UI. Test plan: The `graphView` class has been updated to do invariant checking for the reaction edges, including that the unsupported reaction types like "THUMBS_DOWN" aren't added to the graph. I've tested this feature by downloading data for a large repository (ipfs/go-ipfs). The reaction edges appear and transfer cred reasonably. The edge types are displayed in the weight config appropriately. Builds on #839, #840, and #845.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We don't create an
Entity
for Reactions - that seems heavyweight,since reactions will be edges, rather than nodes, in the graph. (At
least for now.) Rather, I created a
ReactionRecord
type, and everyReactableEntity
has a method that returns theReactionRecords
.The test code has an example of getting all of the reactions from the
example-github repository, in a format that makes it easy to verify that
all of the expected reactions have been detected.
Test plan:
Unit tests demonstrate that the reaction code is working as intended.