Skip to content

Commit ea82c1f

Browse files
authored
Only respond to PR updates after initialization (#7685)
Part of #7643
1 parent a2622b2 commit ea82c1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/github/copilotPrWatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class CopilotPRWatcher extends Disposable {
155155
const updateFullState = debounce(() => this._getStateChanges(), 50);
156156
this._register(this._reposManager.onDidChangeAnyPullRequests(e => {
157157
if (e.some(pr => COPILOT_ACCOUNTS[pr.model.author.login])) {
158-
if (e.some(pr => this._model.get(pr.model.remote.owner, pr.model.remote.repositoryName, pr.model.number) === CopilotPRStatus.None)) {
158+
if (this._model.isInitialized && e.some(pr => this._model.get(pr.model.remote.owner, pr.model.remote.repositoryName, pr.model.number) === CopilotPRStatus.None)) {
159159
// A PR we don't know about was updated
160160
updateFullState();
161161
} else {

0 commit comments

Comments
 (0)