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
6b35c4ad
Commit
6b35c4ad
authored
Nov 17, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch '22680-unlabel-limit-autocomplete-to-selected-items' into 'master'"
This reverts merge request !6796
parent
11ba759d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
21 deletions
+2
-21
app/assets/javascripts/gfm_auto_complete.js.es6
app/assets/javascripts/gfm_auto_complete.js.es6
+0
-6
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-3
app/services/projects/autocomplete_service.rb
app/services/projects/autocomplete_service.rb
+1
-8
changelogs/unreleased/22680-unlabel-limit-autocomplete-to-selected-items.yml
...ed/22680-unlabel-limit-autocomplete-to-selected-items.yml
+0
-4
No files found.
app/assets/javascripts/gfm_auto_complete.js.es6
View file @
6b35c4ad
...
...
@@ -51,11 +51,6 @@
if (!GitLab.GfmAutoComplete.dataLoaded) {
return this.at;
} else {
if (value.indexOf("unlabel") !== -1) {
GitLab.GfmAutoComplete.input.atwho('load', '~', GitLab.GfmAutoComplete.cachedData.unlabels);
} else {
GitLab.GfmAutoComplete.input.atwho('load', '~', GitLab.GfmAutoComplete.cachedData.labels);
}
return value;
}
}
...
...
@@ -363,4 +358,3 @@
};
}).call(this);
app/controllers/projects_controller.rb
View file @
6b35c4ad
...
...
@@ -144,15 +144,13 @@ class ProjectsController < Projects::ApplicationController
autocomplete
=
::
Projects
::
AutocompleteService
.
new
(
@project
,
current_user
)
participants
=
::
Projects
::
ParticipantsService
.
new
(
@project
,
current_user
).
execute
(
noteable
)
unlabels
=
autocomplete
.
unlabels
(
noteable
)
@suggestions
=
{
emojis:
Gitlab
::
AwardEmoji
.
urls
,
issues:
autocomplete
.
issues
,
milestones:
autocomplete
.
milestones
,
mergerequests:
autocomplete
.
merge_requests
,
labels:
autocomplete
.
labels
-
unlabels
,
unlabels:
unlabels
,
labels:
autocomplete
.
labels
,
members:
participants
,
commands:
autocomplete
.
commands
(
noteable
,
params
[
:type
])
}
...
...
app/services/projects/autocomplete_service.rb
View file @
6b35c4ad
...
...
@@ -13,14 +13,7 @@ module Projects
end
def
labels
LabelsFinder
.
new
(
current_user
,
project_id:
project
.
id
).
execute
.
pluck
(
:title
,
:color
).
map
{
|
l
|
{
title:
l
.
first
,
color:
l
.
second
}
}
end
def
unlabels
(
noteable
)
return
[]
unless
noteable
&&
noteable
.
respond_to?
(
:labels
)
noteable
.
labels
.
pluck
(
:title
,
:color
).
map
{
|
l
|
{
title:
l
.
first
,
color:
l
.
second
}
}
LabelsFinder
.
new
(
current_user
,
project_id:
project
.
id
).
execute
.
select
([
:title
,
:color
])
end
def
commands
(
noteable
,
type
)
...
...
changelogs/unreleased/22680-unlabel-limit-autocomplete-to-selected-items.yml
deleted
100644 → 0
View file @
11ba759d
---
title
:
Limit autocomplete to currently selected items for unlabel slash command
merge_request
:
22680
author
:
Akram Fares
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