Skip to content

Commit 5391d2c

Browse files
jminimifitous
andauthored
Add missing object attributes in merge request events (#937)
Co-authored-by: Michael Fitoussi <[email protected]>
1 parent d4b0e56 commit 5391d2c

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java

+36
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class EventMergeRequest {
1919
private Long iid;
2020
private String mergeCommitSha;
2121
private String mergeStatus;
22+
private String detailedMergeStatus;
2223
private Long milestoneId;
2324
private Integer position;
2425
private Date lockedAt;
@@ -36,8 +37,11 @@ public class EventMergeRequest {
3637
private EventProject source;
3738
private EventProject target;
3839
private EventCommit lastCommit;
40+
private Boolean blockingDiscussionsResolved;
3941
private Boolean workInProgress;
42+
private Boolean firstContribution;
4043
private String url;
44+
private List<EventLabel> labels;
4145
private String action;
4246
private Assignee assignee;
4347

@@ -134,6 +138,14 @@ public void setMergeStatus(String mergeStatus) {
134138
this.mergeStatus = mergeStatus;
135139
}
136140

141+
public String getDetailedMergeStatus() {
142+
return detailedMergeStatus;
143+
}
144+
145+
public void setDetailedMergeStatus(String detailedMergeStatus) {
146+
this.detailedMergeStatus = detailedMergeStatus;
147+
}
148+
137149
public Long getMilestoneId() {
138150
return this.milestoneId;
139151
}
@@ -262,6 +274,14 @@ public void setLastCommit(EventCommit lastCommit) {
262274
this.lastCommit = lastCommit;
263275
}
264276

277+
public Boolean getBlockingDiscussionsResolved() {
278+
return blockingDiscussionsResolved;
279+
}
280+
281+
public void setBlockingDiscussionsResolved(Boolean blockingDiscussionsResolved) {
282+
this.blockingDiscussionsResolved = blockingDiscussionsResolved;
283+
}
284+
265285
public Boolean getWorkInProgress() {
266286
return workInProgress;
267287
}
@@ -270,6 +290,14 @@ public void setWorkInProgress(Boolean workInProgress) {
270290
this.workInProgress = workInProgress;
271291
}
272292

293+
public Boolean getFirstContribution() {
294+
return firstContribution;
295+
}
296+
297+
public void setFirstContribution(Boolean firstContribution) {
298+
this.firstContribution = firstContribution;
299+
}
300+
273301
public String getUrl() {
274302
return url;
275303
}
@@ -278,6 +306,14 @@ public void setUrl(String url) {
278306
this.url = url;
279307
}
280308

309+
public List<EventLabel> getLabels() {
310+
return labels;
311+
}
312+
313+
public void setLabels(List<EventLabel> labels) {
314+
this.labels = labels;
315+
}
316+
281317
public String getAction() {
282318
return action;
283319
}

src/test/resources/org/gitlab4j/api/merge-request-event.json

+19-1
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@
4747
"title": "MS-Viewport",
4848
"created_at": "2013-12-03T17:23:34Z",
4949
"updated_at": "2013-12-03T17:23:34Z",
50+
"milestone_id": 1,
5051
"state": "opened",
52+
"blocking_discussions_resolved": true,
5153
"work_in_progress": false,
54+
"first_contribution": true,
5255
"merge_status": "unchecked",
5356
"target_project_id": 14,
5457
"description": "",
@@ -95,7 +98,22 @@
9598
"email": "gitlabdev@dv6700.(none)"
9699
}
97100
},
98-
"action": "open"
101+
"labels": [
102+
{
103+
"id": 206,
104+
"title": "API",
105+
"color": "#ffffff",
106+
"project_id": 14,
107+
"created_at": "2013-12-03T17:15:43Z",
108+
"updated_at": "2013-12-03T17:15:43Z",
109+
"template": false,
110+
"description": "API related issues",
111+
"type": "ProjectLabel",
112+
"group_id": 41
113+
}
114+
],
115+
"action": "open",
116+
"detailed_merge_status": "mergeable"
99117
},
100118
"labels": [
101119
{

0 commit comments

Comments
 (0)