File tree Expand file tree Collapse file tree 6 files changed +30
-4
lines changed
integrations/providers/github Expand file tree Collapse file tree 6 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
9
9
### Added
10
10
11
11
- Adds _ Search for Commits within Selection_ command to the editor context menu when there is a selection
12
+ - Adds a ` gitlens.launchpad.ignoredOrganizations ` setting to specify an array of organizations (or users) to ignore in the _ Launchpad_
12
13
13
14
### Changed
14
15
Original file line number Diff line number Diff line change 2961
2961
"scope": "window",
2962
2962
"order": 10
2963
2963
},
2964
+ "gitlens.launchpad.ignoredOrganizations": {
2965
+ "type": "array",
2966
+ "default": [],
2967
+ "items": {
2968
+ "type": "string"
2969
+ },
2970
+ "markdownDescription": "Specifies the organizations to ignore in the _Launchpad_",
2971
+ "scope": "window",
2972
+ "order": 11
2973
+ },
2964
2974
"gitlens.launchpad.staleThreshold": {
2965
2975
"type": [
2966
2976
"number",
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export interface Config {
90
90
} ;
91
91
readonly launchpad : {
92
92
readonly allowMultiple : boolean ;
93
+ readonly ignoredOrganizations : string [ ] ;
93
94
readonly ignoredRepositories : string [ ] ;
94
95
readonly staleThreshold : number | null ;
95
96
readonly indicator : {
Original file line number Diff line number Diff line change @@ -1311,6 +1311,7 @@ export type TelemetryEvents = {
1311
1311
/** Sent when the user changes launchpad configuration settings */
1312
1312
'launchpad/configurationChanged' : {
1313
1313
'config.launchpad.staleThreshold' : number | null ;
1314
+ 'config.launchpad.ignoredOrganizations' : number ;
1314
1315
'config.launchpad.ignoredRepositories' : number ;
1315
1316
'config.launchpad.indicator.enabled' : boolean ;
1316
1317
'config.launchpad.indicator.openInEditor' : boolean ;
Original file line number Diff line number Diff line change @@ -792,6 +792,7 @@ export class FocusProvider implements Disposable {
792
792
const cfg = configuration . get ( 'launchpad' ) ;
793
793
this . container . telemetry . sendEvent ( 'launchpad/configurationChanged' , {
794
794
'config.launchpad.staleThreshold' : cfg . staleThreshold ,
795
+ 'config.launchpad.ignoredOrganizations' : cfg . ignoredOrganizations ?. length ?? 0 ,
795
796
'config.launchpad.ignoredRepositories' : cfg . ignoredRepositories ?. length ?? 0 ,
796
797
'config.launchpad.indicator.enabled' : cfg . indicator . enabled ,
797
798
'config.launchpad.indicator.openInEditor' : cfg . indicator . openInEditor ,
@@ -804,6 +805,7 @@ export class FocusProvider implements Disposable {
804
805
} ) ;
805
806
806
807
if (
808
+ configuration . changed ( e , 'launchpad.ignoredOrganizations' ) ||
807
809
configuration . changed ( e , 'launchpad.ignoredRepositories' ) ||
808
810
configuration . changed ( e , 'launchpad.staleThreshold' )
809
811
) {
Original file line number Diff line number Diff line change @@ -2866,17 +2866,28 @@ export class GitHubApi implements Disposable {
2866
2866
search += ` user:${ options . user } ` ;
2867
2867
}
2868
2868
2869
- if ( options ?. repos != null && options . repos . length > 0 ) {
2870
- const repo = ' repo:' ;
2871
- search += `${ repo } ${ options . repos . join ( repo ) } ` ;
2869
+ if ( options ?. repos ?. length ) {
2870
+ search += ` repo:${ options . repos . join ( ' repo:' ) } ` ;
2871
+ }
2872
+
2873
+ // Hack for now, ultimately this should be passed in
2874
+ const ignoredRepos = configuration . get ( 'launchpad.ignoredRepositories' ) ?? [ ] ;
2875
+ if ( ignoredRepos . length ) {
2876
+ search += ` -repo:${ ignoredRepos . join ( ' -repo:' ) } ` ;
2877
+ }
2878
+
2879
+ // Hack for now, ultimately this should be passed in
2880
+ const ignoredOrgs = configuration . get ( 'launchpad.ignoredOrganizations' ) ?? [ ] ;
2881
+ if ( ignoredOrgs . length ) {
2882
+ search += ` -org:${ ignoredOrgs . join ( ' -org:' ) } ` ;
2872
2883
}
2873
2884
2874
2885
const rsp = await this . graphql < SearchResult > (
2875
2886
provider ,
2876
2887
token ,
2877
2888
query ,
2878
2889
{
2879
- search : `${ search } is:pr is:open archived:false involves:@me ` . trim ( ) ,
2890
+ search : `is:open is:pr involves:@me archived:false ${ search } ` . trim ( ) ,
2880
2891
baseUrl : options ?. baseUrl ,
2881
2892
avatarSize : options ?. avatarSize ,
2882
2893
} ,
You can’t perform that action at this time.
0 commit comments