Skip to content

Commit

Permalink
Merge branch 'gitlab4j:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
otary authored Jan 3, 2025
2 parents d490e50 + d1e1f05 commit a20807b
Show file tree
Hide file tree
Showing 26 changed files with 1,414 additions and 125 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To utilize GitLab4J™ API in your Java project, simply add the following de
```java
dependencies {
...
implementation group: 'org.gitlab4j', name: 'gitlab4j-api', version: '6.0.0-rc.7'
implementation group: 'org.gitlab4j', name: 'gitlab4j-api', version: '6.0.0-rc.8'
}
```

Expand All @@ -40,7 +40,7 @@ dependencies {
<dependency>
<groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api</artifactId>
<version>6.0.0-rc.7</version>
<version>6.0.0-rc.8</version>
</dependency>
```

Expand All @@ -51,7 +51,7 @@ dependencies {
Just add this line at the top of your script:

```java
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.7
//DEPS org.gitlab4j:gitlab4j-api:6.0.0-rc.8
```

**Ivy and SBT**<br/>
Expand Down Expand Up @@ -146,7 +146,7 @@ Those projects might want to use the Jackson-based model classes, and implement
```java
dependencies {
...
implementation 'org.gitlab4j:gitlab4j-models:6.0.0-rc.7'
implementation 'org.gitlab4j:gitlab4j-models:6.0.0-rc.8'
}
```

Expand All @@ -155,7 +155,7 @@ dependencies {
<dependency>
<groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-models</artifactId>
<version>6.0.0-rc.7</version>
<version>6.0.0-rc.8</version>
</dependency>
```

Expand Down
1,137 changes: 1,041 additions & 96 deletions gitlab4j-api/src/main/java/org/gitlab4j/api/BoardsApi.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class AbstractEpic<E extends AbstractEpic<E>> extends AbstractMinimalEpic<E> implements Serializable {
private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -45,9 +46,16 @@ public String toString() {
private References references;
private Author author;
private List<String> labels;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date startDate;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date dueDate;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date endDate;

private Date createdAt;
private Date updatedAt;
private Date closedAt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public abstract class AbstractUser<U extends AbstractUser<U>> implements Seriali
private Long id;
private String name;
private String state;
private Boolean locked;
private String username;
private String webUrl;

Expand Down Expand Up @@ -60,6 +61,14 @@ public void setName(String name) {
this.name = name;
}

public Boolean getLocked() {
return locked;
}

public void setLocked(Boolean locked) {
this.locked = locked;
}

public String getState() {
return state;
}
Expand Down
56 changes: 55 additions & 1 deletion gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ public class Board implements Serializable {

private Long id;
private String name;
private Boolean hideBacklogList;
private Boolean hideClosedList;
private Project project;
private Milestone milestone;
private List<BoardList> lists;
private Group group;
private Milestone milestone;
private Assignee assignee;
private List<Label> labels;
private Integer weight;

public Long getId() {
return id;
Expand All @@ -30,6 +36,22 @@ public void setName(String name) {
this.name = name;
}

public Boolean getHideBacklogList() {
return hideBacklogList;
}

public void setHideBacklogList(Boolean hideBacklogList) {
this.hideBacklogList = hideBacklogList;
}

public Boolean getHideClosedList() {
return hideClosedList;
}

public void setHideClosedList(Boolean hideClosedList) {
this.hideClosedList = hideClosedList;
}

public Project getProject() {
return project;
}
Expand All @@ -54,6 +76,38 @@ public void setLists(List<BoardList> lists) {
this.lists = lists;
}

public Group getGroup() {
return group;
}

public void setGroup(Group group) {
this.group = group;
}

public Assignee getAssignee() {
return assignee;
}

public void setAssignee(Assignee assignee) {
this.assignee = assignee;
}

public List<Label> getLabels() {
return labels;
}

public void setLabels(List<Label> labels) {
this.labels = labels;
}

public Integer getWeight() {
return weight;
}

public void setWeight(Integer weight) {
this.weight = weight;
}

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ public class BoardList implements Serializable {
private Long id;
private Label label;
private Integer position;
private Assignee assignee;
private Milestone milestone;
private Iteration iteration;
private Integer maxIssueCount;
private Integer maxIssueWeight;
private Integer limitMetric;
private String listType;

public Long getId() {
return id;
Expand All @@ -35,6 +42,62 @@ public void setPosition(Integer position) {
this.position = position;
}

public Assignee getAssignee() {
return assignee;
}

public void setAssignee(Assignee assignee) {
this.assignee = assignee;
}

public Milestone getMilestone() {
return milestone;
}

public void setMilestone(Milestone milestone) {
this.milestone = milestone;
}

public Iteration getIteration() {
return iteration;
}

public void setIteration(Iteration iteration) {
this.iteration = iteration;
}

public Integer getMaxIssueCount() {
return maxIssueCount;
}

public void setMaxIssueCount(Integer maxIssueCount) {
this.maxIssueCount = maxIssueCount;
}

public Integer getMaxIssueWeight() {
return maxIssueWeight;
}

public void setMaxIssueWeight(Integer maxIssueWeight) {
this.maxIssueWeight = maxIssueWeight;
}

public Integer getLimitMetric() {
return limitMetric;
}

public void setLimitMetric(Integer limitMetric) {
this.limitMetric = limitMetric;
}

public String getListType() {
return listType;
}

public void setListType(String listType) {
this.listType = listType;
}

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@

import org.gitlab4j.models.utils.JacksonJson;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class Epic extends AbstractEpic<Epic> {
private static final long serialVersionUID = 1L;

private Boolean startDateIsFixed;
private Boolean dueDateIsFixed;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date dueDateFromInheritedSource;

private Boolean subscribed;

public Boolean getStartDateIsFixed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class ImpersonationToken implements Serializable {
private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -52,6 +53,8 @@ public String toString() {
private Date createdAt;
private Date lastUsedAt;
private Boolean impersonation;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date expiresAt;

public Boolean getActive() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class Iteration implements Serializable {
private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -52,8 +53,13 @@ public String toString() {
private IterationState state;
private Date createdAt;
private Date updatedAt;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date startDate;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date dueDate;

private String webUrl;

public Long getId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class Label implements Serializable {
private String color;
private String description;
private String descriptionHtml;
private String textColor;
private Integer openIssuesCount;
private Integer closedIssuesCount;
private Integer openMergeRequestsCount;
Expand Down Expand Up @@ -77,6 +78,14 @@ public void setDescriptionHtml(String descriptionHtml) {
this.descriptionHtml = descriptionHtml;
}

public String getTextColor() {
return textColor;
}

public void setTextColor(String textColor) {
this.textColor = textColor;
}

public Integer getOpenIssuesCount() {
return openIssuesCount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
import org.gitlab4j.models.Constants;
import org.gitlab4j.models.utils.JacksonJson;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class ProjectAccessToken implements Serializable {
private static final long serialVersionUID = 1L;

private Long userId;
private List<Constants.ProjectAccessTokenScope> scopes;
private String name;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date expiresAt;

private Long id;
private Boolean active;
private Date createdAt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@

import org.gitlab4j.models.utils.JacksonJson;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class RelatedEpic extends AbstractEpic<RelatedEpic> {
private static final long serialVersionUID = 1L;

private Boolean startDateIsFixed;
private Boolean dueDateIsFixed;

@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date dueDateFromInheritedSource;

private Long relatedEpicLinkId;
private LinkType linkType;
private Date linkCreatedAt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,23 @@ public void testBlame() throws Exception {
}

@Test
public void testBoard() throws Exception {
public void testProjectBoard() throws Exception {
List<Board> boards = unmarshalResourceList(Board.class, "project-board.json");
assertTrue(compareJson(boards, "project-board.json"));
}

@Test
public void testGroupBoard() throws Exception {
List<Board> boards = unmarshalResourceList(Board.class, "group-board.json");
assertTrue(compareJson(boards, "group-board.json"));
}

@Test
public void testGroupEpicBoard() throws Exception {
Board board = unmarshalResource(Board.class, "group-epic-board.json");
assertTrue(compareJson(board, "group-epic-board.json"));
}

@Test
public void testBranch() throws Exception {

Expand Down
Loading

0 comments on commit a20807b

Please sign in to comment.