mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
refactor: rename packages
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user