From 35b129e984e5469482c2dcd2d08e145494e964d1 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 14 Apr 2024 12:53:20 +0200 Subject: [PATCH] fix(actions): the trigger user of a schedule is the action user The user that caused the notification to re-evaluates the schedules is not the one that will trigger the workflows. They are background tasks that are authored by the action user (id -2). Such a mis-assignment is problematic when the user that caused the notification is deleted. Fixes: https://codeberg.org/forgejo/forgejo/issues/3211 (cherry picked from commit c3e2c2535918b2fa46e40eea5618005e7e05ac0f) --- services/actions/notifier_helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go index 0df7533496..5d1e2c122b 100644 --- a/services/actions/notifier_helper.go +++ b/services/actions/notifier_helper.go @@ -520,7 +520,7 @@ func handleSchedules( RepoID: input.Repo.ID, OwnerID: input.Repo.OwnerID, WorkflowID: dwf.EntryName, - TriggerUserID: input.Doer.ID, + TriggerUserID: user_model.ActionsUserID, Ref: input.Repo.DefaultBranch, CommitSHA: commit.ID.String(), Event: input.Event,