Skip to content

Commit

Permalink
Fixes github provider search function
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeibbb committed Nov 6, 2024
1 parent 2fe07f9 commit 9673236
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/plus/integrations/providers/github/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3040,15 +3040,17 @@ export class GitHubApi implements Disposable {
const scope = getLogScope();

interface SearchResult {
nodes: GitHubPullRequest[];
search: {
nodes: GitHubPullRequest[];
};
}

try {
const query = `query searchPullRequests(
$searchQuery: String!
$avatarSize: Int
) {
search(first: 100, query: $searchQuery, type: ISSUE) {
search(first: 10, query: $searchQuery, type: ISSUE) {
nodes {
...on PullRequest {
${gqlPullRequestFragment}
Expand Down Expand Up @@ -3082,7 +3084,7 @@ export class GitHubApi implements Disposable {
);
if (rsp == null) return [];

const results = rsp.nodes.map(pr => fromGitHubPullRequest(pr, provider));
const results = rsp.search.nodes.map(pr => fromGitHubPullRequest(pr, provider));
return results;
} catch (ex) {
throw this.handleException(ex, provider, scope);
Expand Down

0 comments on commit 9673236

Please sign in to comment.