Commit dd8e9087 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch '212452-webhooks-do-not-show-when-discussion-lock-changes' into 'master'

Resolve "Webhooks do not show when Discussion Lock changes"

Closes #212452

See merge request gitlab-org/gitlab!28018
parents f0d2d2a2 972fcd56
---
title: Add `discussion_locked` to Webhook
merge_request: 28018
author:
type: fixed
...@@ -252,7 +252,7 @@ X-Gitlab-Event: Tag Push Hook ...@@ -252,7 +252,7 @@ X-Gitlab-Event: Tag Push Hook
} }
``` ```
### Issues events ### Issue events
Triggered when a new issue is created or an existing issue was updated/closed/reopened. Triggered when a new issue is created or an existing issue was updated/closed/reopened.
...@@ -267,10 +267,12 @@ X-Gitlab-Event: Issue Hook ...@@ -267,10 +267,12 @@ X-Gitlab-Event: Issue Hook
```json ```json
{ {
"object_kind": "issue", "object_kind": "issue",
"event_type": "issue",
"user": { "user": {
"name": "Administrator", "name": "Administrator",
"username": "root", "username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon" "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin@example.com"
}, },
"project": { "project": {
"id": 1, "id": 1,
...@@ -284,17 +286,12 @@ X-Gitlab-Event: Issue Hook ...@@ -284,17 +286,12 @@ X-Gitlab-Event: Issue Hook
"visibility_level":20, "visibility_level":20,
"path_with_namespace":"gitlabhq/gitlab-test", "path_with_namespace":"gitlabhq/gitlab-test",
"default_branch":"master", "default_branch":"master",
"ci_config_path": null,
"homepage":"http://example.com/gitlabhq/gitlab-test", "homepage":"http://example.com/gitlabhq/gitlab-test",
"url":"http://example.com/gitlabhq/gitlab-test.git", "url":"http://example.com/gitlabhq/gitlab-test.git",
"ssh_url":"git@example.com:gitlabhq/gitlab-test.git", "ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
"http_url":"http://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": { "object_attributes": {
"id": 301, "id": 301,
"title": "New API: create/update/delete file", "title": "New API: create/update/delete file",
...@@ -304,14 +301,45 @@ X-Gitlab-Event: Issue Hook ...@@ -304,14 +301,45 @@ X-Gitlab-Event: Issue Hook
"project_id": 14, "project_id": 14,
"created_at": "2013-12-03T17:15:43Z", "created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z", "updated_at": "2013-12-03T17:15:43Z",
"position": 0, "updated_by_id": 1,
"branch_name": null, "last_edited_at": null,
"last_edited_by_id": null,
"relative_position": 0,
"description": "Create new API for manipulations with repository", "description": "Create new API for manipulations with repository",
"milestone_id": null, "milestone_id": null,
"state": "opened", "state_id": 1,
"confidential": false,
"discussion_locked": true,
"due_date": null,
"moved_to_id": null,
"duplicated_to_id": null,
"time_estimate": 0,
"total_time_spent": 0,
"human_total_time_spent": null,
"human_time_estimate": null,
"weight": null,
"iid": 23, "iid": 23,
"url": "http://example.com/diaspora/issues/23", "url": "http://example.com/diaspora/issues/23",
"action": "open" "state": "opened",
"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
}]
},
"repository": {
"name": "Gitlab Test",
"url": "http://example.com/gitlabhq/gitlab-test.git",
"description": "Aut reprehenderit ut est.",
"homepage": "http://example.com/gitlabhq/gitlab-test"
}, },
"assignees": [{ "assignees": [{
"name": "User1", "name": "User1",
......
...@@ -17,6 +17,7 @@ module Gitlab ...@@ -17,6 +17,7 @@ module Gitlab
confidential confidential
created_at created_at
description description
discussion_locked
due_date due_date
id id
iid iid
......
...@@ -18,6 +18,7 @@ describe Gitlab::HookData::IssueBuilder do ...@@ -18,6 +18,7 @@ describe Gitlab::HookData::IssueBuilder do
confidential confidential
created_at created_at
description description
discussion_locked
due_date due_date
id id
iid iid
......
Markdown is supported
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