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

Request reactions data from GitHub #839

Merged
merged 1 commit into from Sep 14, 2018
Merged

Request reactions data from GitHub #839

merged 1 commit into from Sep 14, 2018

Conversation

@decentralion
Copy link
Member

decentralion commented 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 requested a review from wchargin Sep 14, 2018
src/plugins/github/graphql.js Outdated Show resolved Hide resolved
@@ -324,7 +326,7 @@ function* continuationsFromIssue(
path: $ReadOnlyArray<string | number>
): Iterator<Continuation> {
const b = build;
if (result.comments.pageInfo.hasNextPage) {
if (result.comments && result.comments.pageInfo.hasNextPage) {

This comment has been minimized.

Copy link
@wchargin

wchargin Sep 14, 2018

Member

Curious whether your tests would have caught the absence of this change?

This comment has been minimized.

Copy link
@decentralion

decentralion Sep 14, 2018

Author Member

I think so.

@decentralion decentralion force-pushed the reactions-graphql branch from d660160 to 6ce3c8a Sep 14, 2018
src/plugins/github/graphql.js Outdated Show resolved Hide resolved
@decentralion decentralion force-pushed the reactions-graphql branch from 6ce3c8a to b81be40 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-graphql branch from b81be40 to d71e1f7 Sep 14, 2018
@decentralion decentralion merged commit a2ffdf5 into master Sep 14, 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 added a commit that referenced this pull request 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 added a commit that referenced this pull request Sep 17, 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 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.
@decentralion decentralion deleted the reactions-graphql branch Sep 18, 2018
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.