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

feat: Add GitHub go routines #134

Merged
merged 10 commits into from
Oct 3, 2023

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The diff is a little confusing here. What's the change to the file & purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So here I am switching the graphql query from edges to nodes like all the other queries. Also adding the repository name to the pull request and branch queries so I can keep track of it without having to create a custom struct to do that. The same is true with the default branch value for the branch query since the functions that process the data lost the context of which repo the branches are coming from and the default branch value with it.

Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ query getRepoDataBySearch(
after: $repoCursor
) {
repositoryCount
edges {
# @genqlient(typename: "SearchNode")
node {
... on Repository {
id
# @genqlient(typename: "SearchNode")
nodes {
... on Repository {
id
name
defaultBranchRef {
name
defaultBranchRef {
name
}
}
}
}
Expand Down Expand Up @@ -92,6 +90,12 @@ query getBranchData(
aheadBy
behindBy
}
repository{
name
defaultBranchRef {
name
}
}
}
pageInfo {
endCursor
Expand Down Expand Up @@ -154,6 +158,9 @@ query getPullRequestData(
}
}
}
repository{
name
}
}
pageInfo {
hasNextPage,
Expand Down
Loading