Skip to content

Add missing object attributes in merge request events #937

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 1 commit into from
Apr 12, 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
36 changes: 36 additions & 0 deletions src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class EventMergeRequest {
private Long iid;
private String mergeCommitSha;
private String mergeStatus;
private String detailedMergeStatus;
private Long milestoneId;
private Integer position;
private Date lockedAt;
Expand All @@ -36,8 +37,11 @@ public class EventMergeRequest {
private EventProject source;
private EventProject target;
private EventCommit lastCommit;
private Boolean blockingDiscussionsResolved;
private Boolean workInProgress;
private Boolean firstContribution;
private String url;
private List<EventLabel> labels;
private String action;
private Assignee assignee;

Expand Down Expand Up @@ -134,6 +138,14 @@ public void setMergeStatus(String mergeStatus) {
this.mergeStatus = mergeStatus;
}

public String getDetailedMergeStatus() {
return detailedMergeStatus;
}

public void setDetailedMergeStatus(String detailedMergeStatus) {
this.detailedMergeStatus = detailedMergeStatus;
}

public Long getMilestoneId() {
return this.milestoneId;
}
Expand Down Expand Up @@ -262,6 +274,14 @@ public void setLastCommit(EventCommit lastCommit) {
this.lastCommit = lastCommit;
}

public Boolean getBlockingDiscussionsResolved() {
return blockingDiscussionsResolved;
}

public void setBlockingDiscussionsResolved(Boolean blockingDiscussionsResolved) {
this.blockingDiscussionsResolved = blockingDiscussionsResolved;
}

public Boolean getWorkInProgress() {
return workInProgress;
}
Expand All @@ -270,6 +290,14 @@ public void setWorkInProgress(Boolean workInProgress) {
this.workInProgress = workInProgress;
}

public Boolean getFirstContribution() {
return firstContribution;
}

public void setFirstContribution(Boolean firstContribution) {
this.firstContribution = firstContribution;
}

public String getUrl() {
return url;
}
Expand All @@ -278,6 +306,14 @@ public void setUrl(String url) {
this.url = url;
}

public List<EventLabel> getLabels() {
return labels;
}

public void setLabels(List<EventLabel> labels) {
this.labels = labels;
}

public String getAction() {
return action;
}
Expand Down
20 changes: 19 additions & 1 deletion src/test/resources/org/gitlab4j/api/merge-request-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@
"title": "MS-Viewport",
"created_at": "2013-12-03T17:23:34Z",
"updated_at": "2013-12-03T17:23:34Z",
"milestone_id": 1,
"state": "opened",
"blocking_discussions_resolved": true,
"work_in_progress": false,
"first_contribution": true,
"merge_status": "unchecked",
"target_project_id": 14,
"description": "",
Expand Down Expand Up @@ -95,7 +98,22 @@
"email": "gitlabdev@dv6700.(none)"
}
},
"action": "open"
"labels": [
{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}
],
"action": "open",
"detailed_merge_status": "mergeable"
},
"labels": [
{
Expand Down