Skip to content

Commit

Permalink
Add missing attributes in Label (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmini committed Sep 19, 2024
1 parent ec740d4 commit f853d92
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
18 changes: 18 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Label.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ public class Label implements Serializable {
private String name;
private String color;
private String description;
private String descriptionHtml;
private Integer openIssuesCount;
private Integer closedIssuesCount;
private Integer openMergeRequestsCount;
private Boolean subscribed;
private Integer priority;
private Boolean isProjectLabel;

public Long getId() {
return id;
Expand Down Expand Up @@ -66,6 +68,14 @@ public Label withDescription(String description) {
return (this);
}

public String getDescriptionHtml() {
return descriptionHtml;
}

public void setDescriptionHtml(String descriptionHtml) {
this.descriptionHtml = descriptionHtml;
}

public Integer getOpenIssuesCount() {
return openIssuesCount;
}
Expand Down Expand Up @@ -111,6 +121,14 @@ public Label withPriority(Integer priority) {
return (this);
}

public Boolean getIsProjectLabel() {
return isProjectLabel;
}

public void setIsProjectLabel(Boolean isProjectLabel) {
this.isProjectLabel = isProjectLabel;
}

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
20 changes: 15 additions & 5 deletions src/test/resources/org/gitlab4j/api/labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,60 @@
"name" : "bug",
"color" : "#d9534f",
"description": "Bug reported by user",
"description_html": "Bug reported by user",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1,
"subscribed": false,
"priority": 10
"priority": 10,
"is_project_label": false
},
{
"id" : 4,
"color" : "#d9534f",
"name" : "confirmed",
"description": "Confirmed issue",
"description_html": "Confirmed issue",
"open_issues_count": 2,
"closed_issues_count": 5,
"open_merge_requests_count": 0,
"subscribed": false
"subscribed": false,
"is_project_label": true
},
{
"id" : 7,
"name" : "critical",
"color" : "#d9534f",
"description": "Critical issue. Need fix ASAP",
"description_html": "Critical issue. Need fix ASAP",
"open_issues_count": 1,
"closed_issues_count": 3,
"open_merge_requests_count": 1,
"subscribed": false
"subscribed": false,
"is_project_label": false
},
{
"id" : 8,
"name" : "documentation",
"color" : "#f0ad4e",
"description": "Issue about documentation",
"description_html": "Issue about documentation",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 2,
"subscribed": false
"subscribed": false,
"is_project_label": false
},
{
"id" : 9,
"color" : "#5cb85c",
"name" : "enhancement",
"description": "Enhancement proposal",
"description_html": "Enhancement proposal",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1,
"subscribed": true
"subscribed": true,
"is_project_label": false
}
]

0 comments on commit f853d92

Please sign in to comment.