diff options
author | Robert Speicher <robert@gitlab.com> | 2015-12-04 23:58:45 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-12-04 23:58:45 +0300 |
commit | d2f9a9012d55a7dc9c8e9e61b946c52836a1d8f1 (patch) | |
tree | 2d9a005407b7556a8383b08d841feef49653d63b /app/helpers/merge_requests_helper.rb | |
parent | 3c8051776b25add2e2845344a328328db33d1671 (diff) | |
parent | f9d954fae71d40a314a5812c1a7eec5a601d1575 (diff) |
Merge branch 'link-refs' into 'master'
Recognize issue/MR/snippet/commit links as references.
Fixes #3744 and #3745
See merge request !1933
Diffstat (limited to 'app/helpers/merge_requests_helper.rb')
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index 7f3a61a5e38..6c32647594d 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -39,7 +39,11 @@ module MergeRequestsHelper end def issues_sentence(issues) - issues.map(&:to_reference).to_sentence + # Sorting based on the `#123` or `group/project#123` reference will sort + # local issues first. + issues.map do |issue| + issue.to_reference(@project) + end.sort.to_sentence end def mr_change_branches_path(merge_request) |