File tree Expand file tree Collapse file tree 5 files changed +24
-4
lines changed
integrations/providers/github Expand file tree Collapse file tree 5 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1237
1237
"scope": "window",
1238
1238
"order": 10
1239
1239
},
1240
+ "gitlens.launchpad.includedOrganizations": {
1241
+ "type": "array",
1242
+ "default": [],
1243
+ "items": {
1244
+ "type": "string"
1245
+ },
1246
+ "markdownDescription": "Specifies the organizations to include in the _Launchpad_. If empty, all organizations are included",
1247
+ "scope": "window",
1248
+ "order": 11
1249
+ },
1240
1250
"gitlens.launchpad.ignoredOrganizations": {
1241
1251
"type": "array",
1242
1252
"default": [],
1245
1255
},
1246
1256
"markdownDescription": "Specifies the organizations to ignore in the _Launchpad_",
1247
1257
"scope": "window",
1248
- "order": 11
1258
+ "order": 12
1249
1259
},
1250
1260
"gitlens.launchpad.staleThreshold": {
1251
1261
"type": [
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ export interface Config {
91
91
} ;
92
92
readonly launchpad : {
93
93
readonly allowMultiple : boolean ;
94
+ readonly includedOrganizations : string [ ] ;
94
95
readonly ignoredOrganizations : string [ ] ;
95
96
readonly ignoredRepositories : string [ ] ;
96
97
readonly staleThreshold : number | null ;
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ export type TelemetryEvents = {
183
183
/** Sent when the user changes launchpad configuration settings */
184
184
'launchpad/configurationChanged' : {
185
185
'config.launchpad.staleThreshold' : number | null ;
186
+ 'config.launchpad.includedOrganizations' : number ;
186
187
'config.launchpad.ignoredOrganizations' : number ;
187
188
'config.launchpad.ignoredRepositories' : number ;
188
189
'config.launchpad.indicator.enabled' : boolean ;
Original file line number Diff line number Diff line change @@ -2874,9 +2874,15 @@ export class GitHubApi implements Disposable {
2874
2874
}
2875
2875
2876
2876
// Hack for now, ultimately this should be passed in
2877
- const ignoredOrgs = configuration . get ( 'launchpad.ignoredOrganizations' ) ?? [ ] ;
2878
- if ( ignoredOrgs . length ) {
2879
- search += ` -org:${ ignoredOrgs . join ( ' -org:' ) } ` ;
2877
+ const enabledOrgs = configuration . get ( 'launchpad.includedOrganizations' ) ?? [ ] ;
2878
+ if ( enabledOrgs . length ) {
2879
+ search += ` org:${ enabledOrgs . join ( ' org:' ) } ` ;
2880
+ } else {
2881
+ // Hack for now, ultimately this should be passed in
2882
+ const ignoredOrgs = configuration . get ( 'launchpad.ignoredOrganizations' ) ?? [ ] ;
2883
+ if ( ignoredOrgs . length ) {
2884
+ search += ` -org:${ ignoredOrgs . join ( ' -org:' ) } ` ;
2885
+ }
2880
2886
}
2881
2887
2882
2888
const rsp = await this . graphql < SearchResult > (
Original file line number Diff line number Diff line change @@ -891,6 +891,7 @@ export class LaunchpadProvider implements Disposable {
891
891
const cfg = configuration . get ( 'launchpad' ) ;
892
892
this . container . telemetry . sendEvent ( 'launchpad/configurationChanged' , {
893
893
'config.launchpad.staleThreshold' : cfg . staleThreshold ,
894
+ 'config.launchpad.includedOrganizations' : cfg . includedOrganizations ?. length ?? 0 ,
894
895
'config.launchpad.ignoredOrganizations' : cfg . ignoredOrganizations ?. length ?? 0 ,
895
896
'config.launchpad.ignoredRepositories' : cfg . ignoredRepositories ?. length ?? 0 ,
896
897
'config.launchpad.indicator.enabled' : cfg . indicator . enabled ,
@@ -903,6 +904,7 @@ export class LaunchpadProvider implements Disposable {
903
904
} ) ;
904
905
905
906
if (
907
+ configuration . changed ( e , 'launchpad.includedOrganizations' ) ||
906
908
configuration . changed ( e , 'launchpad.ignoredOrganizations' ) ||
907
909
configuration . changed ( e , 'launchpad.ignoredRepositories' ) ||
908
910
configuration . changed ( e , 'launchpad.staleThreshold' )
You can’t perform that action at this time.
0 commit comments