Browse Source

refactor: import order. (#3736)

tags/v1.21.12.1
Bo-Yi Wu Lunny Xiao 7 years ago
parent
commit
1c5cbc390b
18 changed files with 36 additions and 31 deletions
  1. +2
    -2
      routers/api/v1/repo/branch.go
  2. +2
    -2
      routers/api/v1/repo/collaborators.go
  3. +2
    -2
      routers/api/v1/repo/file.go
  4. +2
    -2
      routers/api/v1/repo/fork.go
  5. +2
    -2
      routers/api/v1/repo/hook.go
  6. +2
    -2
      routers/api/v1/repo/issue.go
  7. +2
    -2
      routers/api/v1/repo/issue_comment.go
  8. +2
    -2
      routers/api/v1/repo/issue_label.go
  9. +1
    -0
      routers/api/v1/repo/issue_tracked_time.go
  10. +2
    -2
      routers/api/v1/repo/key.go
  11. +2
    -2
      routers/api/v1/repo/label.go
  12. +2
    -2
      routers/api/v1/repo/milestone.go
  13. +2
    -2
      routers/api/v1/repo/release.go
  14. +5
    -3
      routers/api/v1/repo/release_attachment.go
  15. +1
    -0
      routers/api/v1/repo/repo.go
  16. +2
    -2
      routers/api/v1/repo/star.go
  17. +1
    -0
      routers/api/v1/repo/status.go
  18. +2
    -2
      routers/api/v1/repo/subscriber.go

+ 2
- 2
routers/api/v1/repo/branch.go View File

@@ -5,11 +5,11 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/convert"

api "code.gitea.io/sdk/gitea"
) )


// GetBranch get a branch of a repository // GetBranch get a branch of a repository


+ 2
- 2
routers/api/v1/repo/collaborators.go View File

@@ -5,10 +5,10 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
) )


// ListCollaborators list a repository's collaborators // ListCollaborators list a repository's collaborators


+ 2
- 2
routers/api/v1/repo/file.go View File

@@ -5,11 +5,11 @@
package repo package repo


import ( import (
"code.gitea.io/git"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/repo" "code.gitea.io/gitea/routers/repo"

"code.gitea.io/git"
) )


// GetRawFile get a file by path on a repository // GetRawFile get a file by path on a repository


+ 2
- 2
routers/api/v1/repo/fork.go View File

@@ -5,11 +5,11 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/utils" "code.gitea.io/gitea/routers/api/v1/utils"

api "code.gitea.io/sdk/gitea"
) )


// ListForks list a repository's forks // ListForks list a repository's forks


+ 2
- 2
routers/api/v1/repo/hook.go View File

@@ -5,12 +5,12 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/utils" "code.gitea.io/gitea/routers/api/v1/utils"

api "code.gitea.io/sdk/gitea"
) )


// ListHooks list all hooks of a repository // ListHooks list all hooks of a repository


+ 2
- 2
routers/api/v1/repo/issue.go View File

@@ -8,13 +8,13 @@ import (
"fmt" "fmt"
"strings" "strings"


api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/indexer" "code.gitea.io/gitea/modules/indexer"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/util"

api "code.gitea.io/sdk/gitea"
) )


// ListIssues list the issues of a repository // ListIssues list the issues of a repository


+ 2
- 2
routers/api/v1/repo/issue_comment.go View File

@@ -7,10 +7,10 @@ package repo
import ( import (
"time" "time"


api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
) )


// ListIssueComments list all the comments of an issue // ListIssueComments list all the comments of an issue


+ 2
- 2
routers/api/v1/repo/issue_label.go View File

@@ -5,10 +5,10 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
) )


// ListIssueLabels list all the labels of an issue // ListIssueLabels list all the labels of an issue


+ 1
- 0
routers/api/v1/repo/issue_tracked_time.go View File

@@ -7,6 +7,7 @@ package repo
import ( import (
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea" api "code.gitea.io/sdk/gitea"
) )




+ 2
- 2
routers/api/v1/repo/key.go View File

@@ -7,12 +7,12 @@ package repo
import ( import (
"fmt" "fmt"


api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/convert"

api "code.gitea.io/sdk/gitea"
) )


func composeDeployKeysAPILink(repoPath string) string { func composeDeployKeysAPILink(repoPath string) string {


+ 2
- 2
routers/api/v1/repo/label.go View File

@@ -7,10 +7,10 @@ package repo
import ( import (
"strconv" "strconv"


api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
) )


// ListLabels list all the labels of a repository // ListLabels list all the labels of a repository


+ 2
- 2
routers/api/v1/repo/milestone.go View File

@@ -7,11 +7,11 @@ package repo
import ( import (
"time" "time"


api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/util"

api "code.gitea.io/sdk/gitea"
) )


// ListMilestones list all the milestones for a repository // ListMilestones list all the milestones for a repository


+ 2
- 2
routers/api/v1/repo/release.go View File

@@ -5,10 +5,10 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
) )


// GetRelease get a single release of a repository // GetRelease get a single release of a repository


+ 5
- 3
routers/api/v1/repo/release_attachment.go View File

@@ -5,13 +5,15 @@
package repo package repo


import ( import (
"errors"
"net/http"
"strings"

"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"

api "code.gitea.io/sdk/gitea" api "code.gitea.io/sdk/gitea"
"errors"
"net/http"
"strings"
) )


// GetReleaseAttachment gets a single attachment of the release // GetReleaseAttachment gets a single attachment of the release


+ 1
- 0
routers/api/v1/repo/repo.go View File

@@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/convert"

api "code.gitea.io/sdk/gitea" api "code.gitea.io/sdk/gitea"
) )




+ 2
- 2
routers/api/v1/repo/star.go View File

@@ -5,9 +5,9 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
) )


// ListStargazers list a repository's stargazers // ListStargazers list a repository's stargazers


+ 1
- 0
routers/api/v1/repo/status.go View File

@@ -9,6 +9,7 @@ import (


"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea" api "code.gitea.io/sdk/gitea"
) )




+ 2
- 2
routers/api/v1/repo/subscriber.go View File

@@ -5,9 +5,9 @@
package repo package repo


import ( import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
) )


// ListSubscribers list a repo's subscribers (i.e. watchers) // ListSubscribers list a repo's subscribers (i.e. watchers)


Loading…
Cancel
Save