Skip to content

Commit 2f85b81

Browse files
authored
Add "id" to Event (#960)
Fixes #883
1 parent 73c78a1 commit 2f85b81

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
public class Event {
1010

11+
private Long id;
1112
private String actionName;
1213
private Author author;
1314
private Long authorId;
@@ -24,6 +25,14 @@ public class Event {
2425
private Note note;
2526
private PushData pushData;
2627

28+
public Long getId() {
29+
return this.id;
30+
}
31+
32+
public void setId(Long id) {
33+
this.id = id;
34+
}
35+
2736
public String getActionName() {
2837
return actionName;
2938
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"id": 2,
23
"title": "this is a title",
34
"project_id": 15,
45
"action_name": "pushed",

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
[
22
{
3+
"id": 8,
34
"title": "no title",
45
"project_id": 15,
56
"action_name": "closed",
67
"target_id": 830,
8+
"target_iid": 160,
79
"target_type": "Issue",
810
"author_id": 1,
911
"target_title": "Public project search field",
12+
"created_at": "2017-02-09T10:43:19.667Z",
1013
"author": {
1114
"name": "Dmitriy Zaporozhets",
1215
"username": "root",
@@ -18,6 +21,7 @@
1821
"author_username": "root"
1922
},
2023
{
24+
"id": 9,
2125
"title": "no title 2",
2226
"project_id": 15,
2327
"action_name": "pushed",
@@ -42,6 +46,7 @@
4246
}
4347
},
4448
{
49+
"id": 21,
4550
"project_id": 15,
4651
"action_name": "closed",
4752
"target_id": 840,
@@ -59,10 +64,12 @@
5964
"author_username": "root"
6065
},
6166
{
67+
"id": 10,
6268
"title": "no title again",
6369
"project_id": 15,
6470
"action_name": "commented on",
6571
"target_id": 1312,
72+
"target_iid": 1312,
6673
"target_type": "Note",
6774
"author_id": 1,
6875
"created_at": "2015-12-04T10:33:58.089Z",
@@ -80,7 +87,8 @@
8087
"created_at": "2015-12-04T10:33:56.698Z",
8188
"system": false,
8289
"noteable_id": 377,
83-
"noteable_type": "Issue"
90+
"noteable_type": "Issue",
91+
"noteable_iid": 377
8492
},
8593
"author": {
8694
"name": "Dmitriy Zaporozhets",

0 commit comments

Comments
 (0)