Skip to content

Commit 5f490a9

Browse files
authored
devchangelog: Sort items before writing (#2697)
After #2696 it caused an issue where each time rendering the order of pull requests changes. Fix that issue by sorting it based on the number of the pull request.
1 parent b451301 commit 5f490a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/dev_changelog.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ def process_pullrequests(lst, cur, github_repo, pr_nums):
139139
continue
140140
reviewer_names.append(name)
141141

142+
# Sort items in pr_by_labels
143+
for i in pr_by_labels:
144+
pr_by_labels[i] = sorted(pr_by_labels[i], key=lambda pr: pr.number)
145+
142146
return {
143147
"authors": sorted(author_names),
144148
"reviewers": sorted(reviewer_names),

0 commit comments

Comments
 (0)