Skip to content

Commit 247ea80

Browse files
authored
Add WorkItemEvent (#1185)
1 parent b563bb1 commit 247ea80

File tree

9 files changed

+510
-1
lines changed

9 files changed

+510
-1
lines changed

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

+9
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
public abstract class AbstractEvent implements Event {
66
private static final long serialVersionUID = 1L;
77

8+
private String eventType;
89
private String requestUrl;
910
private String requestQueryString;
1011
private String secretToken;
1112

13+
public String getEventType() {
14+
return eventType;
15+
}
16+
17+
public void setEventType(String eventType) {
18+
this.eventType = eventType;
19+
}
20+
1221
@Override
1322
public void setRequestUrl(String requestUrl) {
1423
this.requestUrl = requestUrl;

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

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@JsonSubTypes({
1111
@JsonSubTypes.Type(value = BuildEvent.class, name = BuildEvent.OBJECT_KIND),
1212
@JsonSubTypes.Type(value = IssueEvent.class, name = IssueEvent.OBJECT_KIND),
13+
@JsonSubTypes.Type(value = WorkItemEvent.class, name = WorkItemEvent.OBJECT_KIND),
1314
@JsonSubTypes.Type(value = JobEvent.class, name = JobEvent.OBJECT_KIND),
1415
@JsonSubTypes.Type(value = MergeRequestEvent.class, name = MergeRequestEvent.OBJECT_KIND),
1516
@JsonSubTypes.Type(value = NoteEvent.class, name = NoteEvent.OBJECT_KIND),

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
public class EventLabel {
1212

1313
public enum LabelType {
14-
PROJECT_LABEL;
14+
PROJECT_LABEL,
15+
GROUP_LABEL;
1516

1617
private static JacksonJsonEnumHelper<LabelType> enumHelper =
1718
new JacksonJsonEnumHelper<>(LabelType.class, true, true);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,285 @@
1+
package org.gitlab4j.api.webhook;
2+
3+
import java.util.Date;
4+
import java.util.List;
5+
6+
import org.gitlab4j.api.utils.JacksonJson;
7+
8+
public class EventWorkItem {
9+
10+
private Long authorId;
11+
private Date closedAt;
12+
private Boolean confidential;
13+
private Date createdAt;
14+
private String description;
15+
private Date dueDate;
16+
private Long id;
17+
private Long iid;
18+
private Date lastEditedAt;
19+
private Long lastEditedById;
20+
private Long milestoneId;
21+
private Long projectId;
22+
private Long relativePosition;
23+
private Long stateId;
24+
private Integer timeEstimate;
25+
private String title;
26+
private Date updatedAt;
27+
private Long updatedById;
28+
private Integer weight;
29+
private String healthStatus;
30+
private String type;
31+
private String url;
32+
private Integer totalTimeSpent;
33+
private Integer timeChange;
34+
private List<Long> assigneeIds;
35+
private Long assigneeId;
36+
private List<EventLabel> labels;
37+
private String state;
38+
private String severity;
39+
private String action;
40+
41+
public Long getAuthorId() {
42+
return authorId;
43+
}
44+
45+
public void setAuthorId(Long authorId) {
46+
this.authorId = authorId;
47+
}
48+
49+
public Date getClosedAt() {
50+
return closedAt;
51+
}
52+
53+
public void setClosedAt(Date closedAt) {
54+
this.closedAt = closedAt;
55+
}
56+
57+
public Boolean getConfidential() {
58+
return confidential;
59+
}
60+
61+
public void setConfidential(Boolean confidential) {
62+
this.confidential = confidential;
63+
}
64+
65+
public Date getCreatedAt() {
66+
return createdAt;
67+
}
68+
69+
public void setCreatedAt(Date createdAt) {
70+
this.createdAt = createdAt;
71+
}
72+
73+
public String getDescription() {
74+
return description;
75+
}
76+
77+
public void setDescription(String description) {
78+
this.description = description;
79+
}
80+
81+
public Date getDueDate() {
82+
return dueDate;
83+
}
84+
85+
public void setDueDate(Date dueDate) {
86+
this.dueDate = dueDate;
87+
}
88+
89+
public Long getId() {
90+
return id;
91+
}
92+
93+
public void setId(Long id) {
94+
this.id = id;
95+
}
96+
97+
public Long getIid() {
98+
return iid;
99+
}
100+
101+
public void setIid(Long iid) {
102+
this.iid = iid;
103+
}
104+
105+
public Date getLastEditedAt() {
106+
return lastEditedAt;
107+
}
108+
109+
public void setLastEditedAt(Date lastEditedAt) {
110+
this.lastEditedAt = lastEditedAt;
111+
}
112+
113+
public Long getLastEditedById() {
114+
return lastEditedById;
115+
}
116+
117+
public void setLastEditedById(Long lastEditedById) {
118+
this.lastEditedById = lastEditedById;
119+
}
120+
121+
public Long getMilestoneId() {
122+
return milestoneId;
123+
}
124+
125+
public void setMilestoneId(Long milestoneId) {
126+
this.milestoneId = milestoneId;
127+
}
128+
129+
public Long getProjectId() {
130+
return projectId;
131+
}
132+
133+
public void setProjectId(Long projectId) {
134+
this.projectId = projectId;
135+
}
136+
137+
public Long getRelativePosition() {
138+
return relativePosition;
139+
}
140+
141+
public void setRelativePosition(Long relativePosition) {
142+
this.relativePosition = relativePosition;
143+
}
144+
145+
public Long getStateId() {
146+
return stateId;
147+
}
148+
149+
public void setStateId(Long stateId) {
150+
this.stateId = stateId;
151+
}
152+
153+
public Integer getTimeEstimate() {
154+
return timeEstimate;
155+
}
156+
157+
public void setTimeEstimate(Integer timeEstimate) {
158+
this.timeEstimate = timeEstimate;
159+
}
160+
161+
public String getTitle() {
162+
return title;
163+
}
164+
165+
public void setTitle(String title) {
166+
this.title = title;
167+
}
168+
169+
public Date getUpdatedAt() {
170+
return updatedAt;
171+
}
172+
173+
public void setUpdatedAt(Date updatedAt) {
174+
this.updatedAt = updatedAt;
175+
}
176+
177+
public Long getUpdatedById() {
178+
return updatedById;
179+
}
180+
181+
public void setUpdatedById(Long updatedById) {
182+
this.updatedById = updatedById;
183+
}
184+
185+
public Integer getWeight() {
186+
return weight;
187+
}
188+
189+
public void setWeight(Integer weight) {
190+
this.weight = weight;
191+
}
192+
193+
public String getHealthStatus() {
194+
return healthStatus;
195+
}
196+
197+
public void setHealthStatus(String healthStatus) {
198+
this.healthStatus = healthStatus;
199+
}
200+
201+
public String getType() {
202+
return type;
203+
}
204+
205+
public void setType(String type) {
206+
this.type = type;
207+
}
208+
209+
public String getUrl() {
210+
return url;
211+
}
212+
213+
public void setUrl(String url) {
214+
this.url = url;
215+
}
216+
217+
public Integer getTotalTimeSpent() {
218+
return totalTimeSpent;
219+
}
220+
221+
public void setTotalTimeSpent(Integer totalTimeSpent) {
222+
this.totalTimeSpent = totalTimeSpent;
223+
}
224+
225+
public Integer getTimeChange() {
226+
return timeChange;
227+
}
228+
229+
public void setTimeChange(Integer timeChange) {
230+
this.timeChange = timeChange;
231+
}
232+
233+
public List<Long> getAssigneeIds() {
234+
return assigneeIds;
235+
}
236+
237+
public void setAssigneeIds(List<Long> assigneeIds) {
238+
this.assigneeIds = assigneeIds;
239+
}
240+
241+
public Long getAssigneeId() {
242+
return assigneeId;
243+
}
244+
245+
public void setAssigneeId(Long assigneeId) {
246+
this.assigneeId = assigneeId;
247+
}
248+
249+
public List<EventLabel> getLabels() {
250+
return labels;
251+
}
252+
253+
public void setLabels(List<EventLabel> labels) {
254+
this.labels = labels;
255+
}
256+
257+
public String getState() {
258+
return state;
259+
}
260+
261+
public void setState(String state) {
262+
this.state = state;
263+
}
264+
265+
public String getSeverity() {
266+
return severity;
267+
}
268+
269+
public void setSeverity(String severity) {
270+
this.severity = severity;
271+
}
272+
273+
public String getAction() {
274+
return action;
275+
}
276+
277+
public void setAction(String action) {
278+
this.action = action;
279+
}
280+
281+
@Override
282+
public String toString() {
283+
return (JacksonJson.toJsonString(this));
284+
}
285+
}

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

+9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public class IssueChanges extends EventChanges {
66

77
private ChangeContainer<Date> dueDate;
88
private ChangeContainer<Boolean> confidential;
9+
private ChangeContainer<String> heathStatus;
910

1011
public ChangeContainer<Date> getDueDate() {
1112
return dueDate;
@@ -22,4 +23,12 @@ public ChangeContainer<Boolean> getConfidential() {
2223
public void setConfidential(ChangeContainer<Boolean> confidential) {
2324
this.confidential = confidential;
2425
}
26+
27+
public ChangeContainer<String> getHeathStatus() {
28+
return heathStatus;
29+
}
30+
31+
public void setHeathStatus(ChangeContainer<String> heathStatus) {
32+
this.heathStatus = heathStatus;
33+
}
2534
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package org.gitlab4j.api.webhook;
2+
3+
import java.util.Date;
4+
5+
public class WorkItemChanges extends EventChanges {
6+
private ChangeContainer<String> heathStatus;
7+
private ChangeContainer<Date> lastEditedAt;
8+
9+
public ChangeContainer<String> getHeathStatus() {
10+
return heathStatus;
11+
}
12+
13+
public void setHeathStatus(ChangeContainer<String> heathStatus) {
14+
this.heathStatus = heathStatus;
15+
}
16+
17+
public ChangeContainer<Date> getLastEditedAt() {
18+
return lastEditedAt;
19+
}
20+
21+
public void setLastEditedAt(ChangeContainer<Date> lastEditedAt) {
22+
this.lastEditedAt = lastEditedAt;
23+
}
24+
}

0 commit comments

Comments
 (0)