Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ab8dab30
Commit
ab8dab30
authored
Oct 04, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Webhooks and System hooks documentation
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
c3eefdf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
124 additions
and
81 deletions
+124
-81
doc/system_hooks/system_hooks.md
doc/system_hooks/system_hooks.md
+114
-81
doc/user/project/integrations/webhooks.md
doc/user/project/integrations/webhooks.md
+10
-0
No files found.
doc/system_hooks/system_hooks.md
View file @
ab8dab30
...
...
@@ -173,7 +173,7 @@ Please refer to `group_rename` and `user_rename` for that case.
"user_name"
:
"John Smith"
,
"user_username"
:
"johnsmith"
,
"user_id"
:
41
,
"project_visibility"
:
"
visibilitylevel|
private"
"project_visibility"
:
"private"
}
```
...
...
@@ -193,7 +193,7 @@ Please refer to `group_rename` and `user_rename` for that case.
"user_name"
:
"John Smith"
,
"user_username"
:
"johnsmith"
,
"user_id"
:
41
,
"project_visibility"
:
"
visibilitylevel|
private"
"project_visibility"
:
"private"
}
```
...
...
@@ -213,7 +213,7 @@ Please refer to `group_rename` and `user_rename` for that case.
"user_name"
:
"John Smith"
,
"user_username"
:
"johnsmith"
,
"user_id"
:
41
,
"project_visibility"
:
"
visibilitylevel|
private"
"project_visibility"
:
"private"
}
```
...
...
@@ -519,7 +519,7 @@ X-Gitlab-Event: System Hook
}
```
##
#
Merge request events
## Merge request events
Triggered when a new merge request is created, an existing merge request was
updated/merged/closed or a commit is added in the source branch.
...
...
@@ -533,101 +533,89 @@ X-Gitlab-Event: System Hook
```
json
{
"object_kind"
:
"merge_request"
,
"event_type"
:
"merge_request"
,
"user"
:
{
"id"
:
1
,
"name"
:
"Administrator"
,
"username"
:
"root"
,
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=
80&
d=identicon"
,
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=
40
\u
0026
d=identicon"
,
"email"
:
"admin@example.com"
},
"project"
:
{
"name"
:
"Example"
,
"description"
:
""
,
"web_url"
:
"http://example.com/jsmith/example"
,
"avatar_url"
:
null
,
"git_ssh_url"
:
"git@example.com:jsmith/example.git"
,
"git_http_url"
:
"http://example.com/jsmith/example.git"
,
"namespace"
:
"Jsmith"
,
"visibility_level"
:
0
,
"path_with_namespace"
:
"jsmith/example"
,
"default_branch"
:
"master"
,
"ci_config_path"
:
""
,
"homepage"
:
"http://example.com/jsmith/example"
,
"url"
:
"git@example.com:jsmith/example.git"
,
"ssh_url"
:
"git@example.com:jsmith/example.git"
,
"http_url"
:
"http://example.com/jsmith/example.git"
"id"
:
1
,
"name"
:
"Gitlab Test"
,
"description"
:
"Aut reprehenderit ut est."
,
"web_url"
:
"http://example.com/gitlabhq/gitlab-test"
,
"avatar_url"
:
null
,
"git_ssh_url"
:
"git@example.com:gitlabhq/gitlab-test.git"
,
"git_http_url"
:
"http://example.com/gitlabhq/gitlab-test.git"
,
"namespace"
:
"GitlabHQ"
,
"visibility_level"
:
20
,
"path_with_namespace"
:
"gitlabhq/gitlab-test"
,
"default_branch"
:
"master"
,
"homepage"
:
"http://example.com/gitlabhq/gitlab-test"
,
"url"
:
"http://example.com/gitlabhq/gitlab-test.git"
,
"ssh_url"
:
"git@example.com:gitlabhq/gitlab-test.git"
,
"http_url"
:
"http://example.com/gitlabhq/gitlab-test.git"
},
"repository"
:
{
"name"
:
"Gitlab Test"
,
"url"
:
"http://example.com/gitlabhq/gitlab-test.git"
,
"description"
:
"Aut reprehenderit ut est."
,
"homepage"
:
"http://example.com/gitlabhq/gitlab-test"
},
"object_attributes"
:
{
"id"
:
9
0
,
"id"
:
9
9
,
"target_branch"
:
"master"
,
"source_branch"
:
"ms-viewport"
,
"source_project_id"
:
14
,
"author_id"
:
51
,
"assignee_id"
:
6
,
"title"
:
"MS-Viewport"
,
"created_at"
:
"201
7-09-20T08:31:45.94
4Z"
,
"updated_at"
:
"201
7-09-28T12:23:42.365
Z"
,
"created_at"
:
"201
3-12-03T17:23:3
4Z"
,
"updated_at"
:
"201
3-12-03T17:23:34
Z"
,
"milestone_id"
:
null
,
"state"
:
"opened"
,
"merge_status"
:
"unchecked"
,
"target_project_id"
:
14
,
"iid"
:
1
,
"description"
:
""
,
"updated_by_id"
:
1
,
"merge_error"
:
null
,
"merge_params"
:
{
"force_remove_source_branch"
:
"0"
},
"merge_when_pipeline_succeeds"
:
false
,
"merge_user_id"
:
null
,
"merge_commit_sha"
:
null
,
"deleted_at"
:
null
,
"in_progress_merge_commit_sha"
:
null
,
"lock_version"
:
5
,
"time_estimate"
:
0
,
"last_edited_at"
:
"2017-09-27T12:43:37.558Z"
,
"last_edited_by_id"
:
1
,
"head_pipeline_id"
:
61
,
"ref_fetched"
:
true
,
"merge_jid"
:
null
,
"source"
:
{
"name"
:
"Awesome Project"
,
"description"
:
""
,
"web_url"
:
"http://example.com/awesome_space/awesome_project"
,
"avatar_url"
:
null
,
"git_ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"git_http_url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"namespace"
:
"root"
,
"visibility_level"
:
0
,
"path_with_namespace"
:
"awesome_space/awesome_project"
,
"default_branch"
:
"master"
,
"ci_config_path"
:
""
,
"homepage"
:
"http://example.com/awesome_space/awesome_project"
,
"url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"http_url"
:
"http://example.com/awesome_space/awesome_project.git"
"name"
:
"Awesome Project"
,
"description"
:
"Aut reprehenderit ut est."
,
"web_url"
:
"http://example.com/awesome_space/awesome_project"
,
"avatar_url"
:
null
,
"git_ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"git_http_url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"namespace"
:
"Awesome Space"
,
"visibility_level"
:
20
,
"path_with_namespace"
:
"awesome_space/awesome_project"
,
"default_branch"
:
"master"
,
"homepage"
:
"http://example.com/awesome_space/awesome_project"
,
"url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"http_url"
:
"http://example.com/awesome_space/awesome_project.git"
},
"target"
:
{
"name"
:
"Awesome Project"
,
"description"
:
"Aut reprehenderit ut est."
,
"web_url"
:
"http://example.com/awesome_space/awesome_project"
,
"avatar_url"
:
null
,
"git_ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"git_http_url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"namespace"
:
"Awesome Space"
,
"visibility_level"
:
0
,
"path_with_namespace"
:
"awesome_space/awesome_project"
,
"default_branch"
:
"master"
,
"ci_config_path"
:
""
,
"homepage"
:
"http://example.com/awesome_space/awesome_project"
,
"url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"http_url"
:
"http://example.com/awesome_space/awesome_project.git"
"name"
:
"Awesome Project"
,
"description"
:
"Aut reprehenderit ut est."
,
"web_url"
:
"http://example.com/awesome_space/awesome_project"
,
"avatar_url"
:
null
,
"git_ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"git_http_url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"namespace"
:
"Awesome Space"
,
"visibility_level"
:
20
,
"path_with_namespace"
:
"awesome_space/awesome_project"
,
"default_branch"
:
"master"
,
"homepage"
:
"http://example.com/awesome_space/awesome_project"
,
"url"
:
"http://example.com/awesome_space/awesome_project.git"
,
"ssh_url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"http_url"
:
"http://example.com/awesome_space/awesome_project.git"
},
"last_commit"
:
{
"id"
:
"
ba3e0d8ff79c80d5b0bbb4f3e2e343e0aaa662b
7"
,
"id"
:
"
da1560886d4f094c3e6c9ef40349f7d38b5d27d
7"
,
"message"
:
"fixed readme"
,
"timestamp"
:
"201
7-09-26T16:12:57Z
"
,
"timestamp"
:
"201
2-01-03T23:36:29+02:00
"
,
"url"
:
"http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7"
,
"author"
:
{
"name"
:
"GitLab dev user"
,
...
...
@@ -635,16 +623,61 @@ X-Gitlab-Event: System Hook
}
},
"work_in_progress"
:
false
,
"total_time_spent"
:
0
,
"human_total_time_spent"
:
null
,
"human_time_estimate"
:
null
"url"
:
"http://example.com/diaspora/merge_requests/1"
,
"action"
:
"open"
,
"assignee"
:
{
"name"
:
"User1"
,
"username"
:
"user1"
,
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40
\u
0026d=identicon"
}
},
"labels"
:
null
,
"repository"
:
{
"name"
:
"git-gpg-test"
,
"url"
:
"git@example.com:awesome_space/awesome_project.git"
,
"description"
:
""
,
"homepage"
:
"http://example.com/awesome_space/awesome_project"
"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
}],
"changes"
:
{
"updated_by_id"
:
{
"previous"
:
null
,
"current"
:
1
},
"updated_at"
:
{
"previous"
:
"2017-09-15 16:50:55 UTC"
,
"current"
:
"2017-09-15 16:52:00 UTC"
},
"labels"
:
{
"previous"
:
[{
"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
}],
"current"
:
[{
"id"
:
205
,
"title"
:
"Platform"
,
"color"
:
"#123123"
,
"project_id"
:
14
,
"created_at"
:
"2013-12-03T17:15:43Z"
,
"updated_at"
:
"2013-12-03T17:15:43Z"
,
"template"
:
false
,
"description"
:
"Platform related issues"
,
"type"
:
"ProjectLabel"
,
"group_id"
:
41
}]
}
}
}
```
...
...
doc/user/project/integrations/webhooks.md
View file @
ab8dab30
...
...
@@ -117,6 +117,7 @@ X-Gitlab-Event: Push Hook
```
json
{
"object_kind"
:
"push"
,
"event_name"
:
"push"
,
"before"
:
"95790bf891e76fee5e1747ab589903a6a1f80f22"
,
"after"
:
"da1560886d4f094c3e6c9ef40349f7d38b5d27d7"
,
"ref"
:
"refs/heads/master"
,
...
...
@@ -207,6 +208,7 @@ X-Gitlab-Event: Tag Push Hook
```
json
{
"object_kind"
:
"tag_push"
,
"event_name"
:
"tag_push"
,
"before"
:
"0000000000000000000000000000000000000000"
,
"after"
:
"82b3d5ae55f7080f1e6022629cdb57bfae7cccc7"
,
"ref"
:
"refs/tags/v1.0.0"
,
...
...
@@ -435,6 +437,7 @@ X-Gitlab-Event: Note Hook
```
json
{
"object_kind"
:
"note"
,
"event_type"
:
"note"
,
"user"
:
{
"id"
:
1
,
"name"
:
"Administrator"
,
...
...
@@ -517,6 +520,7 @@ X-Gitlab-Event: Note Hook
```
json
{
"object_kind"
:
"note"
,
"event_type"
:
"note"
,
"user"
:
{
"id"
:
1
,
"name"
:
"Administrator"
,
...
...
@@ -646,6 +650,7 @@ X-Gitlab-Event: Note Hook
```
json
{
"object_kind"
:
"note"
,
"event_type"
:
"note"
,
"user"
:
{
"id"
:
1
,
"name"
:
"Administrator"
,
...
...
@@ -741,6 +746,9 @@ X-Gitlab-Event: Note Hook
NOTE:
`assignee_id`
field is deprecated and now shows the first assignee only.
NOTE:
`event_type`
is set to
`confidential_note`
for confidential issues.
#### Comment on code snippet
**Request header**
:
...
...
@@ -754,6 +762,7 @@ X-Gitlab-Event: Note Hook
```
json
{
"object_kind"
:
"note"
,
"event_type"
:
"note"
,
"user"
:
{
"id"
:
1
,
"name"
:
"Administrator"
,
...
...
@@ -842,6 +851,7 @@ X-Gitlab-Event: Merge Request Hook
```
json
{
"object_kind"
:
"merge_request"
,
"event_type"
:
"merge_request"
,
"user"
:
{
"id"
:
1
,
"name"
:
"Administrator"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment