File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 15831583 "title" : " %command.notifications.markMergedPullRequestsAsRead.title%" ,
15841584 "category" : " %command.notifications.category%" ,
15851585 "icon" : " $(git-pull-request)"
1586+ },
1587+ {
1588+ "command" : " notifications.markMergedPullRequestsAsDone" ,
1589+ "title" : " %command.notifications.markMergedPullRequestsAsDone.title%" ,
1590+ "category" : " %command.notifications.category%" ,
1591+ "icon" : " $(git-pull-request)"
15861592 }
15871593 ],
15881594 "viewsWelcome" : [
22752281 "command" : " notifications.markMergedPullRequestsAsRead" ,
22762282 "when" : " false"
22772283 },
2284+ {
2285+ "command" : " notifications.markMergedPullRequestsAsDone" ,
2286+ "when" : " false"
2287+ },
22782288 {
22792289 "command" : " review.copyPrLink" ,
22802290 "when" : " github:inReviewMode"
24082418 },
24092419 {
24102420 "command" : " notifications.markMergedPullRequestsAsRead" ,
2411- "when" : " gitHubOpenRepositoryCount != 0 && github:initialized && view == notifications:github && config.githubPullRequests.experimental.notificationsMarkPullRequests != none" ,
2421+ "when" : " gitHubOpenRepositoryCount != 0 && github:initialized && view == notifications:github && config.githubPullRequests.experimental.notificationsMarkPullRequests == markAsRead" ,
2422+ "group" : " navigation@0"
2423+ },
2424+ {
2425+ "command" : " notifications.markMergedPullRequestsAsDone" ,
2426+ "when" : " gitHubOpenRepositoryCount != 0 && github:initialized && view == notifications:github && config.githubPullRequests.experimental.notificationsMarkPullRequests == markAsDone" ,
24122427 "group" : " navigation@0"
24132428 },
24142429 {
Original file line number Diff line number Diff line change 300300 "command.notifications.markAsRead.title" : " Mark as Read" ,
301301 "command.notifications.markAsDone.title" : " Mark as Done" ,
302302 "command.notifications.markMergedPullRequestsAsRead.title" : " Mark Merged Pull Requests as Read" ,
303+ "command.notifications.markMergedPullRequestsAsDone.title" : " Mark Merged Pull Requests as Done" ,
303304 "command.notification.chatSummarizeNotification.title" : " Summarize With Copilot" ,
304305 "welcome.github.login.contents" : {
305306 "message" : " You have not yet signed in with GitHub\n [Sign in](command:pr.signin)" ,
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ export const EXPERIMENTAL_USE_QUICK_CHAT = 'experimental.useQuickChat';
5757export const EXPERIMENTAL_NOTIFICATIONS = 'experimental.notificationsView' ;
5858export const EXPERIMENTAL_NOTIFICATIONS_PAGE_SIZE = 'experimental.notificationsViewPageSize' ;
5959export const EXPERIMENTAL_NOTIFICATIONS_SCORE = 'experimental.notificationsScore' ;
60- export const EXPERIMENTAL_NOTIFICATIONS_MARK_PRS = 'experimental.notificationsMarkPullRequests' ;
6160
6261// git
6362export const GIT = 'git' ;
Original file line number Diff line number Diff line change @@ -127,7 +127,17 @@ export class NotificationsFeatureRegister extends Disposable {
127127 "notifications.markMergedPullRequestsAsRead" : {}
128128 */
129129 this . _telemetry . sendTelemetryEvent ( 'notifications.markMergedPullRequestsAsRead' ) ;
130- return notificationsManager . markMergedPullRequestAsRead ( ) ;
130+ return notificationsManager . markMergedPullRequest ( ) ;
131+ } )
132+ ) ;
133+
134+ this . _register (
135+ vscode . commands . registerCommand ( 'notifications.markMergedPullRequestsAsDone' , ( ) => {
136+ /* __GDPR__
137+ "notifications.markMergedPullRequestsAsDone" : {}
138+ */
139+ this . _telemetry . sendTelemetryEvent ( 'notifications.markMergedPullRequestsAsDone' ) ;
140+ return notificationsManager . markMergedPullRequest ( true ) ;
131141 } )
132142 ) ;
133143
Original file line number Diff line number Diff line change 55
66import * as vscode from 'vscode' ;
77import { Disposable } from '../common/lifecycle' ;
8- import { EXPERIMENTAL_NOTIFICATIONS_MARK_PRS } from '../common/settingKeys' ;
98import { EventType , TimelineEvent } from '../common/timelineEvent' ;
109import { toNotificationUri } from '../common/uri' ;
1110import { CredentialStore } from '../github/credentials' ;
@@ -263,8 +262,7 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP
263262 }
264263 }
265264
266- public async markMergedPullRequestAsRead ( ) : Promise < void > {
267- const markAsDone = vscode . workspace . getConfiguration ( 'githubPullRequests' ) . get < 'markAsRead' | 'markAsDone' > ( EXPERIMENTAL_NOTIFICATIONS_MARK_PRS , 'markAsRead' ) === 'markAsDone' ;
265+ public async markMergedPullRequest ( markAsDone : boolean = false ) : Promise < void > {
268266 const filteredNotifications = Array . from ( this . _notifications . values ( ) ) . filter ( notification => notification . notification . subject . type === NotificationSubjectType . PullRequest && notification . model . isMerged ) ;
269267 const timlines = await Promise . all ( filteredNotifications . map ( notification => ( notification . model as PullRequestModel ) . getTimelineEvents ( ) ) ) ;
270268
You can’t perform that action at this time.
0 commit comments