Commit a84a532
Fix local PR tree not updating when PR is created on GitHub website
When a PR is created on the GitHub website (not via VS Code UI), the
ReviewManager discovers it via checkGitHubForPrBranch() and associates
the local branch with the PR. However, the local PR tree cache in
PrsTreeModel was never invalidated afterward, so the "Local Pull Request
Branches" category never showed the newly-associated branch.
Fix: In PrsTreeModel's onDidChangeActivePullRequest handler, when the
new active PR is not already in the cached PR set, delete the
LocalPullRequest cache entry and fire a full folder refresh (which
triggers refreshRepo() in the tree data provider) instead of the narrow
PR-level refresh (which only updates existing PR nodes via
refreshPullRequests()).
Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/a016c47c-ed2e-432f-b461-f678d8ab62c8
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>1 parent 5985cb4 commit a84a532
File tree
2 files changed
+22
-29
lines changed- src
- @types
- view
2 files changed
+22
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | 356 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | 357 | | |
385 | 358 | | |
386 | 359 | | |
| |||
728 | 701 | | |
729 | 702 | | |
730 | 703 | | |
| 704 | + | |
| 705 | + | |
731 | 706 | | |
732 | 707 | | |
733 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
734 | 716 | | |
735 | 717 | | |
736 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
| |||
0 commit comments