mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-29 07:46:49 +00:00
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 c3e2c25359
)
This commit is contained in:
parent
69007f1444
commit
387aea4434
|
@ -452,7 +452,7 @@ func handleSchedules(
|
||||||
RepoID: input.Repo.ID,
|
RepoID: input.Repo.ID,
|
||||||
OwnerID: input.Repo.OwnerID,
|
OwnerID: input.Repo.OwnerID,
|
||||||
WorkflowID: dwf.EntryName,
|
WorkflowID: dwf.EntryName,
|
||||||
TriggerUserID: input.Doer.ID,
|
TriggerUserID: user_model.ActionsUserID,
|
||||||
Ref: input.Repo.DefaultBranch,
|
Ref: input.Repo.DefaultBranch,
|
||||||
CommitSHA: commit.ID.String(),
|
CommitSHA: commit.ID.String(),
|
||||||
Event: webhook_module.HookEventType(api.HookScheduleCreated),
|
Event: webhook_module.HookEventType(api.HookScheduleCreated),
|
||||||
|
|
Loading…
Reference in a new issue