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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
cf9c54bd
Commit
cf9c54bd
authored
Sep 03, 2017
by
Hiroyuki Sato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add my_reaction_emoji param to /issues API
parent
597bc292
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
44 deletions
+67
-44
app/finders/issues_finder.rb
app/finders/issues_finder.rb
+1
-0
changelogs/unreleased/issue-api-my-reaction.yml
changelogs/unreleased/issue-api-my-reaction.yml
+5
-0
doc/api/issues.md
doc/api/issues.md
+50
-44
lib/api/issues.rb
lib/api/issues.rb
+1
-0
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+10
-0
No files found.
app/finders/issues_finder.rb
View file @
cf9c54bd
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
# search: string
# search: string
# label_name: string
# label_name: string
# sort: string
# sort: string
# my_reaction_emoji: string
#
#
class
IssuesFinder
<
IssuableFinder
class
IssuesFinder
<
IssuableFinder
CONFIDENTIAL_ACCESS_LEVEL
=
Gitlab
::
Access
::
REPORTER
CONFIDENTIAL_ACCESS_LEVEL
=
Gitlab
::
Access
::
REPORTER
...
...
changelogs/unreleased/issue-api-my-reaction.yml
0 → 100644
View file @
cf9c54bd
---
title
:
Add my_reaction_emoji param to /issues API
merge_request
:
14016
author
:
Hiroyuki Sato
type
:
added
doc/api/issues.md
View file @
cf9c54bd
This diff is collapsed.
Click to expand it.
lib/api/issues.rb
View file @
cf9c54bd
...
@@ -36,6 +36,7 @@ module API
...
@@ -36,6 +36,7 @@ module API
optional
:assignee_id
,
type:
Integer
,
desc:
'Return issues which are assigned to the user with the given ID'
optional
:assignee_id
,
type:
Integer
,
desc:
'Return issues which are assigned to the user with the given ID'
optional
:scope
,
type:
String
,
values:
%w[created-by-me assigned-to-me all]
,
optional
:scope
,
type:
String
,
values:
%w[created-by-me assigned-to-me all]
,
desc:
'Return issues for the given scope: `created-by-me`, `assigned-to-me` or `all`'
desc:
'Return issues for the given scope: `created-by-me`, `assigned-to-me` or `all`'
optional
:my_reaction_emoji
,
type:
String
,
desc:
'Return issues reacted by the authenticated user by the given emoji'
use
:pagination
use
:pagination
end
end
...
...
spec/requests/api/issues_spec.rb
View file @
cf9c54bd
...
@@ -138,6 +138,16 @@ describe API::Issues, :mailer do
...
@@ -138,6 +138,16 @@ describe API::Issues, :mailer do
expect
(
first_issue
[
'id'
]).
to
eq
(
issue2
.
id
)
expect
(
first_issue
[
'id'
]).
to
eq
(
issue2
.
id
)
end
end
it
'returns issues reacted by the authenticated user by the given emoji'
do
issue2
=
create
(
:issue
,
project:
project
,
author:
user
,
assignees:
[
user
])
award_emoji
=
create
(
:award_emoji
,
awardable:
issue2
,
user:
user2
,
name:
'star'
)
get
api
(
'/issues'
,
user2
),
my_reaction_emoji:
award_emoji
.
name
,
scope:
'all'
expect_paginated_array_response
(
size:
1
)
expect
(
first_issue
[
'id'
]).
to
eq
(
issue2
.
id
)
end
it
'returns issues matching given search string for title'
do
it
'returns issues matching given search string for title'
do
get
api
(
"/issues"
,
user
),
search:
issue
.
title
get
api
(
"/issues"
,
user
),
search:
issue
.
title
...
...
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