refactor: rename import alias

This commit is contained in:
Jason Song
2022-12-05 15:57:45 +08:00
parent 5f74b35377
commit 67c5c8868b
22 changed files with 233 additions and 233 deletions
+17 -17
View File
@@ -9,13 +9,13 @@ import (
"fmt"
"time"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/webhook"
"code.gitea.io/gitea/modules/actions"
"code.gitea.io/gitea/modules/json"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
bot_service "code.gitea.io/gitea/services/actions"
actions_service "code.gitea.io/gitea/services/actions"
secret_service "code.gitea.io/gitea/services/secrets"
runnerv1 "code.gitea.io/bots-proto-go/runner/v1"
@@ -42,7 +42,7 @@ func (s *Service) Register(
return nil, errors.New("missing runner token, name")
}
runnerToken, err := bots_model.GetRunnerToken(req.Msg.Token)
runnerToken, err := actions_model.GetRunnerToken(req.Msg.Token)
if err != nil {
return nil, errors.New("runner token not found")
}
@@ -52,7 +52,7 @@ func (s *Service) Register(
}
// create new runner
runner := &bots_model.BotRunner{
runner := &actions_model.BotRunner{
UUID: gouuid.New().String(),
Name: req.Msg.Name,
OwnerID: runnerToken.OwnerID,
@@ -65,13 +65,13 @@ func (s *Service) Register(
}
// create new runner
if err := bots_model.NewRunner(ctx, runner); err != nil {
if err := actions_model.NewRunner(ctx, runner); err != nil {
return nil, errors.New("can't create new runner")
}
// update token status
runnerToken.IsActive = true
if err := bots_model.UpdateRunnerToken(ctx, runnerToken, "is_active"); err != nil {
if err := actions_model.UpdateRunnerToken(ctx, runnerToken, "is_active"); err != nil {
return nil, errors.New("can't update runner token status")
}
@@ -133,7 +133,7 @@ func (s *Service) UpdateTask(
}
// Get Task first
task, err := bots_model.GetTaskByID(ctx, req.Msg.State.Id)
task, err := actions_model.GetTaskByID(ctx, req.Msg.State.Id)
if err != nil {
return nil, status.Errorf(codes.Internal, "can't find the task: %v", err)
}
@@ -146,7 +146,7 @@ func (s *Service) UpdateTask(
}), nil
}
task, err = bots_model.UpdateTaskByState(req.Msg.State)
task, err = actions_model.UpdateTaskByState(req.Msg.State)
if err != nil {
return nil, status.Errorf(codes.Internal, "update task: %v", err)
}
@@ -155,13 +155,13 @@ func (s *Service) UpdateTask(
return nil, status.Errorf(codes.Internal, "load job: %v", err)
}
if err := bot_service.CreateCommitStatus(ctx, task.Job); err != nil {
if err := actions_service.CreateCommitStatus(ctx, task.Job); err != nil {
log.Error("Update commit status failed: %v", err)
// go on
}
if req.Msg.State.Result != runnerv1.Result_RESULT_UNSPECIFIED {
if err := bot_service.EmitJobsIfReady(task.Job.RunID); err != nil {
if err := actions_service.EmitJobsIfReady(task.Job.RunID); err != nil {
log.Error("Emit ready jobs of run %d: %v", task.Job.RunID, err)
}
}
@@ -181,7 +181,7 @@ func (s *Service) UpdateLog(
) (*connect.Response[runnerv1.UpdateLogResponse], error) {
res := connect.NewResponse(&runnerv1.UpdateLogResponse{})
task, err := bots_model.GetTaskByID(ctx, req.Msg.TaskId)
task, err := actions_model.GetTaskByID(ctx, req.Msg.TaskId)
if err != nil {
return nil, status.Errorf(codes.Internal, "get task: %v", err)
}
@@ -203,7 +203,7 @@ func (s *Service) UpdateLog(
}
task.LogLength += int64(len(rows))
if task.LogIndexes == nil {
task.LogIndexes = &bots_model.LogIndexes{}
task.LogIndexes = &actions_model.LogIndexes{}
}
for _, n := range ns {
*task.LogIndexes = append(*task.LogIndexes, task.LogSize)
@@ -221,7 +221,7 @@ func (s *Service) UpdateLog(
}
}
if err := bots_model.UpdateTask(ctx, task, "log_indexes", "log_length", "log_size", "log_in_storage"); err != nil {
if err := actions_model.UpdateTask(ctx, task, "log_indexes", "log_length", "log_size", "log_in_storage"); err != nil {
return nil, status.Errorf(codes.Internal, "update task: %v", err)
}
if remove != nil {
@@ -231,8 +231,8 @@ func (s *Service) UpdateLog(
return res, nil
}
func pickTask(ctx context.Context, runner *bots_model.BotRunner) (*runnerv1.Task, bool, error) {
t, ok, err := bots_model.CreateTaskForRunner(ctx, runner)
func pickTask(ctx context.Context, runner *actions_model.BotRunner) (*runnerv1.Task, bool, error) {
t, ok, err := actions_model.CreateTaskForRunner(ctx, runner)
if err != nil {
return nil, false, fmt.Errorf("CreateTaskForRunner: %w", err)
}
@@ -249,7 +249,7 @@ func pickTask(ctx context.Context, runner *bots_model.BotRunner) (*runnerv1.Task
return task, true, nil
}
func getSecretsOfTask(ctx context.Context, task *bots_model.BotTask) map[string]string {
func getSecretsOfTask(ctx context.Context, task *actions_model.BotTask) map[string]string {
// Returning an error is worse than returning empty secrets.
secrets := map[string]string{}
@@ -289,7 +289,7 @@ func getSecretsOfTask(ctx context.Context, task *bots_model.BotTask) map[string]
return secrets
}
func generateTaskContext(t *bots_model.BotTask) *structpb.Struct {
func generateTaskContext(t *actions_model.BotTask) *structpb.Struct {
event := map[string]interface{}{}
_ = json.Unmarshal([]byte(t.Job.Run.EventPayload), &event)
+6 -6
View File
@@ -8,7 +8,7 @@ import (
"crypto/subtle"
"strings"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
auth_model "code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/timeutil"
@@ -31,9 +31,9 @@ var WithRunner = connect.WithInterceptors(connect.UnaryInterceptorFunc(func(unar
}
uuid := request.Header().Get(uuidHeaderKey)
token := request.Header().Get(tokenHeaderKey)
runner, err := bots_model.GetRunnerByUUID(uuid)
runner, err := actions_model.GetRunnerByUUID(uuid)
if err != nil {
if _, ok := err.(bots_model.ErrRunnerNotExist); ok {
if _, ok := err.(actions_model.ErrRunnerNotExist); ok {
return nil, status.Error(codes.Unauthenticated, "unregistered runner")
}
return nil, status.Error(codes.Internal, err.Error())
@@ -48,7 +48,7 @@ var WithRunner = connect.WithInterceptors(connect.UnaryInterceptorFunc(func(unar
runner.LastActive = timeutil.TimeStampNow()
cols = append(cols, "last_active")
}
if err := bots_model.UpdateRunner(ctx, runner, cols...); err != nil {
if err := actions_model.UpdateRunner(ctx, runner, cols...); err != nil {
log.Error("can't update runner status: %v", err)
}
@@ -67,9 +67,9 @@ func getMethodName(req connect.AnyRequest) string {
type runnerCtxKey struct{}
func GetRunner(ctx context.Context) *bots_model.BotRunner {
func GetRunner(ctx context.Context) *actions_model.BotRunner {
if v := ctx.Value(runnerCtxKey{}); v != nil {
if r, ok := v.(*bots_model.BotRunner); ok {
if r, ok := v.(*actions_model.BotRunner); ok {
return r
}
}
+3 -3
View File
@@ -70,7 +70,7 @@ import (
"reflect"
"strings"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/models/perm"
access_model "code.gitea.io/gitea/models/perm/access"
@@ -187,9 +187,9 @@ func repoAssignment() func(ctx *context.APIContext) {
if ctx.Doer != nil && ctx.Doer.ID == user_model.BotUserID {
botTaskID := ctx.Data["BotTaskID"].(int64)
task, err := bots_model.GetTaskByID(ctx, botTaskID)
task, err := actions_model.GetTaskByID(ctx, botTaskID)
if err != nil {
ctx.Error(http.StatusInternalServerError, "bots_model.GetTaskByID", err)
ctx.Error(http.StatusInternalServerError, "actions_model.GetTaskByID", err)
return
}
if task.RepoID != repo.ID {
+18 -18
View File
@@ -8,7 +8,7 @@ import (
"net/http"
"strings"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
@@ -18,14 +18,14 @@ import (
)
// RunnersList render common runners list page
func RunnersList(ctx *context.Context, tplName base.TplName, opts bots_model.FindRunnerOptions) {
count, err := bots_model.CountRunners(opts)
func RunnersList(ctx *context.Context, tplName base.TplName, opts actions_model.FindRunnerOptions) {
count, err := actions_model.CountRunners(opts)
if err != nil {
ctx.ServerError("AdminRunners", err)
return
}
runners, err := bots_model.FindRunners(opts)
runners, err := actions_model.FindRunners(opts)
if err != nil {
ctx.ServerError("AdminRunners", err)
return
@@ -36,10 +36,10 @@ func RunnersList(ctx *context.Context, tplName base.TplName, opts bots_model.Fin
}
// ownid=0,repo_id=0,means this token is used for global
var token *bots_model.BotRunnerToken
token, err = bots_model.GetUnactivatedRunnerToken(opts.OwnerID, opts.RepoID)
if _, ok := err.(bots_model.ErrRunnerTokenNotExist); ok {
token, err = bots_model.NewRunnerToken(opts.OwnerID, opts.RepoID)
var token *actions_model.BotRunnerToken
token, err = actions_model.GetUnactivatedRunnerToken(opts.OwnerID, opts.RepoID)
if _, ok := err.(actions_model.ErrRunnerTokenNotExist); ok {
token, err = actions_model.NewRunnerToken(opts.OwnerID, opts.RepoID)
if err != nil {
ctx.ServerError("CreateRunnerToken", err)
return
@@ -64,7 +64,7 @@ func RunnersList(ctx *context.Context, tplName base.TplName, opts bots_model.Fin
// RunnerDetails render runner details page
func RunnerDetails(ctx *context.Context, tplName base.TplName, page int, runnerID, ownerID, repoID int64) {
runner, err := bots_model.GetRunnerByID(runnerID)
runner, err := actions_model.GetRunnerByID(runnerID)
if err != nil {
ctx.ServerError("GetRunnerByID", err)
return
@@ -81,23 +81,23 @@ func RunnerDetails(ctx *context.Context, tplName base.TplName, page int, runnerI
ctx.Data["Runner"] = runner
opts := bots_model.FindTaskOptions{
opts := actions_model.FindTaskOptions{
ListOptions: db.ListOptions{
Page: page,
PageSize: 30,
},
Status: bots_model.StatusUnknown, // Unknown means all
Status: actions_model.StatusUnknown, // Unknown means all
IDOrderDesc: true,
RunnerID: runner.ID,
}
count, err := bots_model.CountTasks(ctx, opts)
count, err := actions_model.CountTasks(ctx, opts)
if err != nil {
ctx.ServerError("CountTasks", err)
return
}
tasks, _, err := bots_model.FindTasks(ctx, opts)
tasks, _, err := actions_model.FindTasks(ctx, opts)
if err != nil {
ctx.ServerError("FindTasks", err)
return
@@ -116,7 +116,7 @@ func RunnerDetails(ctx *context.Context, tplName base.TplName, page int, runnerI
// RunnerDetailsEditPost response for edit runner details
func RunnerDetailsEditPost(ctx *context.Context, runnerID, ownerID, repoID int64, redirectTo string) {
runner, err := bots_model.GetRunnerByID(runnerID)
runner, err := actions_model.GetRunnerByID(runnerID)
if err != nil {
log.Warn("RunnerDetailsEditPost.GetRunnerByID failed: %v, url: %s", err, ctx.Req.URL)
ctx.ServerError("RunnerDetailsEditPost.GetRunnerByID", err)
@@ -132,7 +132,7 @@ func RunnerDetailsEditPost(ctx *context.Context, runnerID, ownerID, repoID int64
runner.Description = form.Description
runner.CustomLabels = strings.Split(form.CustomLabels, ",")
err = bots_model.UpdateRunner(ctx, runner, "description", "custom_labels")
err = actions_model.UpdateRunner(ctx, runner, "description", "custom_labels")
if err != nil {
log.Warn("RunnerDetailsEditPost.UpdateRunner failed: %v, url: %s", err, ctx.Req.URL)
ctx.Flash.Warning(ctx.Tr("admin.runners.update_runner_failed"))
@@ -148,7 +148,7 @@ func RunnerDetailsEditPost(ctx *context.Context, runnerID, ownerID, repoID int64
// RunnerResetRegistrationToken reset registration token
func RunnerResetRegistrationToken(ctx *context.Context, ownerID, repoID int64, redirectTo string) {
_, err := bots_model.NewRunnerToken(ownerID, repoID)
_, err := actions_model.NewRunnerToken(ownerID, repoID)
if err != nil {
ctx.ServerError("ResetRunnerRegistrationToken", err)
return
@@ -162,14 +162,14 @@ func RunnerResetRegistrationToken(ctx *context.Context, ownerID, repoID int64, r
func RunnerDeletePost(ctx *context.Context, runnerID int64,
successRedirectTo, failedRedirectTo string,
) {
runner, err := bots_model.GetRunnerByID(runnerID)
runner, err := actions_model.GetRunnerByID(runnerID)
if err != nil {
log.Warn("DeleteRunnerPost.GetRunnerByID failed: %v, url: %s", err, ctx.Req.URL)
ctx.ServerError("DeleteRunnerPost.GetRunnerByID", err)
return
}
err = bots_model.DeleteRunner(ctx, runner)
err = actions_model.DeleteRunner(ctx, runner)
if err != nil {
log.Warn("DeleteRunnerPost.UpdateRunner failed: %v, url: %s", err, ctx.Req.URL)
ctx.Flash.Warning(ctx.Tr("runners.delete_runner_failed"))
+4 -4
View File
@@ -30,13 +30,13 @@ import (
"code.gitea.io/gitea/modules/translation"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/web"
bots_router "code.gitea.io/gitea/routers/api/actions"
actions_router "code.gitea.io/gitea/routers/api/actions"
packages_router "code.gitea.io/gitea/routers/api/packages"
apiv1 "code.gitea.io/gitea/routers/api/v1"
"code.gitea.io/gitea/routers/common"
"code.gitea.io/gitea/routers/private"
web_routers "code.gitea.io/gitea/routers/web"
bot_service "code.gitea.io/gitea/services/actions"
actions_service "code.gitea.io/gitea/services/actions"
"code.gitea.io/gitea/services/auth"
"code.gitea.io/gitea/services/auth/source/oauth2"
"code.gitea.io/gitea/services/automerge"
@@ -174,7 +174,7 @@ func GlobalInitInstalled(ctx context.Context) {
auth.Init()
svg.Init()
bot_service.Init()
actions_service.Init()
// Finally start up the cron
cron.NewContext(ctx)
@@ -204,7 +204,7 @@ func NormalRoutes(ctx context.Context) *web.Route {
if setting.Bots.Enabled {
prefix := "/api/bots"
r.Mount(prefix, bots_router.Routes(ctx, prefix))
r.Mount(prefix, actions_router.Routes(ctx, prefix))
}
return r
+2 -2
View File
@@ -7,7 +7,7 @@ package admin
import (
"net/url"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
@@ -31,7 +31,7 @@ func Runners(ctx *context.Context) {
page = 1
}
opts := bots_model.FindRunnerOptions{
opts := actions_model.FindRunnerOptions{
ListOptions: db.ListOptions{
Page: page,
PageSize: 100,
+2 -2
View File
@@ -6,7 +6,7 @@ package org
import (
"net/url"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/common"
@@ -23,7 +23,7 @@ func Runners(ctx *context.Context) {
page = 1
}
opts := bots_model.FindRunnerOptions{
opts := actions_model.FindRunnerOptions{
ListOptions: db.ListOptions{
Page: page,
PageSize: 100,
+5 -5
View File
@@ -6,7 +6,7 @@ package actions
import (
"net/http"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/actions"
@@ -74,7 +74,7 @@ func List(ctx *context.Context) {
workflow := ctx.FormString("workflow")
ctx.Data["CurWorkflow"] = workflow
opts := bots_model.FindRunOptions{
opts := actions_model.FindRunOptions{
ListOptions: db.ListOptions{
Page: page,
PageSize: convert.ToCorrectPageSize(ctx.FormInt("limit")),
@@ -85,7 +85,7 @@ func List(ctx *context.Context) {
// open counts
opts.IsClosed = util.OptionalBoolFalse
numOpenRuns, err := bots_model.CountRuns(ctx, opts)
numOpenRuns, err := actions_model.CountRuns(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
@@ -94,7 +94,7 @@ func List(ctx *context.Context) {
// closed counts
opts.IsClosed = util.OptionalBoolTrue
numClosedRuns, err := bots_model.CountRuns(ctx, opts)
numClosedRuns, err := actions_model.CountRuns(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
@@ -108,7 +108,7 @@ func List(ctx *context.Context) {
} else {
opts.IsClosed = util.OptionalBoolFalse
}
runs, total, err := bots_model.FindRuns(ctx, opts)
runs, total, err := actions_model.FindRuns(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
+15 -15
View File
@@ -9,13 +9,13 @@ import (
"net/http"
"time"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/actions"
context_module "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/web"
bots_service "code.gitea.io/gitea/services/actions"
actions_service "code.gitea.io/gitea/services/actions"
runnerv1 "code.gitea.io/bots-proto-go/runner/v1"
"xorm.io/builder"
@@ -125,10 +125,10 @@ func ViewPost(ctx *context_module.Context) {
},
}
var task *bots_model.BotTask
var task *actions_model.BotTask
if current.TaskID > 0 {
var err error
task, err = bots_model.GetTaskByID(ctx, current.TaskID)
task, err = actions_model.GetTaskByID(ctx, current.TaskID)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
@@ -206,15 +206,15 @@ func Rerun(ctx *context_module.Context) {
}
job.TaskID = 0
job.Status = bots_model.StatusWaiting
job.Status = actions_model.StatusWaiting
job.Started = 0
job.Stopped = 0
if err := db.WithTx(ctx, func(ctx context.Context) error {
if _, err := bots_model.UpdateRunJob(ctx, job, builder.Eq{"status": status}, "task_id", "status", "started", "stopped"); err != nil {
if _, err := actions_model.UpdateRunJob(ctx, job, builder.Eq{"status": status}, "task_id", "status", "started", "stopped"); err != nil {
return err
}
return bots_service.CreateCommitStatus(ctx, job)
return actions_service.CreateCommitStatus(ctx, job)
}); err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
@@ -238,9 +238,9 @@ func Cancel(ctx *context_module.Context) {
continue
}
if job.TaskID == 0 {
job.Status = bots_model.StatusCancelled
job.Status = actions_model.StatusCancelled
job.Stopped = timeutil.TimeStampNow()
n, err := bots_model.UpdateRunJob(ctx, job, builder.Eq{"task_id": 0}, "status", "stopped")
n, err := actions_model.UpdateRunJob(ctx, job, builder.Eq{"task_id": 0}, "status", "stopped")
if err != nil {
return err
}
@@ -249,10 +249,10 @@ func Cancel(ctx *context_module.Context) {
}
continue
}
if err := bots_model.StopTask(ctx, job.TaskID, bots_model.StatusCancelled); err != nil {
if err := actions_model.StopTask(ctx, job.TaskID, actions_model.StatusCancelled); err != nil {
return err
}
if err := bots_service.CreateCommitStatus(ctx, job); err != nil {
if err := actions_service.CreateCommitStatus(ctx, job); err != nil {
return err
}
}
@@ -268,10 +268,10 @@ func Cancel(ctx *context_module.Context) {
// getRunJobs gets the jobs of runIndex, and returns jobs[jobIndex], jobs.
// Any error will be written to the ctx.
// It never returns a nil job of an empty jobs, if the jobIndex is out of range, it will be treated as 0.
func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*bots_model.BotRunJob, []*bots_model.BotRunJob) {
run, err := bots_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions_model.BotRunJob, []*actions_model.BotRunJob) {
run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
if err != nil {
if _, ok := err.(bots_model.ErrRunNotExist); ok {
if _, ok := err.(actions_model.ErrRunNotExist); ok {
ctx.Error(http.StatusNotFound, err.Error())
return nil, nil
}
@@ -280,7 +280,7 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*bots_mo
}
run.Repo = ctx.Repo.Repository
jobs, err := bots_model.GetRunJobsByRunID(ctx, run.ID)
jobs, err := actions_model.GetRunJobsByRunID(ctx, run.ID)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return nil, nil
+2 -2
View File
@@ -18,7 +18,7 @@ import (
"sync"
"time"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/models/perm"
access_model "code.gitea.io/gitea/models/perm/access"
@@ -189,7 +189,7 @@ func httpBase(ctx *context.Context) (h *serviceHandler) {
if ctx.Data["IsBotToken"] == true {
taskID := ctx.Data["BotTaskID"].(int64)
task, err := bots_model.GetTaskByID(ctx, taskID)
task, err := actions_model.GetTaskByID(ctx, taskID)
if err != nil {
ctx.ServerError("GetTaskByID", err)
return
+2 -2
View File
@@ -6,7 +6,7 @@ package repo
import (
"net/url"
bots_model "code.gitea.io/gitea/models/actions"
actions_model "code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/common"
@@ -27,7 +27,7 @@ func Runners(ctx *context.Context) {
page = 1
}
opts := bots_model.FindRunnerOptions{
opts := actions_model.FindRunnerOptions{
ListOptions: db.ListOptions{
Page: page,
PageSize: 100,