Skip to content

Commit 064396a

Browse files
authored
Closing a pull request doesn't remove it from the copilot on my behalf section (#7457)
Fixes #7364
1 parent d48d650 commit 064396a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/github/pullRequestModel.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
394394
this._telemetry.sendTelemetryEvent('pr.close');
395395
const user = await this.githubRepository.getAuthenticatedUser();
396396
this.state = this.stateToStateEnum(ret.data.state);
397-
this._onDidChange.fire({ state: true });
397+
398+
// Fire the event with a delay as GitHub needs some time to propagate the changes, we want to make sure any listeners of the event will get the right info when they query
399+
setTimeout(() => this._onDidChange.fire({ state: true }), 1500);
398400

399401
return {
400402
item: convertRESTPullRequestToRawPullRequest(ret.data, this.githubRepository),

0 commit comments

Comments
 (0)