Unverified Commit 555b4acc authored by luvarqpp's avatar luvarqpp Committed by GitHub
Browse files

Add pipeline id attribute to BuildEvent class (#999)



Co-authored-by: default avatarJeremie Bresson <jeremie.bresson@unblu.com>
parent c07a4c4f
...@@ -6,7 +6,7 @@ import org.gitlab4j.api.models.User; ...@@ -6,7 +6,7 @@ import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
/** /**
* The documentation at: <a href="https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#job-events"> * The documentation at: <a href="https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#job-events">
* Job Events</a> is incorrect, this class represents the actual content of the Job Hook event. * Job Events</a> is incorrect, this class represents the actual content of the Job Hook event.
*/ */
public class BuildEvent extends AbstractEvent { public class BuildEvent extends AbstractEvent {
...@@ -28,6 +28,8 @@ public class BuildEvent extends AbstractEvent { ...@@ -28,6 +28,8 @@ public class BuildEvent extends AbstractEvent {
private Boolean buildAllowFailure; private Boolean buildAllowFailure;
private String buildFailureReason; private String buildFailureReason;
private Long projectId; private Long projectId;
private Long pipelineId;
private String projectName; private String projectName;
private User user; private User user;
private BuildCommit commit; private BuildCommit commit;
...@@ -155,6 +157,14 @@ public class BuildEvent extends AbstractEvent { ...@@ -155,6 +157,14 @@ public class BuildEvent extends AbstractEvent {
this.projectId = projectId; this.projectId = projectId;
} }
public Long getPipelineId() {
return pipelineId;
}
public void setPipelineId(Long pipelineId) {
this.pipelineId = pipelineId;
}
public String getProjectName() { public String getProjectName() {
return projectName; return projectName;
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"build_duration": 0.05880817, "build_duration": 0.05880817,
"build_allow_failure": false, "build_allow_failure": false,
"build_failure_reason": "unknown_failure", "build_failure_reason": "unknown_failure",
"pipeline_id": 2366,
"project_id": 3115610, "project_id": 3115610,
"project_name": "GitLab4J / test-project", "project_name": "GitLab4J / test-project",
"user": { "user": {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment