wip(#1838): add MergeConfigPr approvalkind + match-site arms
This commit is contained in:
parent
4e4e9f8a60
commit
449e3fcb7b
4 changed files with 66 additions and 3 deletions
|
|
@ -870,6 +870,7 @@ fn history_view(a: Approval) -> ApprovalHistoryView {
|
|||
hive_sh4re::ApprovalKind::InitConfig => "init_config",
|
||||
hive_sh4re::ApprovalKind::UpdateMetaInputs => "update_meta_inputs",
|
||||
hive_sh4re::ApprovalKind::SchedulePrompt => "schedule_prompt",
|
||||
hive_sh4re::ApprovalKind::MergeConfigPr => "merge_config_pr",
|
||||
};
|
||||
ApprovalHistoryView {
|
||||
id: a.id,
|
||||
|
|
@ -939,6 +940,24 @@ async fn build_approval_views(approvals: Vec<Approval>) -> Vec<ApprovalView> {
|
|||
description: a.description,
|
||||
requested_at: a.requested_at,
|
||||
},
|
||||
hive_sh4re::ApprovalKind::MergeConfigPr => {
|
||||
// commit_ref = PR number; fetched_sha = the reviewed PR
|
||||
// head. Show the head sha; the forge PR diff surface is
|
||||
// a later phase (#1838 P4) — None for now.
|
||||
let sha = a
|
||||
.fetched_sha
|
||||
.as_deref()
|
||||
.map(|s| s[..s.len().min(12)].to_owned());
|
||||
ApprovalView {
|
||||
id: a.id,
|
||||
agent: a.agent,
|
||||
kind: "merge_config_pr",
|
||||
sha_short: sha,
|
||||
diff: None,
|
||||
description: a.description,
|
||||
requested_at: a.requested_at,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
out
|
||||
|
|
|
|||
Loading…
Reference in a new issue