Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 10:46:10 +01:00

refactor: import order. (#3736)

This commit is contained in:
Bo-Yi Wu 2018-03-29 21:32:40 +08:00 committed by Lunny Xiao
parent a8beef890d
commit 1c5cbc390b
18 changed files with 37 additions and 32 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

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

View file

@ -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 {

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -5,13 +5,15 @@
package repo
import (
"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"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/sdk/gitea"
)
// GetReleaseAttachment gets a single attachment of the release

View file

@ -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"
)

View file

@ -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

View file

@ -9,6 +9,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
api "code.gitea.io/sdk/gitea"
)

View file

@ -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)