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 reactions to the RelationalView #840

Merged
merged 1 commit into from Sep 17, 2018
Merged

Conversation

@decentralion
Copy link
Member

decentralion commented Sep 14, 2018

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 every
ReactableEntity has a method that returns the ReactionRecords.

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.

@decentralion decentralion requested a review from wchargin Sep 14, 2018
@decentralion decentralion force-pushed the reactions-graphql branch 3 times, most recently from b81be40 to d71e1f7 Sep 14, 2018
@decentralion decentralion force-pushed the reactions-relationalview branch from 49e6398 to 2eeb45e Sep 14, 2018
@decentralion decentralion changed the base branch from reactions-graphql to master Sep 14, 2018
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.
@decentralion decentralion force-pushed the reactions-relationalview branch from 2eeb45e to 4f2f7fb Sep 14, 2018
@decentralion decentralion merged commit 1ad2cc0 into master Sep 17, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@decentralion decentralion deleted the reactions-relationalview branch Sep 17, 2018
decentralion 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.
decentralion 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.
decentralion 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.