feat(github): dispatch apply comment on deployment count#320
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The dispatch threshold (
Since this PR already has an approval, suggest new commits rather than a force-push. 🤖 This review was generated by Claude Code (claude-fable-5) with maintainer approval. |
… model MD-10b: aggregate header (state, per-status counts, single next-action), an at-a-glance per-deployment summary, and a <details> per deployment that reuses the single-deployment renderer for full per-table fidelity. Dormant until callers dispatch on operation-row count; single-deployment UX unchanged.
…deployment summaries Address review on the multi-deployment apply comment: suggest only the apply-id command forms today's CLI accepts (cutover/start) and the retry form for a failed apply, since revert applies only to a deployment in its post-cutover window and no --deployment flag exists yet. HTML-escape config-derived deployment names/labels, and render a placeholder for a deployment with no detail. Document that ApplyID/Environment are always set so the renderer need not guard them.
51d578c to
9db9b9f
Compare
MD-10c: map apply_operations to the presentation model and route the status comment to the single- or multi-deployment renderer by operation count. Dormant until the observer passes operations; single-deployment and legacy applies render byte-for-byte as today.
#317 replaced the apply_operations halt_on_failure *bool with the on_failure string enum. Resolve the presentation HaltOnFailure flag from on_failure at the storage boundary, failing closed to halting for any value other than "continue".
0211826 to
898bda6
Compare
What and Why ?
Wires the apply-comment path end to end: storage → presentation → render. Chooses the single- or multi-deployment renderer based on how many apply operations the apply owns, so single-deployment PRs are byte-for-byte unchanged and multi-deployment PRs get the new aggregated comment.
Changes
pkg/webhook/apply.go: extract sharedtableProgressFromTasks(...)helper used by the existing single-deployment comment builder.pkg/webhook/multi_apply.go: dispatcher that<= 1operation, uses the existing single-deployment renderer unchanged;>= 2operations, maps[]storage.ApplyOperationtopresentation.Operation, groups tasks byApplyOperationID, derives the presentation model, and renders the multi-deployment comment.Stacking
Final piece of the MD-10 per-deployment presentation series, on top of #315 (model) and the renderer PR.