Commit ca89f334 authored by Jeremie Bresson's avatar Jeremie Bresson
Browse files

Merge remote-tracking branch 'origin/main' into 6.x

parents c183d1e9 c2929237
...@@ -114,12 +114,12 @@ public abstract class EventChanges { ...@@ -114,12 +114,12 @@ public abstract class EventChanges {
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <T> ChangeContainer<T> get(String property){ public <T> ChangeContainer<T> get(String property) {
if(otherProperties.containsKey(property)){ if (otherProperties.containsKey(property)) {
try { try {
final ChangeContainer<Object> container = otherProperties.get(property); final ChangeContainer<Object> container = otherProperties.get(property);
// noinspection unchecked : It's duty from caller to be sure to do that // noinspection unchecked : It's duty from caller to be sure to do that
return container != null ? (ChangeContainer<T>) container : null; return container != null ? (ChangeContainer<T>) container : null;
} catch (ClassCastException e) { } catch (ClassCastException e) {
return null; return null;
......
package org.gitlab4j.api.webhook; package org.gitlab4j.api.webhook;
import java.util.List;
import org.gitlab4j.api.models.Reviewer;
public class MergeRequestChanges extends EventChanges { public class MergeRequestChanges extends EventChanges {
private ChangeContainer<String> mergeStatus; private ChangeContainer<String> mergeStatus;
private ChangeContainer<List<Reviewer>> reviewers;
public ChangeContainer<String> getMergeStatus() { public ChangeContainer<String> getMergeStatus() {
return mergeStatus; return mergeStatus;
...@@ -11,4 +16,13 @@ public class MergeRequestChanges extends EventChanges { ...@@ -11,4 +16,13 @@ public class MergeRequestChanges extends EventChanges {
public void setMergeStatus(ChangeContainer<String> mergeStatus) { public void setMergeStatus(ChangeContainer<String> mergeStatus) {
this.mergeStatus = mergeStatus; this.mergeStatus = mergeStatus;
} }
public ChangeContainer<List<Reviewer>> getReviewers() {
return reviewers;
}
public void setReviewers(ChangeContainer<List<Reviewer>> reviewers) {
this.reviewers = reviewers;
}
} }
...@@ -131,56 +131,80 @@ ...@@ -131,56 +131,80 @@
], ],
"changes": { "changes": {
"author_id": { "author_id": {
"current":2 "current": 2
}, },
"updated_at": { "updated_at": {
"previous": "2013-09-15T16:50:55Z", "previous": "2013-09-15T16:50:55Z",
"current": "2013-12-03T17:23:34Z" "current": "2013-12-03T17:23:34Z"
}, },
"updated_by_id": { "updated_by_id": {
"previous": 2, "previous": 2,
"current": 6 "current": 6
}, },
"id":{ "id": {
"previous":123, "previous": 123,
"current":456 "current": 456
}, },
"iid":{ "iid": {
"previous":12, "previous": 12,
"current":34 "current": 34
}, },
"merge_status": { "merge_status": {
"current": "unchecked" "current": "unchecked"
}, },
"milestone_id": { "milestone_id": {
"previous":0, "previous": 0,
"current":1 "current": 1
}, },
"labels": { "labels": {
"previous": [{ "previous": [
"id": 206, {
"title": "API", "id": 206,
"color": "#ffffff", "title": "API",
"project_id": 14, "color": "#ffffff",
"created_at": "2013-12-03T17:15:43Z", "project_id": 14,
"updated_at": "2013-12-03T17:15:43Z", "created_at": "2013-12-03T17:15:43Z",
"template": false, "updated_at": "2013-12-03T17:15:43Z",
"description": "API related issues", "template": false,
"type": "ProjectLabel", "description": "API related issues",
"group_id": 41 "type": "ProjectLabel",
}], "group_id": 41
"current": [{ }
"id": 205, ],
"title": "Platform", "current": [
"color": "#123123", {
"project_id": 14, "id": 205,
"created_at": "2013-12-03T17:15:43Z", "title": "Platform",
"updated_at": "2013-12-03T17:15:43Z", "color": "#123123",
"template": false, "project_id": 14,
"description": "Platform related issues", "created_at": "2013-12-03T17:15:43Z",
"type": "ProjectLabel", "updated_at": "2013-12-03T17:15:43Z",
"group_id": 41 "template": false,
}] "description": "Platform related issues",
"type": "ProjectLabel",
"group_id": 41
}
]
},
"reviewers": {
"previous": [
{
"id": 2,
"name": "John Doe",
"username": "jdoe",
"avatar_url": "https://www.gravatar.com/avatar/0?s=80&d=identicon",
"email": "jdoe@example.com"
}
],
"current": [
{
"id": 3,
"name": "Paul Smith",
"username": "psmith",
"avatar_url": "https://www.gravatar.com/avatar/0?s=80&d=identicon",
"email": "psmith@example.com"
}
]
} }
}, },
"assignees": [ "assignees": [
......
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