mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +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,
|
'repository': p.repository.name,
|
||||||
'number': p.number,
|
'number': p.number,
|
||||||
}),
|
}),
|
||||||
'merged': staging.commit_ids.mapped('sha'),
|
'merged': {
|
||||||
'staged': staging.head_ids.mapped('sha'),
|
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):
|
class MergebotController(Controller):
|
||||||
|
Loading…
Reference in New Issue
Block a user