Skip to content

Commit 0c3b0fc

Browse files
committed
notifier ==> notify_service to align with the codebase
1 parent 071a28c commit 0c3b0fc

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

routers/api/actions/runner/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"code.gitea.io/gitea/modules/log"
1616
"code.gitea.io/gitea/modules/util"
1717
actions_service "code.gitea.io/gitea/services/actions"
18-
notifier "code.gitea.io/gitea/services/notify"
18+
notify_service "code.gitea.io/gitea/services/notify"
1919

2020
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
2121
"code.gitea.io/actions-proto-go/runner/v1/runnerv1connect"
@@ -221,7 +221,7 @@ func (s *Service) UpdateTask(
221221
}
222222

223223
if task.Status.IsDone() {
224-
notifier.WorkflowJobStatusUpdate(ctx, task.Job.Run.Repo, task.Job.Run.TriggerUser, task.Job, task)
224+
notify_service.WorkflowJobStatusUpdate(ctx, task.Job.Run.Repo, task.Job.Run.TriggerUser, task.Job, task)
225225
}
226226

227227
if req.Msg.State.Result != runnerv1.Result_RESULT_UNSPECIFIED {

routers/web/repo/actions/view.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"code.gitea.io/gitea/modules/web"
3434
actions_service "code.gitea.io/gitea/services/actions"
3535
context_module "code.gitea.io/gitea/services/context"
36-
notifier "code.gitea.io/gitea/services/notify"
36+
notify_service "code.gitea.io/gitea/services/notify"
3737

3838
"github.com/nektos/act/pkg/model"
3939
"xorm.io/builder"
@@ -460,7 +460,7 @@ func rerunJob(ctx *context_module.Context, job *actions_model.ActionRunJob, shou
460460

461461
actions_service.CreateCommitStatus(ctx, job)
462462
_ = job.LoadAttributes(ctx)
463-
notifier.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
463+
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
464464

465465
return nil
466466
}
@@ -559,7 +559,7 @@ func Cancel(ctx *context_module.Context) {
559559

560560
for _, job := range updatedjobs {
561561
_ = job.LoadAttributes(ctx)
562-
notifier.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
562+
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
563563
}
564564

565565
ctx.JSON(http.StatusOK, struct{}{})
@@ -605,7 +605,7 @@ func Approve(ctx *context_module.Context) {
605605

606606
for _, job := range updatedjobs {
607607
_ = job.LoadAttributes(ctx)
608-
notifier.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
608+
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
609609
}
610610

611611
ctx.JSON(http.StatusOK, struct{}{})

services/actions/clear_tasks.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"code.gitea.io/gitea/modules/log"
1515
"code.gitea.io/gitea/modules/setting"
1616
"code.gitea.io/gitea/modules/timeutil"
17-
notifier "code.gitea.io/gitea/services/notify"
17+
notify_service "code.gitea.io/gitea/services/notify"
1818
)
1919

2020
// StopZombieTasks stops the task which have running status, but haven't been updated for a long time
@@ -71,7 +71,7 @@ func stopTasks(ctx context.Context, opts actions_model.FindTaskOptions) error {
7171
CreateCommitStatus(ctx, jobs...)
7272
for _, job := range jobs {
7373
_ = job.LoadAttributes(ctx)
74-
notifier.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
74+
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
7575
}
7676
return nil
7777
}
@@ -103,7 +103,7 @@ func CancelAbandonedJobs(ctx context.Context) error {
103103
CreateCommitStatus(ctx, job)
104104
if updated {
105105
_ = job.LoadAttributes(ctx)
106-
notifier.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
106+
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
107107
}
108108
}
109109

services/actions/job_emitter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"code.gitea.io/gitea/models/db"
1313
"code.gitea.io/gitea/modules/graceful"
1414
"code.gitea.io/gitea/modules/queue"
15-
notifier "code.gitea.io/gitea/services/notify"
15+
notify_service "code.gitea.io/gitea/services/notify"
1616

1717
"github.com/nektos/act/pkg/jobparser"
1818
"xorm.io/builder"
@@ -76,7 +76,7 @@ func checkJobsOfRun(ctx context.Context, runID int64) error {
7676
CreateCommitStatus(ctx, jobs...)
7777
for _, job := range updatedjobs {
7878
_ = job.LoadAttributes(ctx)
79-
notifier.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
79+
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
8080
}
8181
return nil
8282
}

services/actions/notifier_helper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
api "code.gitea.io/gitea/modules/structs"
2828
webhook_module "code.gitea.io/gitea/modules/webhook"
2929
"code.gitea.io/gitea/services/convert"
30-
notifier "code.gitea.io/gitea/services/notify"
30+
notify_service "code.gitea.io/gitea/services/notify"
3131

3232
"github.com/nektos/act/pkg/jobparser"
3333
"github.com/nektos/act/pkg/model"
@@ -365,7 +365,7 @@ func handleWorkflows(
365365
}
366366
CreateCommitStatus(ctx, alljobs...)
367367
for _, job := range alljobs {
368-
notifier.WorkflowJobStatusUpdate(ctx, input.Repo, input.Doer, job, nil)
368+
notify_service.WorkflowJobStatusUpdate(ctx, input.Repo, input.Doer, job, nil)
369369
}
370370
}
371371
return nil

services/actions/schedule_tasks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"code.gitea.io/gitea/modules/log"
1616
"code.gitea.io/gitea/modules/timeutil"
1717
webhook_module "code.gitea.io/gitea/modules/webhook"
18-
notifier "code.gitea.io/gitea/services/notify"
18+
notify_service "code.gitea.io/gitea/services/notify"
1919

2020
"github.com/nektos/act/pkg/jobparser"
2121
)
@@ -158,7 +158,7 @@ func CreateScheduleTask(ctx context.Context, cron *actions_model.ActionSchedule)
158158
log.Error("LoadAttributes: %v", err)
159159
}
160160
for _, job := range allJobs {
161-
notifier.WorkflowJobStatusUpdate(ctx, run.Repo, run.TriggerUser, job, nil)
161+
notify_service.WorkflowJobStatusUpdate(ctx, run.Repo, run.TriggerUser, job, nil)
162162
}
163163

164164
// Return nil if no errors occurred

services/actions/task.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
actions_model "code.gitea.io/gitea/models/actions"
1111
"code.gitea.io/gitea/models/db"
1212
secret_model "code.gitea.io/gitea/models/secret"
13-
notifier "code.gitea.io/gitea/services/notify"
13+
notify_service "code.gitea.io/gitea/services/notify"
1414

1515
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
1616
"google.golang.org/protobuf/types/known/structpb"
@@ -77,7 +77,7 @@ func PickTask(ctx context.Context, runner *actions_model.ActionRunner) (*runnerv
7777
}
7878

7979
CreateCommitStatus(ctx, job)
80-
notifier.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, actionTask)
80+
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, actionTask)
8181

8282
return task, true, nil
8383
}

0 commit comments

Comments
 (0)