diff --git a/models/actions/run.go b/models/actions/run.go index b374558981..76218e6e42 100644 --- a/models/actions/run.go +++ b/models/actions/run.go @@ -4,6 +4,7 @@ package actions import ( + "code.gitea.io/gitea/modules/setting" "context" "errors" "fmt" @@ -420,10 +421,7 @@ func UpdateRun(ctx context.Context, run *ActionRun, cols ...string) error { if run.Status != 0 || slices.Contains(cols, "status") { if run.RepoID == 0 { - run, err = GetRunByRepoAndID(ctx, run.RepoID, run.ID) - if err != nil { - return err - } + setting.PanicInDevOrTesting("RepoID should not be 0") } if err = run.LoadRepo(ctx); err != nil { return err