1
0
Fork 0

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
This commit is contained in:
Earl Warren 2024-04-14 12:53:20 +02:00
parent b833e5e7db
commit c3e2c25359
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -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,