chore: remove exp
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
||||
webhook_module "code.gitea.io/gitea/modules/webhook"
|
||||
|
||||
"github.com/nektos/act/pkg/jobparser"
|
||||
"golang.org/x/exp/slices"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
@@ -230,7 +229,7 @@ func UpdateRun(ctx context.Context, run *ActionRun, cols ...string) error {
|
||||
}
|
||||
_, err := sess.Update(run)
|
||||
|
||||
if run.Status != 0 || slices.Contains(cols, "status") {
|
||||
if run.Status != 0 || util.IsStringInSlice("status", cols) {
|
||||
if run.RepoID == 0 {
|
||||
run, err = GetRunByID(ctx, run.ID)
|
||||
if err != nil {
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
@@ -108,7 +107,7 @@ func UpdateRunJob(ctx context.Context, job *ActionRunJob, cond builder.Cond, col
|
||||
return 0, err
|
||||
}
|
||||
|
||||
if affected == 0 || (!slices.Contains(cols, "status") && job.Status == 0) {
|
||||
if affected == 0 || (!util.IsStringInSlice("status", cols) && job.Status == 0) {
|
||||
return affected, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user