Skip to content

Commit 401f8b1

Browse files
committed
fix typos
1 parent 06a7a8c commit 401f8b1

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

models/actions/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func UpdateRun(ctx context.Context, run *ActionRun, cols ...string) error {
375375

376376
type ActionRunIndex db.ResourceIndex
377377

378-
func ShouldBlockRunByConcurreny(ctx context.Context, actionRun *ActionRun) (bool, error) {
378+
func ShouldBlockRunByConcurrency(ctx context.Context, actionRun *ActionRun) (bool, error) {
379379
if len(actionRun.ConcurrencyGroup) == 0 {
380380
return false, nil
381381
}

models/actions/run_job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func AggregateJobStatus(jobs []*ActionRunJob) Status {
192192
}
193193
}
194194

195-
func ShouldBlockJobByConcurreny(ctx context.Context, actionRunJob *ActionRunJob) (bool, error) {
195+
func ShouldBlockJobByConcurrency(ctx context.Context, actionRunJob *ActionRunJob) (bool, error) {
196196
if len(actionRunJob.RawConcurrencyGroup) == 0 {
197197
return false, nil
198198
}

routers/web/repo/actions/view.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,11 @@ func Approve(ctx *context_module.Context) {
560560
return err
561561
}
562562
for _, job := range jobs {
563-
blockedByConcurrency, err := actions_model.ShouldBlockJobByConcurreny(ctx, job)
563+
blockByConcurrency, err := actions_model.ShouldBlockJobByConcurrency(ctx, job)
564564
if err != nil {
565565
return err
566566
}
567-
if len(job.Needs) == 0 && job.Status.IsBlocked() && !blockedByConcurrency {
567+
if len(job.Needs) == 0 && job.Status.IsBlocked() && !blockByConcurrency {
568568
job.Status = actions_model.StatusWaiting
569569
_, err := actions_model.UpdateRunJob(ctx, job, nil, "status")
570570
if err != nil {

services/actions/job_emitter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,5 +309,5 @@ func checkConcurrencyForJobWithNeeds(ctx context.Context, actionRunJob *actions_
309309
}
310310
}
311311

312-
return actions_model.ShouldBlockJobByConcurreny(ctx, actionRunJob)
312+
return actions_model.ShouldBlockJobByConcurrency(ctx, actionRunJob)
313313
}

services/actions/run.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ func InsertRun(ctx context.Context, run *actions_model.ActionRun, jobs []*jobpar
3232
run.Title = util.EllipsisDisplayString(run.Title, 255)
3333

3434
// check run (workflow-level) concurrency
35-
shouldBlockRunByConcurreny, err := actions_model.ShouldBlockRunByConcurreny(ctx, run)
35+
blockRunByConcurrency, err := actions_model.ShouldBlockRunByConcurrency(ctx, run)
3636
if err != nil {
3737
return err
3838
}
39-
if shouldBlockRunByConcurreny {
39+
if blockRunByConcurrency {
4040
run.Status = actions_model.StatusBlocked
4141
}
4242

@@ -105,11 +105,11 @@ func InsertRun(ctx context.Context, run *actions_model.ActionRun, jobs []*jobpar
105105
}
106106
runJob.IsConcurrencyEvaluated = true
107107
// check if the job should be blocked by job concurrency
108-
shouldBlock, err := actions_model.ShouldBlockJobByConcurreny(ctx, runJob)
108+
blockByConcurrency, err := actions_model.ShouldBlockJobByConcurrency(ctx, runJob)
109109
if err != nil {
110110
return err
111111
}
112-
if shouldBlock {
112+
if blockByConcurrency {
113113
runJob.Status = actions_model.StatusBlocked
114114
}
115115
}

0 commit comments

Comments
 (0)