mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-18 00:47:48 -04:00
refactor: rename packages
This commit is contained in:
parent
fdd3444c52
commit
704f72017d
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2021 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import runnerv1 "code.gitea.io/bots-proto-go/runner/v1"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"bytes"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"math"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"bytes"
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"bufio"
|
@ -1,10 +1,10 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
)
|
||||
|
||||
const (
|
@ -1,12 +1,12 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,13 +1,13 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
packages_model "code.gitea.io/gitea/models/packages"
|
||||
@ -16,13 +16,13 @@ import (
|
||||
"code.gitea.io/gitea/models/unit"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/models/webhook"
|
||||
bots_module "code.gitea.io/gitea/modules/bots"
|
||||
bots_module "code.gitea.io/gitea/modules/actions"
|
||||
"code.gitea.io/gitea/modules/convert"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/json"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
bots_service "code.gitea.io/gitea/services/bots"
|
||||
bots_service "code.gitea.io/gitea/services/actions"
|
||||
|
||||
"github.com/nektos/act/pkg/jobparser"
|
||||
)
|
@ -12,8 +12,8 @@ import (
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/notification/action"
|
||||
"code.gitea.io/gitea/modules/notification/actions"
|
||||
"code.gitea.io/gitea/modules/notification/base"
|
||||
"code.gitea.io/gitea/modules/notification/bots"
|
||||
"code.gitea.io/gitea/modules/notification/indexer"
|
||||
"code.gitea.io/gitea/modules/notification/mail"
|
||||
"code.gitea.io/gitea/modules/notification/mirror"
|
||||
@ -42,7 +42,7 @@ func NewContext() {
|
||||
RegisterNotifier(action.NewNotifier())
|
||||
RegisterNotifier(mirror.NewNotifier())
|
||||
if setting.Bots.Enabled {
|
||||
RegisterNotifier(bots.NewNotifier())
|
||||
RegisterNotifier(actions.NewNotifier())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
"code.gitea.io/gitea/routers/api/bots/grpc"
|
||||
"code.gitea.io/gitea/routers/api/actions/grpc"
|
||||
)
|
||||
|
||||
func Routes(_ context.Context, prefix string) *web.Route {
|
@ -1,13 +1,13 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/routers/api/bots/ping"
|
||||
"code.gitea.io/gitea/routers/api/actions/ping"
|
||||
)
|
||||
|
||||
func TestPingService(t *testing.T) {
|
@ -6,7 +6,7 @@ package grpc
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/routers/api/bots/ping"
|
||||
"code.gitea.io/gitea/routers/api/actions/ping"
|
||||
|
||||
"code.gitea.io/bots-proto-go/ping/v1/pingv1connect"
|
||||
)
|
@ -6,7 +6,7 @@ package grpc
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/routers/api/bots/runner"
|
||||
"code.gitea.io/gitea/routers/api/actions/runner"
|
||||
|
||||
"code.gitea.io/bots-proto-go/runner/v1/runnerv1connect"
|
||||
)
|
@ -9,13 +9,13 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/webhook"
|
||||
"code.gitea.io/gitea/modules/bots"
|
||||
"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/bots"
|
||||
bot_service "code.gitea.io/gitea/services/actions"
|
||||
secret_service "code.gitea.io/gitea/services/secrets"
|
||||
|
||||
runnerv1 "code.gitea.io/bots-proto-go/runner/v1"
|
||||
@ -197,7 +197,7 @@ func (s *Service) UpdateLog(
|
||||
}
|
||||
|
||||
rows := req.Msg.Rows[ack-req.Msg.Index:]
|
||||
ns, err := bots.WriteLogs(ctx, task.LogFilename, task.LogSize, rows)
|
||||
ns, err := actions.WriteLogs(ctx, task.LogFilename, task.LogSize, rows)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "write logs: %v", err)
|
||||
}
|
||||
@ -215,7 +215,7 @@ func (s *Service) UpdateLog(
|
||||
var remove func()
|
||||
if req.Msg.NoMore {
|
||||
task.LogInStorage = true
|
||||
remove, err = bots.TransferLogs(ctx, task.LogFilename)
|
||||
remove, err = actions.TransferLogs(ctx, task.LogFilename)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "transfer logs: %v", err)
|
||||
}
|
@ -8,8 +8,8 @@ import (
|
||||
"crypto/subtle"
|
||||
"strings"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
auth_model "code.gitea.io/gitea/models/auth"
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
|
@ -70,7 +70,7 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_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"
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_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"
|
||||
|
@ -30,16 +30,16 @@ 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/bots"
|
||||
bots_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"
|
||||
"code.gitea.io/gitea/services/auth"
|
||||
"code.gitea.io/gitea/services/auth/source/oauth2"
|
||||
"code.gitea.io/gitea/services/automerge"
|
||||
bot_service "code.gitea.io/gitea/services/bots"
|
||||
"code.gitea.io/gitea/services/cron"
|
||||
"code.gitea.io/gitea/services/mailer"
|
||||
markup_service "code.gitea.io/gitea/services/markup"
|
||||
|
@ -7,7 +7,7 @@ package admin
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_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"
|
||||
|
@ -6,7 +6,7 @@ package org
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_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"
|
||||
|
@ -1,16 +1,16 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_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"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/bots"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/convert"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
@ -57,7 +57,7 @@ func List(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
workflows, err := bots.ListWorkflows(commit)
|
||||
workflows, err := actions.ListWorkflows(commit)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
@ -1,7 +1,7 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -9,13 +9,13 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/modules/bots"
|
||||
"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/bots"
|
||||
bots_service "code.gitea.io/gitea/services/actions"
|
||||
|
||||
runnerv1 "code.gitea.io/bots-proto-go/runner/v1"
|
||||
"xorm.io/builder"
|
||||
@ -145,7 +145,7 @@ func ViewPost(ctx *context_module.Context) {
|
||||
resp.LogsData.StreamingLogs = make([]ViewStepLog, 0, len(req.StepLogCursors))
|
||||
resp.StateData.CurrentJobInfo.Detail = current.Status.String()
|
||||
if task != nil {
|
||||
steps := bots.FullSteps(task)
|
||||
steps := actions.FullSteps(task)
|
||||
|
||||
resp.StateData.CurrentJobSteps = make([]ViewJobStep, len(steps))
|
||||
for i, v := range steps {
|
||||
@ -165,7 +165,7 @@ func ViewPost(ctx *context_module.Context) {
|
||||
length := step.LogLength - cursor.Cursor
|
||||
offset := (*task.LogIndexes)[index]
|
||||
var err error
|
||||
logRows, err = bots.ReadLogs(ctx, task.LogInStorage, task.LogFilename, offset, length)
|
||||
logRows, err = actions.ReadLogs(ctx, task.LogInStorage, task.LogFilename, offset, length)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
@ -18,8 +18,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/auth"
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
"code.gitea.io/gitea/models/perm"
|
||||
access_model "code.gitea.io/gitea/models/perm/access"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
|
@ -6,7 +6,7 @@ package repo
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_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"
|
||||
|
@ -34,7 +34,7 @@ import (
|
||||
"code.gitea.io/gitea/routers/web/misc"
|
||||
"code.gitea.io/gitea/routers/web/org"
|
||||
"code.gitea.io/gitea/routers/web/repo"
|
||||
"code.gitea.io/gitea/routers/web/repo/bots"
|
||||
"code.gitea.io/gitea/routers/web/repo/actions"
|
||||
"code.gitea.io/gitea/routers/web/user"
|
||||
user_setting "code.gitea.io/gitea/routers/web/user/setting"
|
||||
"code.gitea.io/gitea/routers/web/user/setting/security"
|
||||
@ -629,7 +629,7 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Get("/reset_registration_token", admin.ResetRunnerRegistrationToken)
|
||||
m.Combo("/{runnerid}").Get(admin.EditRunner).Post(bindIgnErr(forms.EditRunnerForm{}), admin.EditRunnerPost)
|
||||
m.Post("/{runnerid}/delete", admin.DeleteRunnerPost)
|
||||
}, bots.MustEnableBots)
|
||||
}, actions.MustEnableBots)
|
||||
}, func(ctx *context.Context) {
|
||||
ctx.Data["EnableOAuth2"] = setting.OAuth2.Enable
|
||||
ctx.Data["EnablePackages"] = setting.Packages.Enabled
|
||||
@ -792,7 +792,7 @@ func RegisterRoutes(m *web.Route) {
|
||||
Post(bindIgnErr(forms.EditRunnerForm{}), org.RunnersEditPost)
|
||||
m.Post("/{runnerid}/delete", org.RunnerDeletePost)
|
||||
m.Get("/reset_registration_token", org.ResetRunnerRegistrationToken)
|
||||
}, bots.MustEnableBots)
|
||||
}, actions.MustEnableBots)
|
||||
|
||||
m.Group("/secrets", func() {
|
||||
m.Get("", org.Secrets)
|
||||
@ -960,7 +960,7 @@ func RegisterRoutes(m *web.Route) {
|
||||
Post(bindIgnErr(forms.EditRunnerForm{}), repo.RunnersEditPost)
|
||||
m.Post("/{runnerid}/delete", repo.RunnerDeletePost)
|
||||
m.Get("/reset_registration_token", repo.ResetRunnerRegistrationToken)
|
||||
}, bots.MustEnableBots)
|
||||
}, actions.MustEnableBots)
|
||||
}, func(ctx *context.Context) {
|
||||
ctx.Data["PageIsSettings"] = true
|
||||
ctx.Data["LFSStartServer"] = setting.LFS.StartServer
|
||||
@ -1200,21 +1200,21 @@ func RegisterRoutes(m *web.Route) {
|
||||
}, reqRepoProjectsReader, repo.MustEnableProjects)
|
||||
|
||||
m.Group("/bots", func() {
|
||||
m.Get("", bots.List)
|
||||
m.Get("", actions.List)
|
||||
|
||||
m.Group("/runs/{run}", func() {
|
||||
m.Combo("").
|
||||
Get(bots.View).
|
||||
Post(bindIgnErr(bots.ViewRequest{}), bots.ViewPost)
|
||||
Get(actions.View).
|
||||
Post(bindIgnErr(actions.ViewRequest{}), actions.ViewPost)
|
||||
m.Group("/jobs/{job}", func() {
|
||||
m.Combo("").
|
||||
Get(bots.View).
|
||||
Post(bindIgnErr(bots.ViewRequest{}), bots.ViewPost)
|
||||
m.Post("/rerun", bots.Rerun)
|
||||
Get(actions.View).
|
||||
Post(bindIgnErr(actions.ViewRequest{}), actions.ViewPost)
|
||||
m.Post("/rerun", actions.Rerun)
|
||||
})
|
||||
m.Post("/cancel", bots.Cancel)
|
||||
m.Post("/cancel", actions.Cancel)
|
||||
})
|
||||
}, reqRepoBotsReader, bots.MustEnableBots)
|
||||
}, reqRepoBotsReader, actions.MustEnableBots)
|
||||
|
||||
m.Group("/wiki", func() {
|
||||
m.Combo("/").
|
||||
|
@ -1,19 +1,19 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
git_model "code.gitea.io/gitea/models/git"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/models/webhook"
|
||||
bots_module "code.gitea.io/gitea/modules/bots"
|
||||
bots_module "code.gitea.io/gitea/modules/actions"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/queue"
|
@ -1,13 +1,13 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
@ -1,14 +1,14 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
"code.gitea.io/gitea/modules/queue"
|
@ -1,12 +1,12 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package bots
|
||||
package actions
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
@ -8,8 +8,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
auth_model "code.gitea.io/gitea/models/auth"
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
bots_model "code.gitea.io/gitea/models/actions"
|
||||
auth_model "code.gitea.io/gitea/models/auth"
|
||||
bots_model "code.gitea.io/gitea/models/bots"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"context"
|
||||
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
bots_service "code.gitea.io/gitea/services/bots"
|
||||
bots_service "code.gitea.io/gitea/services/actions"
|
||||
)
|
||||
|
||||
func initBotsTasks() {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/notification"
|
||||
repo_module "code.gitea.io/gitea/modules/repository"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
bots_service "code.gitea.io/gitea/services/bots"
|
||||
bots_service "code.gitea.io/gitea/services/actions"
|
||||
pull_service "code.gitea.io/gitea/services/pull"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user