Skip to content

Commit d67c50a

Browse files
Radu028claude
andcommitted
fix(github): a missing issue or pull request number is still a not-found lookup
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 5548836 commit d67c50a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/source-control-github/src/server/gitHubGraphQlClient.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ function queryHash(query: string): string {
4444
}
4545

4646
/**
47-
* Whether every error is a NOT_FOUND on a lookup: a root field (with its list items) or
48-
* `repository.pullRequest`. A NOT_FOUND deeper down is one field GitHub could not resolve.
47+
* Whether every error is a NOT_FOUND on a lookup: a root field (with its list items),
48+
* `repository.pullRequest` or `repository.issueOrPullRequest`. A NOT_FOUND deeper down is one
49+
* field GitHub could not resolve.
4950
*/
5051
export const isNotFoundOnly = (error: unknown): boolean =>
5152
GraphQLClientError.isGraphQLClientError(error) &&
@@ -55,7 +56,9 @@ export const isNotFoundOnly = (error: unknown): boolean =>
5556
type === "NOT_FOUND" &&
5657
(path === undefined ||
5758
path.slice(1).every((segment) => typeof segment === "number") ||
58-
(path.length === 2 && path[0] === "repository" && path[1] === "pullRequest")),
59+
(path.length === 2 &&
60+
path[0] === "repository" &&
61+
(path[1] === "pullRequest" || path[1] === "issueOrPullRequest"))),
5962
);
6063

6164
/** GitHub's message for each error in an answer, with the field it names. */

0 commit comments

Comments
 (0)