File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ public class GroupScript implements Callable<Integer> {
3535 @ Option (names = { "-g" , "--group" }, description = "group id" )
3636 private String group ;
3737
38+ @ Option (names = { "-s" , "--skip" }, description = "skipped group ids" )
39+ private List <Integer > skipped ;
40+
3841 @ Option (names = { "-c" , "--config" }, description = "configuration file location" )
3942 String configFile ;
4043
@@ -85,9 +88,13 @@ public Integer call() throws Exception {
8588 break ;
8689 case GET_DESCENDANT_GROUPS :
8790 ensureExists (group , "group" );
91+ GroupFilter filter = new GroupFilter ()
92+ .withAllAvailable (true );
93+ if (skipped != null ) {
94+ filter .withSkipGroups (skipped );
95+ }
8896 var descendantGroups = gitLabApi .getGroupApi ()
89- .getDescendantGroups (idOrPath (group ), new GroupFilter ()
90- .withAllAvailable (true ));
97+ .getDescendantGroups (idOrPath (group ), filter );
9198 for (Group g : descendantGroups ) {
9299 System .out .println (g .getFullName ());
93100 }
You can’t perform that action at this time.
0 commit comments