Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(action): no imports from bytebase/backend (#16821)

p0ny4a50dd0d19be
diff --git a/action/command/azure_devops.go b/action/command/azure_devops.go
index 381629c6df..c4dcd5fab0 100644
--- a/action/command/azure_devops.go
+++ b/action/command/azure_devops.go
@@ -5,7 +5,7 @@ import (
"github.com/pkg/errors"
- "github.com/bytebase/bytebase/backend/common"
+ "github.com/bytebase/bytebase/action/common"
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
)
diff --git a/action/command/bitbucket.go b/action/command/bitbucket.go
index e52b1425c5..262f23de33 100644
--- a/action/command/bitbucket.go
+++ b/action/command/bitbucket.go
@@ -11,7 +11,7 @@ import (
"github.com/pkg/errors"
- "github.com/bytebase/bytebase/backend/common"
+ "github.com/bytebase/bytebase/action/common"
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
)
diff --git a/action/command/gitlab.go b/action/command/gitlab.go
index 4e1f3a7127..1a697b4760 100644
--- a/action/command/gitlab.go
+++ b/action/command/gitlab.go
@@ -7,7 +7,7 @@ import (
"github.com/pkg/errors"
- "github.com/bytebase/bytebase/backend/common"
+ "github.com/bytebase/bytebase/action/common"
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
)
diff --git a/action/common/common.go b/action/common/common.go
new file mode 100644
index 0000000000..4f923ac37a
--- /dev/null
+++ b/action/common/common.go
@@ -0,0 +1,8 @@
+package common
+
+func ConvertLineToActionLine(line int) int {
+ if line < 0 {
+ return 1
+ }
+ return line + 1
+}
diff --git a/action/github/github.go b/action/github/github.go
index c90f0c0297..27a4bd34e7 100644
--- a/action/github/github.go
+++ b/action/github/github.go
@@ -10,7 +10,7 @@ import (
"github.com/caarlos0/env/v11"
"github.com/pkg/errors"
- "github.com/bytebase/bytebase/backend/common"
+ "github.com/bytebase/bytebase/action/common"
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
)
diff --git a/action/main.go b/action/main.go
index 1c7d1d7bdd..d6ae6df98f 100644
--- a/action/main.go
+++ b/action/main.go
@@ -11,7 +11,6 @@ import (
"github.com/bytebase/bytebase/action/args"
"github.com/bytebase/bytebase/action/command"
"github.com/bytebase/bytebase/action/world"
- "github.com/bytebase/bytebase/backend/common/log"
)
func main() {
@@ -32,7 +31,7 @@ func main() {
cmd := command.NewRootCommand(w)
if err := cmd.ExecuteContext(ctx); err != nil {
- slog.Error("failed to execute command", log.BBError(err))
+ slog.Error("failed to execute command", "error", fmt.Sprintf("%+v", err))
os.Exit(1)
}
}