mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
fix: resolve remote source actions by remote url (#227647)
fix: resolve remote source actions by remote name
This commit is contained in:
@@ -525,9 +525,15 @@ class CheckoutItemsProcessor extends RefItemsProcessor {
|
||||
// Button(s)
|
||||
if (item.refRemote) {
|
||||
const matchingRemote = this.repository.remotes.find((remote) => remote.name === item.refRemote);
|
||||
const remoteUrl = matchingRemote?.pushUrl ?? matchingRemote?.fetchUrl;
|
||||
if (remoteUrl) {
|
||||
item.buttons = this.buttons.get(item.refRemote);
|
||||
const buttons = [];
|
||||
if (matchingRemote?.pushUrl) {
|
||||
buttons.push(...this.buttons.get(matchingRemote.pushUrl) ?? []);
|
||||
}
|
||||
if (matchingRemote?.fetchUrl && matchingRemote.fetchUrl !== matchingRemote.pushUrl) {
|
||||
buttons.push(...this.buttons.get(matchingRemote.fetchUrl) ?? []);
|
||||
}
|
||||
if (buttons.length) {
|
||||
item.buttons = buttons;
|
||||
}
|
||||
} else {
|
||||
item.buttons = this.defaultButtons;
|
||||
|
||||
Reference in New Issue
Block a user