Commit 82bf8c0c authored by Robert Speicher's avatar Robert Speicher

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

Sort labels by reference

Closes #51241

See merge request gitlab-org/gitlab-ce!21601
parents dc658a18 fa532970
...@@ -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