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
Tatuya Kamada
gitlab-ce
Commits
51a921ba
Commit
51a921ba
authored
Dec 06, 2016
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A simpler implementation of finding a merge request
Following a discussion in !7180
parent
469dfa43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
lib/api/issues.rb
lib/api/issues.rb
+6
-9
No files found.
lib/api/issues.rb
View file @
51a921ba
...
@@ -28,14 +28,6 @@ module API
...
@@ -28,14 +28,6 @@ module API
new_params
new_params
end
end
def
merge_request_for_resolving_discussions
return
unless
merge_request_iid
=
params
[
:merge_request_for_resolving_discussions
]
@merge_request_for_resolving_discussions
||=
MergeRequestsFinder
.
new
(
current_user
,
project_id:
user_project
.
id
).
execute
.
find_by
(
iid:
merge_request_iid
)
end
end
end
resource
:issues
do
resource
:issues
do
...
@@ -179,7 +171,12 @@ module API
...
@@ -179,7 +171,12 @@ module API
attrs
=
attributes_for_keys
(
keys
)
attrs
=
attributes_for_keys
(
keys
)
attrs
[
:labels
]
=
params
[
:labels
]
if
params
[
:labels
]
attrs
[
:labels
]
=
params
[
:labels
]
if
params
[
:labels
]
attrs
[
:merge_request_for_resolving_discussions
]
=
merge_request_for_resolving_discussions
if
params
[
:merge_request_for_resolving_discussions
]
if
merge_request_iid
=
params
[
:merge_request_for_resolving_discussions
]
attrs
[
:merge_request_for_resolving_discussions
]
=
MergeRequestsFinder
.
new
(
current_user
,
project_id:
user_project
.
id
).
execute
.
find_by
(
iid:
merge_request_iid
)
end
# Convert and filter out invalid confidential flags
# Convert and filter out invalid confidential flags
attrs
[
'confidential'
]
=
to_boolean
(
attrs
[
'confidential'
])
attrs
[
'confidential'
]
=
to_boolean
(
attrs
[
'confidential'
])
...
...
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