feat(#1838): run_merge_config_pr handler (verify pr head, ff forge main, deploy)

This commit is contained in:
damocles 2026-06-23 11:20:38 +02:00
commit 0b86295776
3 changed files with 207 additions and 1 deletions

View file

@ -858,7 +858,23 @@ async fn dispatch(
) -> anyhow::Result<()> {
match (entry.kind, entry.approval_id) {
(QueueKind::Rebuild, Some(approval_id)) => {
crate::actions::run_approval_apply_commit(coord, Some(entry.id), approval_id).await
// Both ApplyCommit and MergeConfigPr approvals enqueue a Rebuild
// entry (they both end in a container rebuild); branch on the
// approval kind to pick the right pipeline. Fall back to the
// apply-commit path if the row can't be read — it re-fetches +
// surfaces a clean error itself.
let kind = coord
.approvals
.get(approval_id)
.ok()
.flatten()
.map(|a| a.kind);
if kind == Some(hive_sh4re::ApprovalKind::MergeConfigPr) {
crate::actions::run_approval_merge_config_pr(coord, Some(entry.id), approval_id)
.await
} else {
crate::actions::run_approval_apply_commit(coord, Some(entry.id), approval_id).await
}
}
(QueueKind::Rebuild, None) => {
let current_rev =