From ea1bc1b662b53027401147d9ebb5b5474351ed35 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Tue, 22 Nov 2022 12:10:24 +0800 Subject: [PATCH] chore: replace with code.gitea.io/bots-proto-go --- go.mod | 4 ++-- go.sum | 8 ++++---- models/bots/runner.go | 2 +- models/bots/status.go | 2 +- models/bots/task.go | 2 +- modules/bots/log.go | 2 +- routers/api/bots/grpc/grpc.go | 5 ++--- routers/api/bots/grpc/ping.go | 3 ++- routers/api/bots/grpc/runner.go | 3 ++- routers/api/bots/ping/ping.go | 4 ++-- routers/api/bots/ping/ping_test.go | 2 +- routers/api/bots/ping/testping.go | 5 ++--- routers/api/bots/runner/runner.go | 4 ++-- routers/web/repo/bots/view.go | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 50a04a9582..04d17e2e2e 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module code.gitea.io/gitea go 1.18 require ( + code.gitea.io/bots-proto-go v0.0.0-20221121102336-f6af4c6176c1 code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b code.gitea.io/sdk/gitea v0.15.1 codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 - gitea.com/gitea/proto-go v0.0.0-20221118134050-62e4a9f56c7d gitea.com/go-chi/binding v0.0.0-20221013104517-b29891619681 gitea.com/go-chi/cache v0.2.0 gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5 @@ -18,7 +18,7 @@ require ( github.com/PuerkitoBio/goquery v1.8.0 github.com/alecthomas/chroma/v2 v2.3.0 github.com/blevesearch/bleve/v2 v2.3.4 - github.com/bufbuild/connect-go v1.0.0 + github.com/bufbuild/connect-go v1.1.0 github.com/bufbuild/connect-grpchealth-go v1.0.0 github.com/bufbuild/connect-grpcreflect-go v1.0.0 github.com/buildkite/terminal-to-html/v3 v3.7.0 diff --git a/go.sum b/go.sum index 6943873dc2..1b7c45661c 100644 --- a/go.sum +++ b/go.sum @@ -64,6 +64,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +code.gitea.io/bots-proto-go v0.0.0-20221121102336-f6af4c6176c1 h1:yXAB327HC+Cd4j+FoJWLzdE+dylZLbN1AVQlDAHUQgA= +code.gitea.io/bots-proto-go v0.0.0-20221121102336-f6af4c6176c1/go.mod h1:tZCdF4XQ1216T+JUHw2A091PA/QP3HLx7IXPv1l3v5c= code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE= code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b h1:uv9a8eGSdQ8Dr4HyUcuHFfDsk/QuwO+wf+Y99RYdxY0= code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE= @@ -83,8 +85,6 @@ git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 h1:cliQ4H git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078/go.mod h1:g/V2Hjas6Z1UHUp4yIx6bATpNzJ7DYtD0FG3+xARWxs= gitea.com/gitea/act v0.0.0-20221104080934-57978c14b59d h1:Xfdo11dwHpcjFtH0qebucf6zUqei8z9eZ4f0IMvoLjw= gitea.com/gitea/act v0.0.0-20221104080934-57978c14b59d/go.mod h1:lpzib6X73FHLSaTqTakan1xcsCAVhlZvPSpLns7jkRo= -gitea.com/gitea/proto-go v0.0.0-20221118134050-62e4a9f56c7d h1:xqNMHMmgliaehWAzMtWdqL6/ThdrYLZa/wPky9XdnMU= -gitea.com/gitea/proto-go v0.0.0-20221118134050-62e4a9f56c7d/go.mod h1:hD8YwSHusjwjEEgubW6XFvnZuNhMZTHz6lwjfltEt/Y= gitea.com/go-chi/binding v0.0.0-20221013104517-b29891619681 h1:MMSPgnVULVwV9kEBgvyEUhC9v/uviZ55hPJEMjpbNR4= gitea.com/go-chi/binding v0.0.0-20221013104517-b29891619681/go.mod h1:77TZu701zMXWJFvB8gvTbQ92zQ3DQq/H7l5wAEjQRKc= gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0= @@ -281,8 +281,8 @@ github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= -github.com/bufbuild/connect-go v1.0.0 h1:htSflKUT8y1jxhoPhPYTZMrsY3ipUXjjrbcZR5O2cVo= -github.com/bufbuild/connect-go v1.0.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I= +github.com/bufbuild/connect-go v1.1.0 h1:AUgqqO2ePdOJSpPOep6BPYz5v2moW1Lb8sQh0EeRzQ8= +github.com/bufbuild/connect-go v1.1.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I= github.com/bufbuild/connect-grpchealth-go v1.0.0 h1:33v883tL86jLomQT6R2ZYVYaI2cRkuUXvU30WfbQ/ko= github.com/bufbuild/connect-grpchealth-go v1.0.0/go.mod h1:6OEb4J3rh5+Wdvt4/muOIfZo1lt9cPU8ggwpsjBaZ3Y= github.com/bufbuild/connect-grpcreflect-go v1.0.0 h1:zWsLFYqrT1O2sNJFYfTXI5WxbAyiY2dvevvnJHPtV5A= diff --git a/models/bots/runner.go b/models/bots/runner.go index 6b6ed75291..ee898e6078 100644 --- a/models/bots/runner.go +++ b/models/bots/runner.go @@ -18,7 +18,7 @@ import ( "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - runnerv1 "gitea.com/gitea/proto-go/runner/v1" + runnerv1 "code.gitea.io/bots-proto-go/runner/v1" gouuid "github.com/google/uuid" "xorm.io/builder" ) diff --git a/models/bots/status.go b/models/bots/status.go index ae39cfa80a..998c9fcc23 100644 --- a/models/bots/status.go +++ b/models/bots/status.go @@ -4,7 +4,7 @@ package bots -import runnerv1 "gitea.com/gitea/proto-go/runner/v1" +import runnerv1 "code.gitea.io/bots-proto-go/runner/v1" // Status represents the status of Run, RunJob, Task, or TaskStep type Status int diff --git a/models/bots/task.go b/models/bots/task.go index dd83c66701..1fb136e1fe 100644 --- a/models/bots/task.go +++ b/models/bots/task.go @@ -23,7 +23,7 @@ import ( "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - runnerv1 "gitea.com/gitea/proto-go/runner/v1" + runnerv1 "code.gitea.io/bots-proto-go/runner/v1" gouuid "github.com/google/uuid" lru "github.com/hashicorp/golang-lru" "github.com/nektos/act/pkg/jobparser" diff --git a/modules/bots/log.go b/modules/bots/log.go index 072a770194..14f74a8412 100644 --- a/modules/bots/log.go +++ b/modules/bots/log.go @@ -16,8 +16,8 @@ import ( "code.gitea.io/gitea/models/dbfs" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/storage" - runnerv1 "gitea.com/gitea/proto-go/runner/v1" + runnerv1 "code.gitea.io/bots-proto-go/runner/v1" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/routers/api/bots/grpc/grpc.go b/routers/api/bots/grpc/grpc.go index a59672f4f5..d4949dcf65 100644 --- a/routers/api/bots/grpc/grpc.go +++ b/routers/api/bots/grpc/grpc.go @@ -7,9 +7,8 @@ package grpc import ( "net/http" - "gitea.com/gitea/proto-go/ping/v1/pingv1connect" - "gitea.com/gitea/proto-go/runner/v1/runnerv1connect" - + "code.gitea.io/bots-proto-go/ping/v1/pingv1connect" + "code.gitea.io/bots-proto-go/runner/v1/runnerv1connect" "github.com/bufbuild/connect-go" grpcreflect "github.com/bufbuild/connect-grpcreflect-go" "google.golang.org/grpc/health/grpc_health_v1" diff --git a/routers/api/bots/grpc/ping.go b/routers/api/bots/grpc/ping.go index 6e7b8886d8..6ba240904e 100644 --- a/routers/api/bots/grpc/ping.go +++ b/routers/api/bots/grpc/ping.go @@ -8,7 +8,8 @@ import ( "net/http" "code.gitea.io/gitea/routers/api/bots/ping" - "gitea.com/gitea/proto-go/ping/v1/pingv1connect" + + "code.gitea.io/bots-proto-go/ping/v1/pingv1connect" ) func PingRoute() (string, http.Handler) { diff --git a/routers/api/bots/grpc/runner.go b/routers/api/bots/grpc/runner.go index f2f27d250a..39e704d2fb 100644 --- a/routers/api/bots/grpc/runner.go +++ b/routers/api/bots/grpc/runner.go @@ -8,7 +8,8 @@ import ( "net/http" "code.gitea.io/gitea/routers/api/bots/runner" - "gitea.com/gitea/proto-go/runner/v1/runnerv1connect" + + "code.gitea.io/bots-proto-go/runner/v1/runnerv1connect" ) func RunnerRoute() (string, http.Handler) { diff --git a/routers/api/bots/ping/ping.go b/routers/api/bots/ping/ping.go index 74f33bd2da..37e3d77cdd 100644 --- a/routers/api/bots/ping/ping.go +++ b/routers/api/bots/ping/ping.go @@ -10,8 +10,8 @@ import ( "code.gitea.io/gitea/modules/log" - pingv1 "gitea.com/gitea/proto-go/ping/v1" - "gitea.com/gitea/proto-go/ping/v1/pingv1connect" + pingv1 "code.gitea.io/bots-proto-go/ping/v1" + "code.gitea.io/bots-proto-go/ping/v1/pingv1connect" "github.com/bufbuild/connect-go" ) diff --git a/routers/api/bots/ping/ping_test.go b/routers/api/bots/ping/ping_test.go index 30a9262bdc..480222725f 100644 --- a/routers/api/bots/ping/ping_test.go +++ b/routers/api/bots/ping/ping_test.go @@ -8,7 +8,7 @@ import ( "net/http" "testing" - "gitea.com/gitea/proto-go/ping/v1/pingv1connect" + "code.gitea.io/bots-proto-go/ping/v1/pingv1connect" ) func TestService(t *testing.T) { diff --git a/routers/api/bots/ping/testping.go b/routers/api/bots/ping/testping.go index 3398b30579..acfbf799a1 100644 --- a/routers/api/bots/ping/testping.go +++ b/routers/api/bots/ping/testping.go @@ -10,9 +10,8 @@ import ( "net/http/httptest" "testing" - pingv1 "gitea.com/gitea/proto-go/ping/v1" - "gitea.com/gitea/proto-go/ping/v1/pingv1connect" - + pingv1 "code.gitea.io/bots-proto-go/ping/v1" + "code.gitea.io/bots-proto-go/ping/v1/pingv1connect" "github.com/bufbuild/connect-go" "github.com/stretchr/testify/assert" ) diff --git a/routers/api/bots/runner/runner.go b/routers/api/bots/runner/runner.go index 629ad5669b..4962a88b02 100644 --- a/routers/api/bots/runner/runner.go +++ b/routers/api/bots/runner/runner.go @@ -22,8 +22,8 @@ import ( bot_service "code.gitea.io/gitea/services/bots" secret_service "code.gitea.io/gitea/services/secrets" - runnerv1 "gitea.com/gitea/proto-go/runner/v1" - "gitea.com/gitea/proto-go/runner/v1/runnerv1connect" + runnerv1 "code.gitea.io/bots-proto-go/runner/v1" + "code.gitea.io/bots-proto-go/runner/v1/runnerv1connect" "github.com/bufbuild/connect-go" gouuid "github.com/google/uuid" "google.golang.org/grpc/codes" diff --git a/routers/web/repo/bots/view.go b/routers/web/repo/bots/view.go index c2639a7281..1893aeaa54 100644 --- a/routers/web/repo/bots/view.go +++ b/routers/web/repo/bots/view.go @@ -17,7 +17,7 @@ import ( "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/web" - runnerv1 "gitea.com/gitea/proto-go/runner/v1" + runnerv1 "code.gitea.io/bots-proto-go/runner/v1" "xorm.io/builder" )