Commit becca05c authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-label-ref-ee' into 'master'

[EE] Sort labels by reference

See merge request gitlab-org/gitlab-ee!7284
parents 0bb43e71 ff05168d
...@@ -10,9 +10,9 @@ shared_examples 'label note created from events' do ...@@ -10,9 +10,9 @@ shared_examples 'label note created from events' do
end end
def label_refs(events) def label_refs(events)
sorted_labels = events.map(&:label).compact.sort_by(&:title) labels = events.map(&:label).compact
sorted_labels.map { |l| l.to_reference}.join(' ') labels.map { |l| l.to_reference}.sort.join(' ')
end end
let(:time) { Time.now } let(:time) { Time.now }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment