Unverified Commit 9cdc5a98 authored by Gautier de Saint Martin Lacaze's avatar Gautier de Saint Martin Lacaze
Browse files

Merge branch '5.0.x'

parents 4ece68e3 c81635c4
...@@ -43,4 +43,4 @@ jobs: ...@@ -43,4 +43,4 @@ jobs:
- name: GitLab4j verify - name: GitLab4j verify
id: gitlab4j-verify id: gitlab4j-verify
run: | run: |
./mvnw integration-test -B -V -Dmaven.javadoc.skip=true ./mvnw verify -B -V
...@@ -54,7 +54,7 @@ To utilize GitLab4J™ API in your Java project, simply add the following de ...@@ -54,7 +54,7 @@ To utilize GitLab4J™ API in your Java project, simply add the following de
```java ```java
dependencies { dependencies {
... ...
compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '5.0.0' compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '5.0.1'
} }
``` ```
...@@ -65,7 +65,7 @@ dependencies { ...@@ -65,7 +65,7 @@ dependencies {
<dependency> <dependency>
<groupId>org.gitlab4j</groupId> <groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api</artifactId> <artifactId>gitlab4j-api</artifactId>
<version>5.0.0</version> <version>5.0.1</version>
</dependency> </dependency>
``` ```
......
...@@ -135,21 +135,6 @@ ...@@ -135,21 +135,6 @@
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
...@@ -482,4 +467,29 @@ ...@@ -482,4 +467,29 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<profiles>
<profile>
<id>ossrh</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project> </project>
...@@ -139,7 +139,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -139,7 +139,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a list containing the jobs for the specified project ID and pipeline ID * @return a list containing the jobs for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Job> getJobsForPipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException { public List<Job> getJobsForPipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "jobs"); "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "jobs");
return (response.readEntity(new GenericType<List<Job>>() {})); return (response.readEntity(new GenericType<List<Job>>() {}));
...@@ -156,7 +156,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -156,7 +156,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a list containing the jobs for the specified project ID and pipeline ID * @return a list containing the jobs for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Job> getJobsForPipeline(Object projectIdOrPath, int pipelineId, JobScope scope) throws GitLabApiException { public List<Job> getJobsForPipeline(Object projectIdOrPath, long pipelineId, JobScope scope) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("scope", scope).withParam(PER_PAGE_PARAM, getDefaultPerPage()); GitLabApiForm formData = new GitLabApiForm().withParam("scope", scope).withParam(PER_PAGE_PARAM, getDefaultPerPage());
Response response = get(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "jobs"); Response response = get(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "jobs");
return (response.readEntity(new GenericType<List<Job>>() {})); return (response.readEntity(new GenericType<List<Job>>() {}));
...@@ -173,7 +173,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -173,7 +173,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a list containing the jobs for the specified project ID and pipeline ID * @return a list containing the jobs for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Pager<Job> getJobsForPipeline(Object projectIdOrPath, int pipelineId, int itemsPerPage) throws GitLabApiException { public Pager<Job> getJobsForPipeline(Object projectIdOrPath, long pipelineId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Job>(this, Job.class, itemsPerPage, getDefaultPerPageParam(), return (new Pager<Job>(this, Job.class, itemsPerPage, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "jobs")); "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "jobs"));
} }
...@@ -187,7 +187,7 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -187,7 +187,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a Stream containing the jobs for the specified project ID * @return a Stream containing the jobs for the specified project ID
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Stream<Job> getJobsStream(Object projectIdOrPath, int pipelineId) throws GitLabApiException { public Stream<Job> getJobsStream(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
return (getJobsForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage()).stream()); return (getJobsForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage()).stream());
} }
......
...@@ -133,7 +133,7 @@ public class NotificationSettingsApi extends AbstractApi { ...@@ -133,7 +133,7 @@ public class NotificationSettingsApi extends AbstractApi {
* @return a NotificationSettings instance containing the updated project notification settings * @return a NotificationSettings instance containing the updated project notification settings
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public NotificationSettings updateProjectNotificationSettings(int projectId, NotificationSettings settings) throws GitLabApiException { public NotificationSettings updateProjectNotificationSettings(long projectId, NotificationSettings settings) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("level", settings.getLevel()) .withParam("level", settings.getLevel())
......
...@@ -553,21 +553,21 @@ public class TestUserApi extends AbstractIntegrationTest { ...@@ -553,21 +553,21 @@ public class TestUserApi extends AbstractIntegrationTest {
assertEquals(3, memberships.size()); assertEquals(3, memberships.size());
Membership membership1 = memberships.get(0); Membership membership1 = memberships.get(0);
assertMembershipEquals(membership1, 1, "test-project", MembershipSourceType.PROJECT, AccessLevel.MAINTAINER); assertMembershipEquals(membership1, 1L, "test-project", MembershipSourceType.PROJECT, AccessLevel.MAINTAINER);
Membership membership2 = memberships.get(1); Membership membership2 = memberships.get(1);
assertMembershipEquals(membership2, 4, "Test Group", MembershipSourceType.NAMESPACE, AccessLevel.OWNER); assertMembershipEquals(membership2, 1L, "Test Group", MembershipSourceType.NAMESPACE, AccessLevel.OWNER);
Membership membership3 = memberships.get(2); Membership membership3 = memberships.get(2);
assertMembershipEquals(membership3, 5, "subgroup", MembershipSourceType.NAMESPACE, AccessLevel.OWNER); assertMembershipEquals(membership3, 1L, "subgroup", MembershipSourceType.NAMESPACE, AccessLevel.OWNER);
} }
private void assertMembershipEquals(Membership actualMembership, private void assertMembershipEquals(Membership actualMembership,
int expectedSourceId, long expectedSourceId,
String expectedSourceName, String expectedSourceName,
MembershipSourceType expectedSourceType, MembershipSourceType expectedSourceType,
AccessLevel expectedAccessLevel) { AccessLevel expectedAccessLevel) {
assertEquals(expectedSourceId, actualMembership.getSourceId().intValue()); assertEquals(expectedSourceId, actualMembership.getSourceId());
assertEquals(expectedSourceName, actualMembership.getSourceName()); assertEquals(expectedSourceName, actualMembership.getSourceName());
assertEquals(expectedSourceType, actualMembership.getSourceType()); assertEquals(expectedSourceType, actualMembership.getSourceType());
assertEquals(expectedAccessLevel, actualMembership.getAccessLevel()); assertEquals(expectedAccessLevel, actualMembership.getAccessLevel());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment