Skip to content

Commit 8a5c1c4

Browse files
committed
Update to "6.0.0-rc.7"
1 parent d7cf6d7 commit 8a5c1c4

20 files changed

+49
-79
lines changed

gitlab4j-test/AccessTokenScript.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS https://github.com/gitlab4j/gitlab4j-api/commit/5805b41bae64b6c287abdbd51f63ce84d1ec8b90
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.FileInputStream;
@@ -10,18 +10,10 @@
1010
import java.nio.file.Files;
1111
import java.nio.file.Path;
1212
import java.nio.file.Paths;
13-
import java.util.ArrayList;
14-
import java.util.Date;
15-
import java.util.List;
16-
import java.util.Objects;
1713
import java.util.Properties;
1814
import java.util.concurrent.Callable;
1915

20-
import org.gitlab4j.api.Constants.ProjectAccessTokenScope;
2116
import org.gitlab4j.api.GitLabApi;
22-
import org.gitlab4j.api.GitLabApiException;
23-
import org.gitlab4j.api.models.AccessLevel;
24-
import org.gitlab4j.api.models.ProjectAccessToken;
2517

2618
import picocli.CommandLine;
2719
import picocli.CommandLine.Command;

gitlab4j-test/EpicScript.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS https://github.com/jmini/gitlab4j-api/commit/632279d454d90469be99d8f6059285e1a7524931
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.FileInputStream;
8-
import java.io.InputStream;
98
import java.io.IOException;
9+
import java.io.InputStream;
1010
import java.nio.file.Files;
1111
import java.nio.file.Path;
1212
import java.nio.file.Paths;
13-
import java.util.concurrent.Callable;
1413
import java.util.Date;
1514
import java.util.List;
1615
import java.util.Properties;
16+
import java.util.concurrent.Callable;
1717

1818
import org.gitlab4j.api.GitLabApi;
1919
import org.gitlab4j.api.models.*;

gitlab4j-test/FileUploadScript.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS https://github.com/gitlab4j/gitlab4j-api/commit/5805b41bae64b6c287abdbd51f63ce84d1ec8b90
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.FileInputStream;
@@ -70,18 +70,16 @@ public Integer call() throws Exception {
7070
filename = fileToUpload.getFileName()
7171
.toString();
7272
}
73-
if(project == null && group == null) {
73+
if (project == null && group == null) {
7474
throw new IllegalStateException("Project or group is mandatory");
75-
} else if(project != null && group != null) {
75+
} else if (project != null && group != null) {
7676
throw new IllegalStateException("Project and group can't be set at the same time");
77-
} else if(project != null) {
77+
} else if (project != null) {
7878
FileUpload uplaodedFile = gitLabApi.getProjectApi()
7979
.uploadFile(idOrPath(project), Files.newInputStream(fileToUpload), filename, null);
8080
System.out.println(uplaodedFile);
81-
} else if(group != null) {
82-
FileUpload uplaodedFile = gitLabApi.getGroupApi()
83-
.uploadFile(idOrPath(group), Files.newInputStream(fileToUpload), filename, null);
84-
System.out.println(uplaodedFile);
81+
} else if (group != null) {
82+
throw new IllegalStateException("Upload on goup is not available, see: https://gitlab.com/gitlab-org/gitlab/-/issues/329615");
8583
}
8684
}
8785
return 0;
@@ -90,12 +88,11 @@ public Integer call() throws Exception {
9088
private GitLabApi createGitLabApi(String gitLabUrl, String gitLabAuthValue) {
9189
if (logHttp != null && logHttp) {
9290
return new GitLabApi(gitLabUrl, gitLabAuthValue)
93-
.withRequestResponseLogging(java.util.logging.Level.INFO) ;
91+
.withRequestResponseLogging(java.util.logging.Level.INFO);
9492
}
9593
return new GitLabApi(gitLabUrl, gitLabAuthValue);
9694
}
9795

98-
9996
private void filePathMandatory() {
10097
if (filePath == null) {
10198
throw new IllegalStateException("File is mandatory");

gitlab4j-test/GitLabCiYamlScript.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS org.gitlab4j:gitlab4j-api:5.6.0
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

7-
import java.io.File;
87
import java.io.FileInputStream;
98
import java.io.IOException;
109
import java.io.InputStream;

gitlab4j-test/GitLabScript.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

3-
//DEPS org.gitlab4j:gitlab4j-api:5.6.0
3+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
44
//JAVA 17
55

66
import java.util.logging.Level;

gitlab4j-test/GroupAccessTokenScript.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS https://github.com/jmini/gitlab4j-api/commit/0cca2d8adef178b25fd6b53afe489c7f5ccc2394
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.FileInputStream;

gitlab4j-test/GroupScript.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS https://github.com/gitlab4j/gitlab4j-api/commit/5805b41bae64b6c287abdbd51f63ce84d1ec8b90
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.FileInputStream;
@@ -15,7 +15,6 @@
1515

1616
import org.gitlab4j.api.GitLabApi;
1717
import org.gitlab4j.api.models.*;
18-
import org.gitlab4j.api.models.ImpersonationToken.Scope;
1918

2019
import picocli.CommandLine;
2120
import picocli.CommandLine.Command;

gitlab4j-test/IssueScript.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS https://github.com/jmini/gitlab4j-api/commit/436fb4edadb6b72641dbf836ee4fdb792ac0ab32
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.FileInputStream;

gitlab4j-test/IterationScript.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS org.gitlab4j:gitlab4j-api:5.6.0
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.FileInputStream;
@@ -10,14 +10,11 @@
1010
import java.nio.file.Files;
1111
import java.nio.file.Path;
1212
import java.nio.file.Paths;
13-
import java.util.Arrays;
1413
import java.util.Date;
1514
import java.util.List;
1615
import java.util.Properties;
1716
import java.util.concurrent.Callable;
18-
import java.util.stream.Collectors;
1917

20-
import org.gitlab4j.api.Constants.*;
2118
import org.gitlab4j.api.*;
2219
import org.gitlab4j.api.models.*;
2320

gitlab4j-test/JobScript.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
22

33
//DEPS info.picocli:picocli:4.6.3
4-
//DEPS org.gitlab4j:gitlab4j-api:5.6.0
4+
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
55
//JAVA 17
66

77
import java.io.*;

0 commit comments

Comments
 (0)