Skip to content

Commit a1939e4

Browse files
committed
only lookup current repo pull requests
fixes #278 commit-id:4f850d51
1 parent a39f33f commit a1939e4

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

github/githubclient/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (c *client) GetInfo(ctx context.Context, gitcmd git.GitInterface) *github.G
188188
branchname := getLocalBranchName(gitcmd)
189189

190190
var requests []*github.PullRequest
191-
for _, node := range *resp.Viewer.PullRequests.Nodes {
191+
for _, node := range *resp.Repository.PullRequests.Nodes {
192192
if resp.Repository.Id != node.Repository.Id {
193193
continue
194194
}

github/githubclient/gen/genclient/operations.go

+22-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/githubclient/queries.graphql

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ query PullRequests(
44
){
55
viewer {
66
login
7+
}
8+
repository(owner:$repo_owner, name:$repo_name) {
9+
id
710
pullRequests(first:100, states:[OPEN]) {
811
nodes {
912
id
@@ -32,9 +35,6 @@ query PullRequests(
3235
}
3336
}
3437
}
35-
repository(owner:$repo_owner, name:$repo_name) {
36-
id
37-
}
3838
}
3939

4040
query AssignableUsers(

0 commit comments

Comments
 (0)