forked from ryanprior/gh-board
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new graphql client to sync issues
Closes #26
- Loading branch information
Showing
7 changed files
with
268 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { GITHUB_ISSUE_INFO_QUERY } from './github_issue_info'; | ||
export { GITHUB_PR_INFO_QUERY } from './github_pr_info'; | ||
export { GITHUB_LABEL_INFO_QUERY } from './github_label_info'; | ||
export { GITHUB_REACTION_INFO_QUERY } from './github_reaction_info'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
export const GITHUB_ISSUE_INFO_QUERY = ` | ||
query($owner: String!, $name: String!, $perPage: Int!, $before: String, $orderBy: IssueOrder!) { | ||
rateLimit { | ||
limit | ||
remaining | ||
resetAt | ||
} | ||
repository(owner:$owner, name:$name) { | ||
issues(last:$perPage, before:$before, orderBy:$orderBy) { | ||
pageInfo { | ||
startCursor | ||
hasPreviousPage | ||
} | ||
nodes { | ||
title | ||
bodyText | ||
url | ||
number | ||
state | ||
comments { | ||
totalCount | ||
} | ||
milestone { | ||
title | ||
createdAt | ||
dueOn | ||
state | ||
url | ||
description | ||
} | ||
createdAt | ||
updatedAt | ||
closedAt | ||
author { | ||
login | ||
avatarUrl | ||
} | ||
assignees(first:1) { | ||
nodes { | ||
login | ||
avatarUrl | ||
} | ||
} | ||
labels(first:100) { | ||
nodes { | ||
color | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export const GITHUB_LABEL_INFO_QUERY = ` | ||
query($owner: String!, $name: String!) { | ||
rateLimit { | ||
limit | ||
remaining | ||
resetAt | ||
} | ||
repository(owner:$owner, name:$name) { | ||
labels(first:100){ | ||
nodes { | ||
id | ||
url | ||
name | ||
color | ||
isDefault | ||
} | ||
} | ||
} | ||
}`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
export const GITHUB_PR_INFO_QUERY = ` | ||
query($owner: String!, $name: String!, $perPage: Int!, $before: String, $orderBy: IssueOrder!) { | ||
rateLimit { | ||
limit | ||
remaining | ||
resetAt | ||
} | ||
repository(owner:$owner, name:$name) { | ||
pullRequests(last:$perPage, before:$before, orderBy:$orderBy) { | ||
pageInfo { | ||
startCursor | ||
hasPreviousPage | ||
} | ||
nodes { | ||
title | ||
bodyText | ||
url | ||
number | ||
state | ||
reviews(first: 20) { | ||
totalCount | ||
nodes { | ||
comments(first: 100) { | ||
totalCount | ||
nodes { | ||
id | ||
url | ||
bodyText | ||
diffHunk | ||
createdAt | ||
lastEditedAt | ||
author { | ||
login | ||
avatarUrl | ||
... on User { | ||
name | ||
} | ||
} | ||
reactionGroups { | ||
content | ||
createdAt | ||
} | ||
} | ||
} | ||
} | ||
} | ||
comments(first:100) { | ||
totalCount | ||
nodes { | ||
id | ||
url | ||
bodyText | ||
createdAt | ||
lastEditedAt | ||
author { | ||
login | ||
avatarUrl | ||
... on User { | ||
name | ||
} | ||
} | ||
reactionGroups { | ||
content | ||
createdAt | ||
} | ||
} | ||
} | ||
milestone { | ||
title | ||
createdAt | ||
dueOn | ||
state | ||
url | ||
description | ||
} | ||
createdAt | ||
updatedAt | ||
closedAt | ||
author { | ||
login | ||
avatarUrl | ||
} | ||
assignees(first:1) { | ||
nodes { | ||
login | ||
avatarUrl | ||
} | ||
} | ||
labels(first:100) { | ||
nodes { | ||
color | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
export const GITHUB_REACTION_INFO_QUERY = ` | ||
query($owner: String!, $name: String!, $number: Int!, | ||
$reviewsCount: Int!, $discussionsPerReview: Int!, $commentsCount: Int!) { | ||
rateLimit { | ||
limit | ||
remaining | ||
resetAt | ||
} | ||
repository(owner:$owner, name:$name) { | ||
pullRequest(number: $number) { | ||
reviews(first: $reviewsCount) { | ||
nodes { | ||
comments(first: $discussionsPerReview) { | ||
nodes { | ||
id | ||
reactions(first: 100) { | ||
nodes { | ||
id | ||
createdAt | ||
content | ||
user { | ||
login | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
comments(first:$commentsCount) { | ||
nodes { | ||
id | ||
reactions(first: 100) { | ||
nodes { | ||
id | ||
createdAt | ||
content | ||
user { | ||
login | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}`; |
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
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