Skip to content

Commit b8448d5

Browse files
committed
When sorting, lump rollup=never and rollup=maybe
When determining the sort order for pull requests, always sort `rollup=always` to the bottom of the list, and ignore any other rollup status. Previously, a PR with `priority=0`, `rollup=never` would be in the queue above a PR with `priority=1`, `rollup=maybe`. This commit makes it so that PRs with `rollup=never` is **not** given higher weight than `rollup-maybe`, so the `priority=1` pull will rank higher. Fixes #27
1 parent 4f0b3a9 commit b8448d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

homu/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ def sort_key(self):
180180
STATUS_TO_PRIORITY.get(self.get_status(), -1),
181181
1 if self.mergeable is False else 0,
182182
0 if self.approved_by else 1,
183-
self.rollup,
183+
# Sort rollup=always to the bottom of the queue, but treat all
184+
# other rollup statuses as equivalent
185+
1 if WORDS_TO_ROLLUP['rollup=always'] == self.rollup else 0,
184186
-self.priority,
185187
self.num,
186188
]

0 commit comments

Comments
 (0)