Skip to content

Commit 68a08a9

Browse files
alexr00Copilot
andcommitted
CCR feedback
Co-authored-by: Copilot <copilot@github.com>
1 parent e642c47 commit 68a08a9

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/github/folderRepositoryManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ export class FolderRepositoryManager extends Disposable {
13261326
const protocol = new Protocol(item.repository_url);
13271327

13281328
const prRepo = await this.createGitHubRepositoryFromOwnerName(protocol.owner, protocol.repositoryName);
1329-
const data = await prRepo.getPullRequest(item.number, 'FolderRepositoryManager.getPullRequests');
1329+
const data = await prRepo.getPullRequest(item.number, 'FolderRepositoryManager.getPullRequestsForCategory', false, true);
13301330
return { data, repo: prRepo };
13311331
});
13321332

src/github/githubRepository.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ export class GitHubRepository extends Disposable {
272272

273273
override dispose() {
274274
super.dispose();
275+
GitHubRepository._allRepoIds.delete(this._id);
276+
for (const repoIds of GitHubRepository._succeededPullRequests.values()) {
277+
repoIds.delete(this._id);
278+
}
275279
this.commentsController = undefined;
276280
this.commentsHandler = undefined;
277281
}
@@ -1210,7 +1214,7 @@ export class GitHubRepository extends Disposable {
12101214
}
12111215
}
12121216

1213-
async getPullRequest(id: number, callerName: string, useCache: boolean = false): Promise<PullRequestModel | undefined> {
1217+
async getPullRequest(id: number, callerName: string, useCache: boolean = false, silent: boolean = false): Promise<PullRequestModel | undefined> {
12141218
if (useCache && this._pullRequestModelsByNumber.has(id)) {
12151219
Logger.debug(`Using cached pull request model for ${id}`, this.id);
12161220
return this._pullRequestModelsByNumber.get(id)!.model;
@@ -1234,7 +1238,7 @@ export class GitHubRepository extends Disposable {
12341238
}
12351239

12361240
Logger.debug(`Fetch pull request ${id} - done`, this.id);
1237-
const pr = this.createOrUpdatePullRequestModel(await parseGraphQLPullRequest(data.repository.pullRequest, this));
1241+
const pr = this.createOrUpdatePullRequestModel(await parseGraphQLPullRequest(data.repository.pullRequest, this), silent);
12381242
await pr.getLastUpdateTime(new Date(pr.item.updatedAt));
12391243
let repoIds = GitHubRepository._succeededPullRequests.get(id);
12401244
if (!repoIds) {

0 commit comments

Comments
 (0)