diff options
| author | Rémy Coutable <remy@rymai.me> | 2016-08-10 17:51:01 +0200 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2016-08-13 00:06:12 +0200 |
| commit | 65349c22129fcdf2ae0c7103094bbf50ae73db61 (patch) | |
| tree | 5e2f6c4926a979d2a20665e4ce3e3453ee82ccb0 /app/controllers/projects_controller.rb | |
| parent | 23db6449542498636c145e83c71a4a466eb62746 (diff) | |
| download | gitlab-ce-65349c22129fcdf2ae0c7103094bbf50ae73db61.tar.gz | |
Make slash commands contextual
- Return only slash commands that make sense for the current noteable
- Allow slash commands decription to be dynamic
Other improvements:
- Add permission checks in slash commands definition
- Use IssuesFinder and MergeRequestsFinder
- Use next if instead of a unless block, and use splat operator instead of flatten
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/controllers/projects_controller.rb')
| -rw-r--r-- | app/controllers/projects_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 64d31e4a3a0..af20984cbe7 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -146,7 +146,7 @@ class ProjectsController < Projects::ApplicationController mergerequests: autocomplete.merge_requests, labels: autocomplete.labels, members: participants, - commands: autocomplete.commands + commands: autocomplete.commands(note_type, note_id) } respond_to do |format| |
