diff --git a/routers/web/repo/issue_page_meta.go b/routers/web/repo/issue_page_meta.go index 7eda6e3c736..ddeaecf6e09 100644 --- a/routers/web/repo/issue_page_meta.go +++ b/routers/web/repo/issue_page_meta.go @@ -441,4 +441,8 @@ func (d *IssuePageMetaData) retrieveLabelsData(ctx *context.Context) { } labelsData.AllLabels = append(labelsData.AllLabels, labelsData.RepoLabels...) labelsData.AllLabels = append(labelsData.AllLabels, labelsData.OrgLabels...) + + sort.Slice(labelsData.AllLabels, func(i, j int) bool { + return labelsData.AllLabels[i].Name < labelsData.AllLabels[j].Name + }) }