Unverified Commit 69e819cf authored by Marco's avatar Marco Committed by GitHub
Browse files

Add support for squash_commit_sha in Merge Requests (#507)

* Add support for squash_commit_sha in MergeRequest
* Add support for references object in MergeRequest
parent f4c8ff43
......@@ -28,6 +28,7 @@ public class MergeRequest {
private Integer iid;
private List<String> labels;
private String mergeCommitSha;
private String squashCommitSha;
private String mergeStatus;
private Date mergedAt;
private Participant mergedBy;
......@@ -45,6 +46,7 @@ public class MergeRequest {
private String targetBranch;
private Integer targetProjectId;
private TaskCompletionStatus taskCompletionStatus;
private References references;
private TimeStats timeStats;
private String title;
private Date updatedAt;
......@@ -207,6 +209,14 @@ public class MergeRequest {
this.mergeCommitSha = mergeCommitSha;
}
public String getSquashCommitSha() {
return squashCommitSha;
}
public void setSquashCommitSha(String squashCommitSha) {
this.squashCommitSha = squashCommitSha;
}
public String getMergeStatus() {
return mergeStatus;
}
......@@ -343,6 +353,14 @@ public class MergeRequest {
this.taskCompletionStatus = taskCompletionStatus;
}
public References getReferences() {
return references;
}
public void setReferences(References references) {
this.references = references;
}
public TimeStats getTimeStats() {
return timeStats;
}
......
package org.gitlab4j.api.models;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.gitlab4j.api.utils.JacksonJson;
public class References {
@JsonProperty("short")
private String _short;
private String relative;
private String full;
public String getShort() {
return _short;
}
public void setShort(String _short) {
this._short = _short;
}
public String getRelative() {
return relative;
}
public void setRelative(String relative) {
this.relative = relative;
}
public String getFull() {
return full;
}
public void setFull(String full) {
this.full = full;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -11,6 +11,7 @@
"created_at": "2016-12-03T17:23:34Z",
"updated_at": "2016-12-03T17:23:34Z",
"merged_at": "2016-12-03T17:23:34Z",
"squash_commit_sha": "37a1f246848c3dc2bb82964a183417e2e72fe1a7",
"merged_by": {
"id": 7,
"name": "James Bond",
......@@ -44,6 +45,11 @@
"count":0,
"completed_count":0
},
"references": {
"short": "!1",
"relative": "!1",
"full": "my-group/my-project!1"
},
"time_stats": {
"time_estimate": 0,
"total_time_spent": 0,
......
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