[IMP]: runbot_merge: sort unready PRs alphabetically

The `_order` of pull requests are just the `number`.

Allow test `test_two_of_three_unready` to be reliable as both unready
PRs have the same number.
This commit is contained in:
Christophe Simonis 2019-01-25 15:45:12 +01:00 committed by xmo-odoo
parent 3632463f80
commit e169934e61

View File

@ -769,7 +769,7 @@ class PullRequests(models.Model):
for [ids] in self.env.cr.fetchall():
prs = self.browse(ids)
ready = prs.filtered(lambda p: p.state == 'ready')
unready = (prs - ready).sorted()
unready = (prs - ready).sorted(key=lambda p: (p.repository.name, p.number))
for r in ready:
self.env['runbot_merge.pull_requests.feedback'].create({