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,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"
|
||||
|
||||
Reference in New Issue
Block a user