From 083c3ee659c6c5542687f3bafae68cbc24dbc90f Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 25 Jun 2022 18:07:39 +0800 Subject: db: refactor "action" table to use GORM (#7054) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- internal/context/go_get.go | 3 ++- internal/context/repo.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/context') diff --git a/internal/context/go_get.go b/internal/context/go_get.go index 06417ebf..b83eda83 100644 --- a/internal/context/go_get.go +++ b/internal/context/go_get.go @@ -10,6 +10,7 @@ import ( "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/db" + "gogs.io/gogs/internal/repoutil" ) // ServeGoGet does quick responses for appropriate go-get meta with status OK @@ -52,7 +53,7 @@ func ServeGoGet() macaron.Handler { `, map[string]string{ "GoGetImport": path.Join(conf.Server.URL.Host, conf.Server.Subpath, ownerName, repoName), - "CloneLink": db.ComposeHTTPSCloneURL(ownerName, repoName), + "CloneLink": repoutil.HTTPSCloneURL(ownerName, repoName), "GoDocDirectory": prefix + "{/dir}", "GoDocFile": prefix + "{/dir}/{file}#L{line}", "InsecureFlag": insecureFlag, diff --git a/internal/context/repo.go b/internal/context/repo.go index 41fc6f7a..3b4b3281 100644 --- a/internal/context/repo.go +++ b/internal/context/repo.go @@ -18,6 +18,7 @@ import ( "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/db" + "gogs.io/gogs/internal/repoutil" ) type PullRequest struct { @@ -43,7 +44,7 @@ type Repository struct { TreePath string CommitID string RepoLink string - CloneLink db.CloneLink + CloneLink repoutil.CloneLink CommitsCount int64 Mirror *db.Mirror -- cgit v1.2.3