From fc6cb5f83f675d4beebb5613b9b020a3525e3428 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Fri, 9 Jan 2026 11:06:01 +0100 Subject: [PATCH 1/4] Do not create notifications for copilot PRs which are in progress Fixes microsoft/vscode-pull-request-github#8380 --- src/github/copilotPrWatcher.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/github/copilotPrWatcher.ts b/src/github/copilotPrWatcher.ts index a084a44777..58dc90f751 100644 --- a/src/github/copilotPrWatcher.ts +++ b/src/github/copilotPrWatcher.ts @@ -69,6 +69,9 @@ export class CopilotStateModel extends Disposable { continue; } this._states.set(key, { item, status }); + if ((currentStatus?.status === CopilotPRStatus.Started)) { + continue; + } changedModels.push(item); changedKeys.push(key); } From fda56452b4d29d1720c759fb97f56d02e2d56c56 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Fri, 9 Jan 2026 12:52:36 +0100 Subject: [PATCH 2/4] Copilot PR feedback --- src/github/copilotPrWatcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github/copilotPrWatcher.ts b/src/github/copilotPrWatcher.ts index 58dc90f751..429fa0c561 100644 --- a/src/github/copilotPrWatcher.ts +++ b/src/github/copilotPrWatcher.ts @@ -69,7 +69,7 @@ export class CopilotStateModel extends Disposable { continue; } this._states.set(key, { item, status }); - if ((currentStatus?.status === CopilotPRStatus.Started)) { + if (status === CopilotPRStatus.Started) { continue; } changedModels.push(item); From ec6ac27e3ad445c626f05ce03bd0a380df241728 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Fri, 9 Jan 2026 14:24:16 +0100 Subject: [PATCH 3/4] Fix test --- src/test/github/copilotPrWatcher.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/github/copilotPrWatcher.test.ts b/src/test/github/copilotPrWatcher.test.ts index 5df018ce63..5ca8161600 100644 --- a/src/test/github/copilotPrWatcher.test.ts +++ b/src/test/github/copilotPrWatcher.test.ts @@ -31,19 +31,19 @@ describe('Copilot PR watcher', () => { model.set([{ item: pr, status: CopilotPRStatus.Started }]); assert.strictEqual(model.get('octo', 'repo', 1), CopilotPRStatus.Started); - assert.strictEqual(changeEvents, 1); + assert.strictEqual(changeEvents, 0); assert.strictEqual(notifications.length, 0); assert.strictEqual(model.notifications.size, 0); model.set([{ item: pr, status: CopilotPRStatus.Started }]); - assert.strictEqual(changeEvents, 1); + assert.strictEqual(changeEvents, 0); model.setInitialized(); const updated = createPullRequest('octo', 'repo', 1); model.set([{ item: updated, status: CopilotPRStatus.Completed }]); assert.strictEqual(model.get('octo', 'repo', 1), CopilotPRStatus.Completed); - assert.strictEqual(changeEvents, 2); + assert.strictEqual(changeEvents, 1); assert.strictEqual(notifications.length, 1); assert.deepStrictEqual(notifications[0], [updated]); assert.ok(model.notifications.has('octo/repo#1')); From 6979bc5aeb3ffdece2c8475e512492d5d57d0295 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Fri, 9 Jan 2026 15:02:57 +0100 Subject: [PATCH 4/4] Fix test --- src/test/github/copilotPrWatcher.test.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/test/github/copilotPrWatcher.test.ts b/src/test/github/copilotPrWatcher.test.ts index 5ca8161600..678070192e 100644 --- a/src/test/github/copilotPrWatcher.test.ts +++ b/src/test/github/copilotPrWatcher.test.ts @@ -58,7 +58,7 @@ describe('Copilot PR watcher', () => { model.setInitialized(); const pr = createPullRequest('octo', 'repo', 42); - model.set([{ item: pr, status: CopilotPRStatus.Started }]); + model.set([{ item: pr, status: CopilotPRStatus.Completed }]); assert.strictEqual(model.notifications.size, 1); assert.strictEqual(changeEvents, 1); @@ -79,7 +79,7 @@ describe('Copilot PR watcher', () => { model.setInitialized(); const pr = createPullRequest('octo', 'repo', 5); - model.set([{ item: pr, status: CopilotPRStatus.Started }]); + model.set([{ item: pr, status: CopilotPRStatus.Completed }]); assert.strictEqual(model.notifications.size, 1); assert.strictEqual(notifications.length, 1); @@ -110,22 +110,18 @@ describe('Copilot PR watcher', () => { { item: prThree, status: CopilotPRStatus.Completed } ]); - assert.strictEqual(model.notifications.size, 3); + assert.strictEqual(model.notifications.size, 2); assert.strictEqual(notifications.length, 1); - assert.deepStrictEqual(notifications[0], [prOne, prTwo, prThree]); - assert.strictEqual(model.getNotificationsCount('octo', 'repo'), 2); + assert.deepStrictEqual(notifications[0], [prTwo, prThree]); + assert.strictEqual(model.getNotificationsCount('octo', 'repo'), 1); assert.deepStrictEqual(model.keys().sort(), ['octo/repo#1', 'octo/repo#2', 'other/repo#3']); model.clearAllNotifications('octo', 'repo'); assert.strictEqual(model.notifications.size, 1); assert.strictEqual(model.getNotificationsCount('octo', 'repo'), 0); - assert.strictEqual(notifications.length, 2); - assert.deepStrictEqual(notifications[1], [prOne, prTwo]); model.clearAllNotifications(); assert.strictEqual(model.notifications.size, 0); - assert.strictEqual(notifications.length, 3); - assert.deepStrictEqual(notifications[2], [prThree]); const counts = model.getCounts('octo', 'repo'); assert.deepStrictEqual(counts, { total: 3, inProgress: 1, error: 1 });