File tree Expand file tree Collapse file tree
src/main/java/com/junichi11/netbeans/modules/github/issues/repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -614,10 +614,25 @@ public Collection<GitHubQuery> getQueries() {
614614 if (queries == null ) {
615615 queries = new HashSet <>();
616616 // add default queries
617- if (isCollaborator ()) {
618- addQuery (GitHubDefaultQueries .create (this , Type .ASSIGNED_TO_ME ));
617+ GitHubIssuesOptions options = GitHubIssuesOptions .getInstance ();
618+ Map <Type , Boolean > defaultQueryOptions = options .getDefaultQueryOptions ();
619+ for (Map .Entry <Type , Boolean > entrySet : defaultQueryOptions .entrySet ()) {
620+ Type type = entrySet .getKey ();
621+ Boolean isEnabled = entrySet .getValue ();
622+ if (!isEnabled ) {
623+ continue ;
624+ }
625+ switch (type ) {
626+ case ASSIGNED_TO_ME :
627+ if (!isCollaborator ()) {
628+ continue ;
629+ }
630+ break ;
631+ default :
632+ break ;
633+ }
634+ addQuery (GitHubDefaultQueries .create (this , type ));
619635 }
620- addQuery (GitHubDefaultQueries .create (this , Type .CREATED_BY_ME ));
621636
622637 // add user queries
623638 String [] queryNames = GitHubIssuesConfig .getInstance ().getQueryNames (this );
You can’t perform that action at this time.
0 commit comments