From 0ecebf8ce40ac05e43051c2f8961829ae7bbc52d Mon Sep 17 00:00:00 2001 From: garethgeorge Date: Sat, 16 Nov 2024 13:30:50 -0800 Subject: [PATCH] always set .Plan in hookvars to properly format messages for prune/check operations --- internal/orchestrator/taskrunnerimpl.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/orchestrator/taskrunnerimpl.go b/internal/orchestrator/taskrunnerimpl.go index 644827814..6937f463f 100644 --- a/internal/orchestrator/taskrunnerimpl.go +++ b/internal/orchestrator/taskrunnerimpl.go @@ -96,6 +96,10 @@ func (t *taskRunnerImpl) ExecuteHooks(ctx context.Context, events []v1.Hook_Cond if planID != "" { plan, _ = t.findPlan() vars.Plan = plan + } else { + vars.Plan = &v1.Plan{ + Id: tasks.PlanForUnassociatedOperations, + } } hookTasks, err := hook.TasksTriggeredByEvent(t.Config(), repoID, planID, t.op, events, vars)