Skip to content

Commit

Permalink
only lookup current repo pull requests
Browse files Browse the repository at this point in the history
fixes #278

commit-id:4f850d51
  • Loading branch information
ejoffe committed Apr 18, 2023
1 parent a39f33f commit a1939e4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion github/githubclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (c *client) GetInfo(ctx context.Context, gitcmd git.GitInterface) *github.G
branchname := getLocalBranchName(gitcmd)

var requests []*github.PullRequest
for _, node := range *resp.Viewer.PullRequests.Nodes {
for _, node := range *resp.Repository.PullRequests.Nodes {
if resp.Repository.Id != node.Repository.Id {
continue
}
Expand Down
44 changes: 22 additions & 22 deletions github/githubclient/gen/genclient/operations.go

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

6 changes: 3 additions & 3 deletions github/githubclient/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ query PullRequests(
){
viewer {
login
}
repository(owner:$repo_owner, name:$repo_name) {
id
pullRequests(first:100, states:[OPEN]) {
nodes {
id
Expand Down Expand Up @@ -32,9 +35,6 @@ query PullRequests(
}
}
}
repository(owner:$repo_owner, name:$repo_name) {
id
}
}

query AssignableUsers(
Expand Down

0 comments on commit a1939e4

Please sign in to comment.