diff options
Diffstat (limited to 'modules/repofiles')
-rw-r--r-- | modules/repofiles/blob.go | 2 | ||||
-rw-r--r-- | modules/repofiles/blob_test.go | 2 | ||||
-rw-r--r-- | modules/repofiles/content.go | 2 | ||||
-rw-r--r-- | modules/repofiles/content_test.go | 6 | ||||
-rw-r--r-- | modules/repofiles/delete.go | 2 | ||||
-rw-r--r-- | modules/repofiles/delete_test.go | 2 | ||||
-rw-r--r-- | modules/repofiles/file.go | 2 | ||||
-rw-r--r-- | modules/repofiles/file_test.go | 2 | ||||
-rw-r--r-- | modules/repofiles/tree.go | 2 | ||||
-rw-r--r-- | modules/repofiles/tree_test.go | 2 | ||||
-rw-r--r-- | modules/repofiles/update.go | 4 | ||||
-rw-r--r-- | modules/repofiles/update_test.go | 2 | ||||
-rw-r--r-- | modules/repofiles/verification.go | 6 |
13 files changed, 18 insertions, 18 deletions
diff --git a/modules/repofiles/blob.go b/modules/repofiles/blob.go index 2f9ca72bd4..e9d85a0dcf 100644 --- a/modules/repofiles/blob.go +++ b/modules/repofiles/blob.go @@ -8,7 +8,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" - api "code.gitea.io/sdk/gitea" + api "code.gitea.io/gitea/modules/structs" ) // GetBlobBySHA get the GitBlobResponse of a repository using a sha hash. diff --git a/modules/repofiles/blob_test.go b/modules/repofiles/blob_test.go index 55320345f9..1dc183a8af 100644 --- a/modules/repofiles/blob_test.go +++ b/modules/repofiles/blob_test.go @@ -8,8 +8,8 @@ import ( "testing" "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" - api "code.gitea.io/sdk/gitea" "github.com/stretchr/testify/assert" ) diff --git a/modules/repofiles/content.go b/modules/repofiles/content.go index d35c5a6a67..3098087dc6 100644 --- a/modules/repofiles/content.go +++ b/modules/repofiles/content.go @@ -9,7 +9,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" - api "code.gitea.io/sdk/gitea" + api "code.gitea.io/gitea/modules/structs" ) // GetFileContents gets the meta data on a file's contents diff --git a/modules/repofiles/content_test.go b/modules/repofiles/content_test.go index 0257284a53..ce3f5f3678 100644 --- a/modules/repofiles/content_test.go +++ b/modules/repofiles/content_test.go @@ -9,8 +9,8 @@ import ( "testing" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" - "code.gitea.io/sdk/gitea" "github.com/stretchr/testify/assert" ) @@ -30,7 +30,7 @@ func TestGetFileContents(t *testing.T) { treePath := "README.md" ref := ctx.Repo.Repository.DefaultBranch - expectedFileContentResponse := &gitea.FileContentResponse{ + expectedFileContentResponse := &structs.FileContentResponse{ Name: treePath, Path: treePath, SHA: "4b4851ad51df6a7d9f25c979345979eaeb5b349f", @@ -40,7 +40,7 @@ func TestGetFileContents(t *testing.T) { GitURL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/4b4851ad51df6a7d9f25c979345979eaeb5b349f", DownloadURL: "https://try.gitea.io/user2/repo1/raw/branch/master/README.md", Type: "blob", - Links: &gitea.FileLinksResponse{ + Links: &structs.FileLinksResponse{ Self: "https://try.gitea.io/api/v1/repos/user2/repo1/contents/README.md", GitURL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/4b4851ad51df6a7d9f25c979345979eaeb5b349f", HTMLURL: "https://try.gitea.io/user2/repo1/blob/master/README.md", diff --git a/modules/repofiles/delete.go b/modules/repofiles/delete.go index ce7993dc54..ccf90f43b3 100644 --- a/modules/repofiles/delete.go +++ b/modules/repofiles/delete.go @@ -10,7 +10,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" - api "code.gitea.io/sdk/gitea" + api "code.gitea.io/gitea/modules/structs" ) // DeleteRepoFileOptions holds the repository delete file options diff --git a/modules/repofiles/delete_test.go b/modules/repofiles/delete_test.go index 0b0558e766..9d034066f5 100644 --- a/modules/repofiles/delete_test.go +++ b/modules/repofiles/delete_test.go @@ -8,8 +8,8 @@ import ( "testing" "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" - api "code.gitea.io/sdk/gitea" "github.com/stretchr/testify/assert" ) diff --git a/modules/repofiles/file.go b/modules/repofiles/file.go index 913a9ed535..de3ee71dba 100644 --- a/modules/repofiles/file.go +++ b/modules/repofiles/file.go @@ -12,7 +12,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" - api "code.gitea.io/sdk/gitea" + api "code.gitea.io/gitea/modules/structs" ) // GetFileResponseFromCommit Constructs a FileResponse from a Commit object diff --git a/modules/repofiles/file_test.go b/modules/repofiles/file_test.go index c9ee7f21e2..5f6320a938 100644 --- a/modules/repofiles/file_test.go +++ b/modules/repofiles/file_test.go @@ -9,8 +9,8 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" - api "code.gitea.io/sdk/gitea" "github.com/stretchr/testify/assert" ) diff --git a/modules/repofiles/tree.go b/modules/repofiles/tree.go index e189fe1229..4eb54a2598 100644 --- a/modules/repofiles/tree.go +++ b/modules/repofiles/tree.go @@ -10,7 +10,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" - api "code.gitea.io/sdk/gitea" + api "code.gitea.io/gitea/modules/structs" ) // GetTreeBySHA get the GitTreeResponse of a repository using a sha hash. diff --git a/modules/repofiles/tree_test.go b/modules/repofiles/tree_test.go index c211cfcfd2..ecff8b9071 100644 --- a/modules/repofiles/tree_test.go +++ b/modules/repofiles/tree_test.go @@ -8,8 +8,8 @@ import ( "testing" "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" - api "code.gitea.io/sdk/gitea" "github.com/stretchr/testify/assert" ) diff --git a/modules/repofiles/update.go b/modules/repofiles/update.go index 8bc3b50ae0..66e3f2babc 100644 --- a/modules/repofiles/update.go +++ b/modules/repofiles/update.go @@ -19,7 +19,7 @@ import ( "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/sdk/gitea" + "code.gitea.io/gitea/modules/structs" ) // IdentityOptions for a person's identity like an author or committer @@ -108,7 +108,7 @@ func detectEncodingAndBOM(entry *git.TreeEntry, repo *models.Repository) (string } // CreateOrUpdateRepoFile adds or updates a file in the given repository -func CreateOrUpdateRepoFile(repo *models.Repository, doer *models.User, opts *UpdateRepoFileOptions) (*gitea.FileResponse, error) { +func CreateOrUpdateRepoFile(repo *models.Repository, doer *models.User, opts *UpdateRepoFileOptions) (*structs.FileResponse, error) { // If no branch name is set, assume master if opts.OldBranch == "" { opts.OldBranch = repo.DefaultBranch diff --git a/modules/repofiles/update_test.go b/modules/repofiles/update_test.go index bf28021793..a3a0b0a420 100644 --- a/modules/repofiles/update_test.go +++ b/modules/repofiles/update_test.go @@ -10,8 +10,8 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" - api "code.gitea.io/sdk/gitea" "github.com/stretchr/testify/assert" ) diff --git a/modules/repofiles/verification.go b/modules/repofiles/verification.go index 75ead92d0f..be56f9b8b8 100644 --- a/modules/repofiles/verification.go +++ b/modules/repofiles/verification.go @@ -7,12 +7,12 @@ package repofiles import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" - "code.gitea.io/sdk/gitea" + "code.gitea.io/gitea/modules/structs" ) // GetPayloadCommitVerification returns the verification information of a commit -func GetPayloadCommitVerification(commit *git.Commit) *gitea.PayloadCommitVerification { - verification := &gitea.PayloadCommitVerification{} +func GetPayloadCommitVerification(commit *git.Commit) *structs.PayloadCommitVerification { + verification := &structs.PayloadCommitVerification{} commitVerification := models.ParseCommitWithSignature(commit) if commit.Signature != nil { verification.Signature = commit.Signature.Signature |