Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing attributes in Label #1162

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
]
Loading