Skip to content

Commit

Permalink
Remove merge queue from query is feature is disabled
Browse files Browse the repository at this point in the history
commit-id:0219e1da
  • Loading branch information
ejoffe committed Dec 7, 2023
1 parent ca55507 commit 207cde1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 28 deletions.
3 changes: 2 additions & 1 deletion github/githubclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ func (c *client) GetInfo(ctx context.Context, gitcmd git.GitInterface) *github.G
}
resp, err := c.api.PullRequests(ctx,
c.config.Repo.GitHubRepoOwner,
c.config.Repo.GitHubRepoName)
c.config.Repo.GitHubRepoName,
c.config.Repo.MergeQueue)
check(err)

targetBranch := c.config.Repo.GitHubBranch
Expand Down
23 changes: 12 additions & 11 deletions github/githubclient/gen/genclient/client.go

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

32 changes: 17 additions & 15 deletions github/githubclient/gen/genclient/operations.go

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

3 changes: 2 additions & 1 deletion github/githubclient/queries.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
query PullRequests(
$repo_owner: String!,
$repo_name: String!,
$use_merge_queue: Boolean!,
){
viewer {
login
Expand All @@ -17,7 +18,7 @@ query PullRequests(
repository {
id
}
mergeQueueEntry {
mergeQueueEntry @skip(if: $use_merge_queue) {
id
}
commits(first:100) {
Expand Down

0 comments on commit 207cde1

Please sign in to comment.