Skip to content

Commit 2a16d89

Browse files
Copilotalexr00
andcommitted
Improve notification to handle both local and remote branch deletion
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent aa012da commit 2a16d89

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/github/pullRequestReviewCommon.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,14 @@ export namespace PullRequestReviewCommon {
467467
// Show notification to the user about what was deleted
468468
if (deletedBranchTypes.length > 0) {
469469
const wasLocalDeleted = deletedBranchTypes.includes('local');
470+
const wasRemoteDeleted = deletedBranchTypes.includes('remoteHead') || deletedBranchTypes.includes('remote');
470471
const branchName = branchInfo?.branch || item.head?.ref || vscode.l10n.t('branch');
471472

472-
if (wasLocalDeleted) {
473+
if (wasLocalDeleted && wasRemoteDeleted) {
474+
vscode.window.showInformationMessage(
475+
vscode.l10n.t('Deleted local and remote branches for {0} and switched to {1}.', branchName, defaultBranch)
476+
);
477+
} else if (wasLocalDeleted) {
473478
vscode.window.showInformationMessage(
474479
vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch)
475480
);

0 commit comments

Comments
 (0)