Do not activate review mode for closed or merged PR by emtei · Pull Request #3021 · microsoft/vscode-pull-request-github (original) (raw)

Fixes #3009

Initially I tried to use line 312 this._prNumber = undefined; to disable review mode from previously branch, however with this.clear(true); all seems to work fine.

Probably that line should also be changed, but I'm not sure how to make pr "notResolved".

I tested manually those scenarios:

  1. Checkout branch with active PR (review activated) => checkout branch with merged PR (review NOT activated)
  2. Checkout branch with merged PR (review NOT activated) => checkout branch with merged PR (review NOT activated)
  3. Checkout branch with active PR (review activated) => checkout other branch with active PR (review activated for other PR)
  4. Open repository whose current branch is active with VSCode (review activated)
  5. Open repository whose current branch is closed with VSCode (review NOT activated)