Skip to content

Commit 1737dd4

Browse files
committed
Added support for and testing of user_username field (#416).
1 parent 5342c49 commit 1737dd4

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

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

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public abstract class AbstractPushEvent {
1515

1616
private Integer userId;
1717
private String userName;
18+
private String userUsername;
1819
private String userEmail;
1920
private String userAvatar;
2021

@@ -37,23 +38,23 @@ public void setEventName(String eventName) {
3738
}
3839

3940
public String getAfter() {
40-
return this.after;
41+
return after;
4142
}
4243

4344
public void setAfter(String after) {
4445
this.after = after;
4546
}
4647

4748
public String getBefore() {
48-
return this.before;
49+
return before;
4950
}
5051

5152
public void setBefore(String before) {
5253
this.before = before;
5354
}
5455

5556
public String getRef() {
56-
return this.ref;
57+
return ref;
5758
}
5859

5960
public void setRef(String ref) {
@@ -69,21 +70,29 @@ public void setCheckoutSha(String checkoutSha) {
6970
}
7071

7172
public Integer getUserId() {
72-
return this.userId;
73+
return userId;
7374
}
7475

7576
public void setUserId(Integer userId) {
7677
this.userId = userId;
7778
}
7879

7980
public String getUserName() {
80-
return this.userName;
81+
return userName;
8182
}
8283

8384
public void setUserName(String userName) {
8485
this.userName = userName;
8586
}
8687

88+
public String getUserUsername() {
89+
return userUsername;
90+
}
91+
92+
public void setUserUsername(String userUsername) {
93+
this.userUsername = userUsername;
94+
}
95+
8796
public String getUserEmail() {
8897
return userEmail;
8998
}
@@ -101,7 +110,7 @@ public void setUserAvatar(String userAvatar) {
101110
}
102111

103112
public Integer getProjectId() {
104-
return this.projectId;
113+
return projectId;
105114
}
106115

107116
public void setProjectId(Integer projectId) {
@@ -117,23 +126,23 @@ public void setProject(EventProject project) {
117126
}
118127

119128
public EventRepository getRepository() {
120-
return this.repository;
129+
return repository;
121130
}
122131

123132
public void setRepository(EventRepository repository) {
124133
this.repository = repository;
125134
}
126135

127136
public List<EventCommit> getCommits() {
128-
return this.commits;
137+
return commits;
129138
}
130139

131140
public void setCommits(List<EventCommit> commits) {
132141
this.commits = commits;
133142
}
134143

135144
public Integer getTotalCommitsCount() {
136-
return this.totalCommitsCount;
145+
return totalCommitsCount;
137146
}
138147

139148
public void setTotalCommitsCount(Integer totalCommitsCount) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
77
"user_id": 4,
88
"user_name": "John Smith",
9+
"user_username": "jsmith",
910
"user_email": "john@example.com",
1011
"user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80",
1112
"project_id": 15,

0 commit comments

Comments
 (0)