summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-05-11 18:21:34 +0800
committerGitHub <noreply@github.com>2019-05-11 18:21:34 +0800
commit34eee25bd42d19287e3e33afd169cc979ab61f37 (patch)
tree8def3b2f224745e3fbc0adaec2f01d7f752c443d /routers/api/v1/repo
parent1658cd04e9918109867f2745ddf760d260681878 (diff)
downloadgitea-34eee25bd42d19287e3e33afd169cc979ab61f37.tar.gz
gitea-34eee25bd42d19287e3e33afd169cc979ab61f37.zip
Move sdk structs to modules/structs (#6905)
* move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r--routers/api/v1/repo/branch.go2
-rw-r--r--routers/api/v1/repo/collaborators.go2
-rw-r--r--routers/api/v1/repo/commits.go2
-rw-r--r--routers/api/v1/repo/file.go2
-rw-r--r--routers/api/v1/repo/fork.go2
-rw-r--r--routers/api/v1/repo/git_hook.go2
-rw-r--r--routers/api/v1/repo/git_ref.go2
-rw-r--r--routers/api/v1/repo/hook.go2
-rw-r--r--routers/api/v1/repo/issue.go2
-rw-r--r--routers/api/v1/repo/issue_comment.go2
-rw-r--r--routers/api/v1/repo/issue_label.go2
-rw-r--r--routers/api/v1/repo/issue_tracked_time.go2
-rw-r--r--routers/api/v1/repo/key.go2
-rw-r--r--routers/api/v1/repo/label.go2
-rw-r--r--routers/api/v1/repo/milestone.go2
-rw-r--r--routers/api/v1/repo/pull.go2
-rw-r--r--routers/api/v1/repo/release.go2
-rw-r--r--routers/api/v1/repo/release_attachment.go2
-rw-r--r--routers/api/v1/repo/repo.go2
-rw-r--r--routers/api/v1/repo/star.go2
-rw-r--r--routers/api/v1/repo/status.go2
-rw-r--r--routers/api/v1/repo/subscriber.go2
-rw-r--r--routers/api/v1/repo/tag.go2
23 files changed, 23 insertions, 23 deletions
diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go
index b9a23d3b51..1aaae8723b 100644
--- a/routers/api/v1/repo/branch.go
+++ b/routers/api/v1/repo/branch.go
@@ -10,7 +10,7 @@ import (
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/routers/api/v1/convert"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// GetBranch get a branch of a repository
diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go
index be4a65f9c8..98daf2c9d5 100644
--- a/routers/api/v1/repo/collaborators.go
+++ b/routers/api/v1/repo/collaborators.go
@@ -11,7 +11,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListCollaborators list a repository's collaborators
diff --git a/routers/api/v1/repo/commits.go b/routers/api/v1/repo/commits.go
index d29f188535..3f3bd13268 100644
--- a/routers/api/v1/repo/commits.go
+++ b/routers/api/v1/repo/commits.go
@@ -12,7 +12,7 @@ import (
"code.gitea.io/gitea/modules/context"
"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"
)
// GetSingleCommit get a commit via
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index 10108e11c3..db952263e2 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -13,8 +13,8 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/repofiles"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/repo"
- api "code.gitea.io/sdk/gitea"
)
// GetRawFile get a file by path on a repository
diff --git a/routers/api/v1/repo/fork.go b/routers/api/v1/repo/fork.go
index d10f668712..c004544f58 100644
--- a/routers/api/v1/repo/fork.go
+++ b/routers/api/v1/repo/fork.go
@@ -8,7 +8,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListForks list a repository's forks
diff --git a/routers/api/v1/repo/git_hook.go b/routers/api/v1/repo/git_hook.go
index b7a8691cd3..80610356dd 100644
--- a/routers/api/v1/repo/git_hook.go
+++ b/routers/api/v1/repo/git_hook.go
@@ -7,8 +7,8 @@ package repo
import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
- api "code.gitea.io/sdk/gitea"
)
// ListGitHooks list all Git hooks of a repository
diff --git a/routers/api/v1/repo/git_ref.go b/routers/api/v1/repo/git_ref.go
index 6a6ed9ff36..2ec8749058 100644
--- a/routers/api/v1/repo/git_ref.go
+++ b/routers/api/v1/repo/git_ref.go
@@ -7,7 +7,7 @@ package repo
import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// GetGitAllRefs get ref or an list all the refs of a repository
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go
index ef9d5ac1d3..b35a10ac3d 100644
--- a/routers/api/v1/repo/hook.go
+++ b/routers/api/v1/repo/hook.go
@@ -8,9 +8,9 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/utils"
- api "code.gitea.io/sdk/gitea"
)
// ListHooks list all hooks of a repository
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go
index c14fc78ee4..daaa3d5985 100644
--- a/routers/api/v1/repo/issue.go
+++ b/routers/api/v1/repo/issue.go
@@ -18,7 +18,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListIssues list the issues of a repository
diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go
index 7a720deab2..14e81222e3 100644
--- a/routers/api/v1/repo/issue_comment.go
+++ b/routers/api/v1/repo/issue_comment.go
@@ -12,7 +12,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/notification"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListIssueComments list all the comments of an issue
diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go
index 4c8ca8d523..7c22e6885c 100644
--- a/routers/api/v1/repo/issue_label.go
+++ b/routers/api/v1/repo/issue_label.go
@@ -9,7 +9,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListIssueLabels list all the labels of an issue
diff --git a/routers/api/v1/repo/issue_tracked_time.go b/routers/api/v1/repo/issue_tracked_time.go
index d2ddb0e0c8..194f7d32ce 100644
--- a/routers/api/v1/repo/issue_tracked_time.go
+++ b/routers/api/v1/repo/issue_tracked_time.go
@@ -8,7 +8,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
func trackedTimesToAPIFormat(trackedTimes []*models.TrackedTime) []*api.TrackedTime {
diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go
index e26ce8cf50..59782d05f6 100644
--- a/routers/api/v1/repo/key.go
+++ b/routers/api/v1/repo/key.go
@@ -12,7 +12,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers/api/v1/convert"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// appendPrivateInformation appends the owner and key type information to api.PublicKey
diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go
index f61751f3ab..1cd8890ca9 100644
--- a/routers/api/v1/repo/label.go
+++ b/routers/api/v1/repo/label.go
@@ -11,7 +11,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListLabels list all the labels of a repository
diff --git a/routers/api/v1/repo/milestone.go b/routers/api/v1/repo/milestone.go
index a76f601a21..1d01093306 100644
--- a/routers/api/v1/repo/milestone.go
+++ b/routers/api/v1/repo/milestone.go
@@ -11,7 +11,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/util"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListMilestones list all the opened milestones for a repository
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go
index ab8a85b64d..dda8387913 100644
--- a/routers/api/v1/repo/pull.go
+++ b/routers/api/v1/repo/pull.go
@@ -15,8 +15,8 @@ import (
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
- api "code.gitea.io/sdk/gitea"
)
// ListPullRequests returns a list of all PRs
diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go
index 1b5b19666c..0fdcfa355c 100644
--- a/routers/api/v1/repo/release.go
+++ b/routers/api/v1/repo/release.go
@@ -9,7 +9,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// GetRelease get a single release of a repository
diff --git a/routers/api/v1/repo/release_attachment.go b/routers/api/v1/repo/release_attachment.go
index 5efdd69817..f85787bc59 100644
--- a/routers/api/v1/repo/release_attachment.go
+++ b/routers/api/v1/repo/release_attachment.go
@@ -13,7 +13,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// GetReleaseAttachment gets a single attachment of the release
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 35fea20d49..56aac8014c 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -19,7 +19,7 @@ import (
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/api/v1/convert"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
var searchOrderByMap = map[string]map[string]models.SearchOrderBy{
diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go
index df4241dde2..046142252b 100644
--- a/routers/api/v1/repo/star.go
+++ b/routers/api/v1/repo/star.go
@@ -7,7 +7,7 @@ package repo
import (
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListStargazers list a repository's stargazers
diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go
index da2b459c21..487e62c91d 100644
--- a/routers/api/v1/repo/status.go
+++ b/routers/api/v1/repo/status.go
@@ -10,7 +10,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// NewCommitStatus creates a new CommitStatus
diff --git a/routers/api/v1/repo/subscriber.go b/routers/api/v1/repo/subscriber.go
index a3d5e2a270..b7d329dc78 100644
--- a/routers/api/v1/repo/subscriber.go
+++ b/routers/api/v1/repo/subscriber.go
@@ -7,7 +7,7 @@ package repo
import (
"code.gitea.io/gitea/modules/context"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListSubscribers list a repo's subscribers (i.e. watchers)
diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go
index 505f5b40c9..dd1b5aa7c1 100644
--- a/routers/api/v1/repo/tag.go
+++ b/routers/api/v1/repo/tag.go
@@ -8,7 +8,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/convert"
- api "code.gitea.io/sdk/gitea"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListTags list all the tags of a repository