Skip to content

Commit 1c87be2

Browse files
committed
chore: use SliceContains
1 parent 3edc5d7 commit 1c87be2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

models/actions/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func UpdateRun(ctx context.Context, run *ActionRun, cols ...string) error {
229229
}
230230
_, err := sess.Update(run)
231231

232-
if run.Status != 0 || util.IsStringInSlice("status", cols) {
232+
if run.Status != 0 || util.SliceContains(cols, "status") {
233233
if run.RepoID == 0 {
234234
run, err = GetRunByID(ctx, run.ID)
235235
if err != nil {

models/actions/run_job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func UpdateRunJob(ctx context.Context, job *ActionRunJob, cond builder.Cond, col
107107
return 0, err
108108
}
109109

110-
if affected == 0 || (!util.IsStringInSlice("status", cols) && job.Status == 0) {
110+
if affected == 0 || (!util.SliceContains(cols, "status") && job.Status == 0) {
111111
return affected, nil
112112
}
113113

0 commit comments

Comments
 (0)