Skip to content

Commit b77f8e8

Browse files
authored
Fix error fetching merge queue when no merge queue (microsoft#5487)
1 parent 87d8903 commit b77f8e8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/github/githubRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ export class GitHubRepository implements vscode.Disposable {
456456
});
457457

458458
Logger.debug('Fetch branch has merge queue - done', GitHubRepository.ID);
459-
const mergeMethod = parseMergeMethod(result.data.repository.mergeQueue.configuration?.mergeMethod);
459+
const mergeMethod = parseMergeMethod(result.data.repository.mergeQueue?.configuration?.mergeMethod);
460460
if (mergeMethod) {
461461
this._branchHasMergeQueue.set(branch, mergeMethod);
462462
}

src/github/graphql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ export interface MarkPullRequestReadyForReviewResponse {
399399

400400
export interface MergeQueueForBranchResponse {
401401
repository: {
402-
mergeQueue: {
403-
configuration: {
402+
mergeQueue?: {
403+
configuration?: {
404404
mergeMethod: MergeMethod;
405405
}
406406
}

0 commit comments

Comments
 (0)