Commit 694388dfbc75c6d6f2b51fc2acf0b15c7d8eda2a
Exists in
spb-stable
and in
3 other branches
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Showing
4 changed files
with
15 additions
and
1 deletions
Show diff stats
CHANGELOG
... | ... | @@ -8,6 +8,7 @@ v 6.7.0 |
8 | 8 | - Show contribution guide link for new issue form (Jeroen van Baarsen) |
9 | 9 | - Fix CI status for merge requests from fork |
10 | 10 | - Added option to remove issue assignee on project issue page and issue edit page (Jason Blanchard) |
11 | + - Converted all the help sections into markdown | |
11 | 12 | |
12 | 13 | v 6.6.2 |
13 | 14 | - Fix 500 error on branch/tag create or remove via UI | ... | ... |
app/assets/javascripts/gfm_auto_complete.js.coffee
... | ... | @@ -13,6 +13,7 @@ GitLab.GfmAutoComplete = |
13 | 13 | Members: |
14 | 14 | template: '<li data-value="${username}">${username} <small>${name}</small></li>' |
15 | 15 | |
16 | + # Issues and MergeRequests | |
16 | 17 | Issues: |
17 | 18 | template: '<li data-value="${id}"><small>${id}</small> ${title} </li>' |
18 | 19 | |
... | ... | @@ -46,11 +47,22 @@ GitLab.GfmAutoComplete = |
46 | 47 | before_save: (issues) -> |
47 | 48 | $.map issues, (i) -> id: i.iid, title: sanitize(i.title), search: "#{i.iid} #{i.title}" |
48 | 49 | |
50 | + input.atwho | |
51 | + at: '!' | |
52 | + alias: 'mergerequests' | |
53 | + search_key: 'search' | |
54 | + tpl: @Issues.template | |
55 | + callbacks: | |
56 | + before_save: (merges) -> | |
57 | + $.map merges, (m) -> id: m.iid, title: sanitize(m.title), search: "#{m.iid} #{m.title}" | |
58 | + | |
49 | 59 | input.one "focus", => |
50 | 60 | $.getJSON(@dataSource).done (data) -> |
51 | 61 | # load members |
52 | 62 | input.atwho 'load', "@", data.members |
53 | 63 | # load issues |
54 | 64 | input.atwho 'load', "issues", data.issues |
65 | + # load merge requests | |
66 | + input.atwho 'load', "mergerequests", data.mergerequests | |
55 | 67 | # load emojis |
56 | 68 | input.atwho 'load', ":", data.emojis | ... | ... |
app/controllers/projects_controller.rb
... | ... | @@ -108,6 +108,7 @@ class ProjectsController < ApplicationController |
108 | 108 | @suggestions = { |
109 | 109 | emojis: Emoji.names, |
110 | 110 | issues: @project.issues.select([:iid, :title, :description]), |
111 | + mergerequests: @project.merge_requests.select([:iid, :title, :description]), | |
111 | 112 | members: @project.team.members.sort_by(&:username).map { |user| { username: user.username, name: user.name } } |
112 | 113 | } |
113 | 114 | ... | ... |