summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2018-03-29 21:32:40 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2018-03-29 21:32:40 +0800
commit1c5cbc390bd67194470859a5731719bf069b5ef4 (patch)
treea883063d330f61d3310a3a4818a335e20694c88c
parenta8beef890dc6aa9262442969ae6d14c53282025b (diff)
downloadgitea-1c5cbc390bd67194470859a5731719bf069b5ef4.tar.gz
gitea-1c5cbc390bd67194470859a5731719bf069b5ef4.zip
refactor: import order. (#3736)
-rw-r--r--routers/api/v1/repo/branch.go4
-rw-r--r--routers/api/v1/repo/collaborators.go4
-rw-r--r--routers/api/v1/repo/file.go4
-rw-r--r--routers/api/v1/repo/fork.go4
-rw-r--r--routers/api/v1/repo/hook.go4
-rw-r--r--routers/api/v1/repo/issue.go4
-rw-r--r--routers/api/v1/repo/issue_comment.go4
-rw-r--r--routers/api/v1/repo/issue_label.go4
-rw-r--r--routers/api/v1/repo/issue_tracked_time.go1
-rw-r--r--routers/api/v1/repo/key.go4
-rw-r--r--routers/api/v1/repo/label.go4
-rw-r--r--routers/api/v1/repo/milestone.go4
-rw-r--r--routers/api/v1/repo/release.go4
-rw-r--r--routers/api/v1/repo/release_attachment.go8
-rw-r--r--routers/api/v1/repo/repo.go1
-rw-r--r--routers/api/v1/repo/star.go4
-rw-r--r--routers/api/v1/repo/status.go1
-rw-r--r--routers/api/v1/repo/subscriber.go4
18 files changed, 36 insertions, 31 deletions
diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go
index 8e44f42368..96c2b02cb3 100644
--- a/routers/api/v1/repo/branch.go
+++ b/routers/api/v1/repo/branch.go
@@ -5,11 +5,11 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/convert"
+
+ api "code.gitea.io/sdk/gitea"
)
// GetBranch get a branch of a repository
diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go
index f35de08e50..963b7c53ae 100644
--- a/routers/api/v1/repo/collaborators.go
+++ b/routers/api/v1/repo/collaborators.go
@@ -5,10 +5,10 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+
+ api "code.gitea.io/sdk/gitea"
)
// ListCollaborators list a repository's collaborators
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index 4ea81255af..306b65a328 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -5,11 +5,11 @@
package repo
import (
- "code.gitea.io/git"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/repo"
+
+ "code.gitea.io/git"
)
// 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 694d7a9471..843559d523 100644
--- a/routers/api/v1/repo/fork.go
+++ b/routers/api/v1/repo/fork.go
@@ -5,11 +5,11 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/utils"
+
+ api "code.gitea.io/sdk/gitea"
)
// ListForks list a repository's forks
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go
index eb1742ac56..9c39094bae 100644
--- a/routers/api/v1/repo/hook.go
+++ b/routers/api/v1/repo/hook.go
@@ -5,12 +5,12 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"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 04b0dec0e0..ce13d8a6ed 100644
--- a/routers/api/v1/repo/issue.go
+++ b/routers/api/v1/repo/issue.go
@@ -8,13 +8,13 @@ import (
"fmt"
"strings"
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/indexer"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
+
+ api "code.gitea.io/sdk/gitea"
)
// 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 8abe2253a5..5fb50550f0 100644
--- a/routers/api/v1/repo/issue_comment.go
+++ b/routers/api/v1/repo/issue_comment.go
@@ -7,10 +7,10 @@ package repo
import (
"time"
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+
+ api "code.gitea.io/sdk/gitea"
)
// 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 fde919e506..95ea19d54d 100644
--- a/routers/api/v1/repo/issue_label.go
+++ b/routers/api/v1/repo/issue_label.go
@@ -5,10 +5,10 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+
+ api "code.gitea.io/sdk/gitea"
)
// 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 15d898d5d5..1111d672a7 100644
--- a/routers/api/v1/repo/issue_tracked_time.go
+++ b/routers/api/v1/repo/issue_tracked_time.go
@@ -7,6 +7,7 @@ package repo
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+
api "code.gitea.io/sdk/gitea"
)
diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go
index a3586d2552..1e3666ed42 100644
--- a/routers/api/v1/repo/key.go
+++ b/routers/api/v1/repo/key.go
@@ -7,12 +7,12 @@ package repo
import (
"fmt"
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers/api/v1/convert"
+
+ api "code.gitea.io/sdk/gitea"
)
func composeDeployKeysAPILink(repoPath string) string {
diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go
index b9401cef68..77392787ef 100644
--- a/routers/api/v1/repo/label.go
+++ b/routers/api/v1/repo/label.go
@@ -7,10 +7,10 @@ package repo
import (
"strconv"
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+
+ api "code.gitea.io/sdk/gitea"
)
// 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 53edd3230c..3953b0c3c0 100644
--- a/routers/api/v1/repo/milestone.go
+++ b/routers/api/v1/repo/milestone.go
@@ -7,11 +7,11 @@ package repo
import (
"time"
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/util"
+
+ api "code.gitea.io/sdk/gitea"
)
// ListMilestones list all the milestones for a repository
diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go
index 629fb2ea57..70c1e0f264 100644
--- a/routers/api/v1/repo/release.go
+++ b/routers/api/v1/repo/release.go
@@ -5,10 +5,10 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+
+ api "code.gitea.io/sdk/gitea"
)
// 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 80b2064df0..f11fac1629 100644
--- a/routers/api/v1/repo/release_attachment.go
+++ b/routers/api/v1/repo/release_attachment.go
@@ -5,13 +5,15 @@
package repo
import (
+ "errors"
+ "net/http"
+ "strings"
+
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+
api "code.gitea.io/sdk/gitea"
- "errors"
- "net/http"
- "strings"
)
// 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 b85ffd8d2f..25ed62fa49 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/api/v1/convert"
+
api "code.gitea.io/sdk/gitea"
)
diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go
index 3500eaf421..df4241dde2 100644
--- a/routers/api/v1/repo/star.go
+++ b/routers/api/v1/repo/star.go
@@ -5,9 +5,9 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/modules/context"
+
+ api "code.gitea.io/sdk/gitea"
)
// ListStargazers list a repository's stargazers
diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go
index 7f7ef1ae32..da2b459c21 100644
--- a/routers/api/v1/repo/status.go
+++ b/routers/api/v1/repo/status.go
@@ -9,6 +9,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+
api "code.gitea.io/sdk/gitea"
)
diff --git a/routers/api/v1/repo/subscriber.go b/routers/api/v1/repo/subscriber.go
index 737ae89f01..a3d5e2a270 100644
--- a/routers/api/v1/repo/subscriber.go
+++ b/routers/api/v1/repo/subscriber.go
@@ -5,9 +5,9 @@
package repo
import (
- api "code.gitea.io/sdk/gitea"
-
"code.gitea.io/gitea/modules/context"
+
+ api "code.gitea.io/sdk/gitea"
)
// ListSubscribers list a repo's subscribers (i.e. watchers)