Skip to content

Commit 555b4ac

Browse files
luvarqppjmini
andauthored
Add pipeline id attribute to BuildEvent class (#999)
Co-authored-by: Jeremie Bresson <[email protected]>
1 parent c07a4c4 commit 555b4ac

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.gitlab4j.api.utils.JacksonJson;
77

88
/**
9-
* The documentation at: <a href="https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#job-events">
9+
* The documentation at: <a href="https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#job-events">
1010
* Job Events</a> is incorrect, this class represents the actual content of the Job Hook event.
1111
*/
1212
public class BuildEvent extends AbstractEvent {
@@ -28,6 +28,8 @@ public class BuildEvent extends AbstractEvent {
2828
private Boolean buildAllowFailure;
2929
private String buildFailureReason;
3030
private Long projectId;
31+
32+
private Long pipelineId;
3133
private String projectName;
3234
private User user;
3335
private BuildCommit commit;
@@ -155,6 +157,14 @@ public void setProjectId(Long projectId) {
155157
this.projectId = projectId;
156158
}
157159

160+
public Long getPipelineId() {
161+
return pipelineId;
162+
}
163+
164+
public void setPipelineId(Long pipelineId) {
165+
this.pipelineId = pipelineId;
166+
}
167+
158168
public String getProjectName() {
159169
return projectName;
160170
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"build_duration": 0.05880817,
1313
"build_allow_failure": false,
1414
"build_failure_reason": "unknown_failure",
15+
"pipeline_id": 2366,
1516
"project_id": 3115610,
1617
"project_name": "GitLab4J / test-project",
1718
"user": {

0 commit comments

Comments
 (0)