Skip to content

Add pipeline id attribute to BuildEvent class #999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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.
*/
public class BuildEvent extends AbstractEvent {
Expand All @@ -28,6 +28,8 @@ public class BuildEvent extends AbstractEvent {
private Boolean buildAllowFailure;
private String buildFailureReason;
private Long projectId;

private Long pipelineId;
private String projectName;
private User user;
private BuildCommit commit;
Expand Down Expand Up @@ -155,6 +157,14 @@ public void setProjectId(Long projectId) {
this.projectId = projectId;
}

public Long getPipelineId() {
return pipelineId;
}

public void setPipelineId(Long pipelineId) {
this.pipelineId = pipelineId;
}

public String getProjectName() {
return projectName;
}
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/org/gitlab4j/api/build-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build_duration": 0.05880817,
"build_allow_failure": false,
"build_failure_reason": "unknown_failure",
"pipeline_id": 2366,
"project_id": 3115610,
"project_name": "GitLab4J / test-project",
"user": {
Expand Down