Skip to content

Commit fb3f123

Browse files
authored
Remove the frog icons, open descriptions from notifications (#6770)
1 parent 20a06d8 commit fb3f123

File tree

3 files changed

+16
-26
lines changed

3 files changed

+16
-26
lines changed

package.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,11 +2477,6 @@
24772477
"group": "issues_0@0",
24782478
"when": "view == notifications:github && (viewItem == 'Issue' || viewItem == 'PullRequest') && config.githubPullRequests.experimental.notificationsView && config.githubPullRequests.experimental.chat"
24792479
},
2480-
{
2481-
"command": "notification.openOnGitHub",
2482-
"group": "inline@2",
2483-
"when": "view == notifications:github && (viewItem == 'Issue' || viewItem == 'PullRequest') && config.githubPullRequests.experimental.notificationsView"
2484-
},
24852480
{
24862481
"command": "notification.openOnGitHub",
24872482
"group": "issues_0@1",
@@ -2565,16 +2560,6 @@
25652560
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/",
25662561
"group": "inline@1"
25672562
},
2568-
{
2569-
"command": "issue.chatSummarizeIssue",
2570-
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/ && github.copilot-chat.activated && config.githubPullRequests.experimental.chat",
2571-
"group": "inline@0"
2572-
},
2573-
{
2574-
"command": "issue.chatSummarizeIssue",
2575-
"when": "view == pr:github && viewItem =~ /pullrequest/ && github.copilot-chat.activated && config.githubPullRequests.experimental.chat",
2576-
"group": "inline@0"
2577-
},
25782563
{
25792564
"command": "issue.openIssue",
25802565
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/",

src/commands.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -830,15 +830,12 @@ export function registerCommands(
830830
return;
831831
}
832832

833-
const folderManager = reposManager.getManagerForIssueModel(issueModel);
834-
if (!folderManager) {
835-
return;
836-
}
833+
const folderManager = reposManager.getManagerForIssueModel(issueModel) ?? reposManager.folderManagers[0];
837834

838835
let descriptionNode: PRNode | RepositoryChangesNode | undefined;
839836
if (argument instanceof PRNode) {
840837
descriptionNode = argument;
841-
} else {
838+
} else if ((issueModel instanceof PullRequestModel) && folderManager.activePullRequest?.equals(issueModel)) {
842839
const reviewManager = ReviewManager.getReviewManagerForFolderManager(reviewsManager.reviewManagers, folderManager);
843840
if (!reviewManager) {
844841
return;
@@ -847,7 +844,7 @@ export function registerCommands(
847844
descriptionNode = reviewManager.changesInPrDataProvider.getDescriptionNode(folderManager);
848845
}
849846

850-
const revealDescription = !(argument instanceof PRNode) && (!(argument instanceof IssueModel) || (argument instanceof PullRequestModel));
847+
const revealDescription = !(argument instanceof PRNode);
851848

852849
await openDescription(telemetry, issueModel, descriptionNode, folderManager, revealDescription, !(argument instanceof RepositoryChangesNode), tree.notificationProvider);
853850
}

src/notifications/notificationsManager.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,19 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP
8989
item.description = `${notification.owner}/${notification.name}`;
9090
item.contextValue = notification.subject.type;
9191
item.resourceUri = toNotificationUri({ key: element.notification.key });
92-
item.command = {
93-
command: 'notification.chatSummarizeNotification',
94-
title: 'Summarize Notification',
95-
arguments: [element]
96-
};
92+
if (element.model instanceof PullRequestModel) {
93+
item.command = {
94+
command: 'pr.openDescription',
95+
title: vscode.l10n.t('Open Pull Request Description'),
96+
arguments: [element.model]
97+
};
98+
} else {
99+
item.command = {
100+
command: 'issue.openDescription',
101+
title: vscode.l10n.t('Open Issue Description'),
102+
arguments: [element.model]
103+
};
104+
}
97105
return item;
98106
}
99107

0 commit comments

Comments
 (0)