Skip to content

Commit f853d92

Browse files
authored
Add missing attributes in Label (#1162)
1 parent ec740d4 commit f853d92

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

src/main/java/org/gitlab4j/api/models/Label.java

+18
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ public class Label implements Serializable {
1313
private String name;
1414
private String color;
1515
private String description;
16+
private String descriptionHtml;
1617
private Integer openIssuesCount;
1718
private Integer closedIssuesCount;
1819
private Integer openMergeRequestsCount;
1920
private Boolean subscribed;
2021
private Integer priority;
22+
private Boolean isProjectLabel;
2123

2224
public Long getId() {
2325
return id;
@@ -66,6 +68,14 @@ public Label withDescription(String description) {
6668
return (this);
6769
}
6870

71+
public String getDescriptionHtml() {
72+
return descriptionHtml;
73+
}
74+
75+
public void setDescriptionHtml(String descriptionHtml) {
76+
this.descriptionHtml = descriptionHtml;
77+
}
78+
6979
public Integer getOpenIssuesCount() {
7080
return openIssuesCount;
7181
}
@@ -111,6 +121,14 @@ public Label withPriority(Integer priority) {
111121
return (this);
112122
}
113123

124+
public Boolean getIsProjectLabel() {
125+
return isProjectLabel;
126+
}
127+
128+
public void setIsProjectLabel(Boolean isProjectLabel) {
129+
this.isProjectLabel = isProjectLabel;
130+
}
131+
114132
@Override
115133
public String toString() {
116134
return (JacksonJson.toJsonString(this));

src/test/resources/org/gitlab4j/api/labels.json

+15-5
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,60 @@
44
"name" : "bug",
55
"color" : "#d9534f",
66
"description": "Bug reported by user",
7+
"description_html": "Bug reported by user",
78
"open_issues_count": 1,
89
"closed_issues_count": 0,
910
"open_merge_requests_count": 1,
1011
"subscribed": false,
11-
"priority": 10
12+
"priority": 10,
13+
"is_project_label": false
1214
},
1315
{
1416
"id" : 4,
1517
"color" : "#d9534f",
1618
"name" : "confirmed",
1719
"description": "Confirmed issue",
20+
"description_html": "Confirmed issue",
1821
"open_issues_count": 2,
1922
"closed_issues_count": 5,
2023
"open_merge_requests_count": 0,
21-
"subscribed": false
24+
"subscribed": false,
25+
"is_project_label": true
2226
},
2327
{
2428
"id" : 7,
2529
"name" : "critical",
2630
"color" : "#d9534f",
2731
"description": "Critical issue. Need fix ASAP",
32+
"description_html": "Critical issue. Need fix ASAP",
2833
"open_issues_count": 1,
2934
"closed_issues_count": 3,
3035
"open_merge_requests_count": 1,
31-
"subscribed": false
36+
"subscribed": false,
37+
"is_project_label": false
3238
},
3339
{
3440
"id" : 8,
3541
"name" : "documentation",
3642
"color" : "#f0ad4e",
3743
"description": "Issue about documentation",
44+
"description_html": "Issue about documentation",
3845
"open_issues_count": 1,
3946
"closed_issues_count": 0,
4047
"open_merge_requests_count": 2,
41-
"subscribed": false
48+
"subscribed": false,
49+
"is_project_label": false
4250
},
4351
{
4452
"id" : 9,
4553
"color" : "#5cb85c",
4654
"name" : "enhancement",
4755
"description": "Enhancement proposal",
56+
"description_html": "Enhancement proposal",
4857
"open_issues_count": 1,
4958
"closed_issues_count": 0,
5059
"open_merge_requests_count": 1,
51-
"subscribed": true
60+
"subscribed": true,
61+
"is_project_label": false
5262
}
5363
]

0 commit comments

Comments
 (0)