1
1
///usr/bin/env jbang "$0" "$@" ; exit $?
2
2
3
3
//DEPS info.picocli:picocli:4.6.3
4
- //DEPS org. gitlab4j:gitlab4j -api:6.0.0-rc.7
4
+ //DEPS https://github.com/jmini/ gitlab4j-api/commit/157f0b160aaec6fff02d817907f1643de2dc23c0
5
5
//JAVA 17
6
6
7
7
import java .io .FileInputStream ;
@@ -72,7 +72,7 @@ public Integer call() throws Exception {
72
72
System .out .println ("Global search..." );
73
73
SearchScope <Object > globalSearchScope = SearchScope .forValue (scope );
74
74
if (globalSearchScope == null ) {
75
- System .out .println ("Value '" + scope + "' is not expected for '--scope'" );
75
+ System .out .println ("Value '" + scope + "' is not expected for '--scope', possible values: " + SearchScope . values () );
76
76
return 1 ;
77
77
}
78
78
@@ -81,15 +81,15 @@ public Integer call() throws Exception {
81
81
System .out .println ("Project search..." );
82
82
ProjectSearchScope <Object > projectSearchScope = ProjectSearchScope .forValue (scope );
83
83
if (projectSearchScope == null ) {
84
- System .out .println ("Value '" + scope + "' is not expected for '--scope'" );
84
+ System .out .println ("Value '" + scope + "' is not expected for '--scope', possible values: " + ProjectSearchScope . values () );
85
85
return 1 ;
86
86
}
87
87
result = searchApi .projectSearch (idOrPath (project ), projectSearchScope , query );
88
88
} else if (group != null ) {
89
89
System .out .println ("Group search..." );
90
90
GroupSearchScope <Object > groupSearchScope = GroupSearchScope .forValue (scope );
91
91
if (groupSearchScope == null ) {
92
- System .out .println ("Value '" + scope + "' is not expected for '--scope'" );
92
+ System .out .println ("Value '" + scope + "' is not expected for '--scope', possible values: " + GroupSearchScope . values () );
93
93
return 1 ;
94
94
}
95
95
result = searchApi .groupSearch (idOrPath (group ), groupSearchScope , query );
0 commit comments