mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot_merge: make staging serialization more useful
Having the staged and merged heads via an easy to reach endpoint is nice, but having *just* the hashes is not as it requires basically exhaustively checking commits against repos to see which is where. That's annoying. Make the head serializations a map of repository to commit hash. That's a lot more convenient.
This commit is contained in:
parent
f900eb68b6
commit
f3dd3e6fde
@ -27,8 +27,14 @@ def staging_dict(staging):
|
||||
'repository': p.repository.name,
|
||||
'number': p.number,
|
||||
}),
|
||||
'merged': staging.commit_ids.mapped('sha'),
|
||||
'staged': staging.head_ids.mapped('sha'),
|
||||
'merged': {
|
||||
c.repository_id.name: c.commit_id.sha
|
||||
for c in staging.commits
|
||||
},
|
||||
'staged': {
|
||||
h.repository_id.name: h.commit_id.sha
|
||||
for h in staging.heads
|
||||
},
|
||||
}
|
||||
|
||||
class MergebotController(Controller):
|
||||
|
Loading…
Reference in New Issue
Block a user