Skip to content

Commit 44b47f3

Browse files
committed
Initial commit (#332).
1 parent 043521a commit 44b47f3

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.gitlab4j.api.systemhooks;
2+
3+
import org.gitlab4j.api.webhook.MergeRequestEvent;
4+
5+
import com.fasterxml.jackson.annotation.JsonIgnore;
6+
import com.fasterxml.jackson.annotation.JsonSubTypes;
7+
import com.fasterxml.jackson.annotation.JsonTypeInfo;
8+
9+
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, property="object_kind")
10+
@JsonSubTypes({
11+
@JsonSubTypes.Type(value = MergeRequestSystemHookEvent.class, name = MergeRequestSystemHookEvent.OBJECT_KIND),
12+
})
13+
public class MergeRequestSystemHookEvent extends MergeRequestEvent implements SystemHookEvent {
14+
15+
public static final String X_GITLAB_EVENT = "System Hook";
16+
17+
@JsonIgnore
18+
@Override
19+
public String getEventName() {
20+
return (OBJECT_KIND);
21+
}
22+
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"object_kind": "merge_request",
3+
"user": {
4+
"name": "Administrator",
5+
"username": "root",
6+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
7+
},
8+
"project": {
9+
"name": "Example",
10+
"description": "",
11+
"web_url": "http://example.com/jsmith/example",
12+
"git_ssh_url": "[email protected]:jsmith/example.git",
13+
"git_http_url": "http://example.com/jsmith/example.git",
14+
"namespace": "Jsmith",
15+
"visibility_level": 0,
16+
"path_with_namespace": "jsmith/example",
17+
"default_branch": "master",
18+
"ci_config_path": "",
19+
"homepage": "http://example.com/jsmith/example",
20+
"url": "[email protected]:jsmith/example.git",
21+
"ssh_url": "[email protected]:jsmith/example.git",
22+
"http_url": "http://example.com/jsmith/example.git"
23+
},
24+
"object_attributes": {
25+
"id": 90,
26+
"target_branch": "master",
27+
"source_branch": "ms-viewport",
28+
"source_project_id": 14,
29+
"author_id": 51,
30+
"assignee_id": 6,
31+
"title": "MS-Viewport",
32+
"created_at": "2017-09-20T08:31:45.944Z",
33+
"updated_at": "2017-09-28T12:23:42.365Z",
34+
"state": "opened",
35+
"merge_status": "unchecked",
36+
"target_project_id": 14,
37+
"iid": 1,
38+
"description": "",
39+
"updated_by_id": 1,
40+
"merge_params": {
41+
"force_remove_source_branch": "0"
42+
},
43+
"merge_when_pipeline_succeeds": false,
44+
"lock_version": 5,
45+
"time_estimate": 0,
46+
"last_edited_at": "2017-09-27T12:43:37.558Z",
47+
"last_edited_by_id": 1,
48+
"head_pipeline_id": 61,
49+
"ref_fetched": true,
50+
"source": {
51+
"name": "Awesome Project",
52+
"description": "",
53+
"web_url": "http://example.com/awesome_space/awesome_project",
54+
"git_ssh_url": "[email protected]:awesome_space/awesome_project.git",
55+
"git_http_url": "http://example.com/awesome_space/awesome_project.git",
56+
"namespace": "root",
57+
"visibility_level": 0,
58+
"path_with_namespace": "awesome_space/awesome_project",
59+
"default_branch": "master",
60+
"ci_config_path": "",
61+
"homepage": "http://example.com/awesome_space/awesome_project",
62+
"url": "http://example.com/awesome_space/awesome_project.git",
63+
"ssh_url": "[email protected]:awesome_space/awesome_project.git",
64+
"http_url": "http://example.com/awesome_space/awesome_project.git"
65+
},
66+
"target": {
67+
"name": "Awesome Project",
68+
"description": "Aut reprehenderit ut est.",
69+
"web_url": "http://example.com/awesome_space/awesome_project",
70+
"git_ssh_url": "[email protected]:awesome_space/awesome_project.git",
71+
"git_http_url": "http://example.com/awesome_space/awesome_project.git",
72+
"namespace": "Awesome Space",
73+
"visibility_level": 0,
74+
"path_with_namespace": "awesome_space/awesome_project",
75+
"default_branch": "master",
76+
"ci_config_path": "",
77+
"homepage": "http://example.com/awesome_space/awesome_project",
78+
"url": "http://example.com/awesome_space/awesome_project.git",
79+
"ssh_url": "[email protected]:awesome_space/awesome_project.git",
80+
"http_url": "http://example.com/awesome_space/awesome_project.git"
81+
},
82+
"last_commit": {
83+
"id": "ba3e0d8ff79c80d5b0bbb4f3e2e343e0aaa662b7",
84+
"message": "fixed readme",
85+
"timestamp": "2017-09-26T16:12:57Z",
86+
"url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
87+
"author": {
88+
"name": "GitLab dev user",
89+
"email": "gitlabdev@dv6700.(none)"
90+
}
91+
},
92+
"work_in_progress": false,
93+
"total_time_spent": 0
94+
},
95+
"labels": [],
96+
"repository": {
97+
"name": "git-gpg-test",
98+
"url": "[email protected]:awesome_space/awesome_project.git",
99+
"description": "",
100+
"homepage": "http://example.com/awesome_space/awesome_project"
101+
}
102+
}

0 commit comments

Comments
 (0)