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
1fd0317a
Commit
1fd0317a
authored
Apr 26, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Issue multiple assignee] Update webhooks
parent
6ea168bd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
11 deletions
+32
-11
app/models/issue.rb
app/models/issue.rb
+5
-1
doc/api/issues.md
doc/api/issues.md
+9
-9
doc/user/project/integrations/webhooks.md
doc/user/project/integrations/webhooks.md
+12
-0
spec/fixtures/api/schemas/public_api/v4/issues.json
spec/fixtures/api/schemas/public_api/v4/issues.json
+1
-1
spec/models/issue_spec.rb
spec/models/issue_spec.rb
+5
-0
No files found.
app/models/issue.rb
View file @
1fd0317a
...
...
@@ -81,10 +81,14 @@ class Issue < ActiveRecord::Base
end
def
hook_attrs
assignee_ids
=
self
.
assignee_ids
attrs
=
{
total_time_spent:
total_time_spent
,
human_total_time_spent:
human_total_time_spent
,
human_time_estimate:
human_time_estimate
human_time_estimate:
human_time_estimate
,
assignee_ids:
assignee_ids
,
assignee_id:
assignee_ids
.
first
# This key is deprecated
}
attributes
.
merge!
(
attrs
)
...
...
doc/api/issues.md
View file @
1fd0317a
...
...
@@ -99,7 +99,7 @@ Example response:
]
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## List group issues
...
...
@@ -190,7 +190,7 @@ Example response:
]
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## List project issues
...
...
@@ -281,7 +281,7 @@ Example response:
]
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## Single issue
...
...
@@ -357,7 +357,7 @@ Example response:
}
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## New issue
...
...
@@ -421,7 +421,7 @@ Example response:
}
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## Edit issue
...
...
@@ -486,7 +486,7 @@ Example response:
}
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## Delete an issue
...
...
@@ -573,7 +573,7 @@ Example response:
}
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## Subscribe to an issue
...
...
@@ -639,7 +639,7 @@ Example response:
}
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## Unsubscribe from an issue
...
...
@@ -762,7 +762,7 @@ Example response:
}
```
**Note**
:
`assignee`
column is deprecated, it shows
a
first assignee only.
**Note**
:
`assignee`
column is deprecated, it shows
the
first assignee only.
## Set a time estimate for an issue
...
...
doc/user/project/integrations/webhooks.md
View file @
1fd0317a
...
...
@@ -233,6 +233,7 @@ X-Gitlab-Event: Issue Hook
"id"
:
301
,
"title"
:
"New API: create/update/delete file"
,
"assignee_ids"
:
[
51
],
"assignee_id"
:
51
,
"author_id"
:
51
,
"project_id"
:
14
,
"created_at"
:
"2013-12-03T17:15:43Z"
,
...
...
@@ -251,6 +252,11 @@ X-Gitlab-Event: Issue Hook
"username"
:
"user1"
,
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40
\u
0026d=identicon"
}],
"assignee"
:
{
"name"
:
"User1"
,
"username"
:
"user1"
,
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40
\u
0026d=identicon"
},
"labels"
:
[{
"id"
:
206
,
"title"
:
"API"
,
...
...
@@ -265,6 +271,9 @@ X-Gitlab-Event: Issue Hook
}]
}
```
**Note**
:
`assignee`
and
`assignee_id`
keys are deprecated and now show the first assignee only.
### Comment events
Triggered when a new comment is made on commits, merge requests, issues, and code snippets.
...
...
@@ -545,6 +554,7 @@ X-Gitlab-Event: Note Hook
"id"
:
92
,
"title"
:
"test"
,
"assignee_ids"
:
[],
"assignee_id"
:
null
,
"author_id"
:
1
,
"project_id"
:
5
,
"created_at"
:
"2015-04-12 14:53:17 UTC"
,
...
...
@@ -559,6 +569,8 @@ X-Gitlab-Event: Note Hook
}
```
**Note**
:
`assignee_id`
field is deprecated and now shows the first assignee only.
#### Comment on code snippet
**Request header**
:
...
...
spec/fixtures/api/schemas/public_api/v4/issues.json
View file @
1fd0317a
...
...
@@ -49,7 +49,7 @@
}
},
"assignee"
:
{
"type"
:
"object"
,
"type"
:
[
"object"
,
"null"
]
,
"properties"
:
{
"name"
:
{
"type"
:
"string"
},
"username"
:
{
"type"
:
"string"
},
...
...
spec/models/issue_spec.rb
View file @
1fd0317a
...
...
@@ -730,6 +730,11 @@ describe Issue, models: true do
expect
(
attrs_hash
).
to
include
(
:human_total_time_spent
)
expect
(
attrs_hash
).
to
include
(
'time_estimate'
)
end
it
'includes assignee_ids and deprecated assignee_id'
do
expect
(
attrs_hash
).
to
include
(
:assignee_id
)
expect
(
attrs_hash
).
to
include
(
:assignee_ids
)
end
end
describe
'#check_for_spam'
do
...
...
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