aboutsummaryrefslogtreecommitdiff
path: root/routes/api/v1/repo
diff options
context:
space:
mode:
Diffstat (limited to 'routes/api/v1/repo')
-rw-r--r--routes/api/v1/repo/branch.go12
-rw-r--r--routes/api/v1/repo/collaborators.go8
-rw-r--r--routes/api/v1/repo/file.go12
-rw-r--r--routes/api/v1/repo/hook.go16
-rw-r--r--routes/api/v1/repo/issue.go10
-rw-r--r--routes/api/v1/repo/issue_comment.go6
-rw-r--r--routes/api/v1/repo/issue_label.go8
-rw-r--r--routes/api/v1/repo/key.go18
-rw-r--r--routes/api/v1/repo/label.go6
-rw-r--r--routes/api/v1/repo/milestone.go6
-rw-r--r--routes/api/v1/repo/repo.go26
11 files changed, 64 insertions, 64 deletions
diff --git a/routes/api/v1/repo/branch.go b/routes/api/v1/repo/branch.go
index 3e001478..3323ccd6 100644
--- a/routes/api/v1/repo/branch.go
+++ b/routes/api/v1/repo/branch.go
@@ -5,14 +5,14 @@
package repo
import (
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models/errors"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/routes/api/v1/convert"
+ "github.com/gogs/gogs/models/errors"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/api/v1/convert"
)
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#get-branch
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#get-branch
func GetBranch(c *context.APIContext) {
branch, err := c.Repo.Repository.GetBranch(c.Params("*"))
if err != nil {
@@ -33,7 +33,7 @@ func GetBranch(c *context.APIContext) {
c.JSON(200, convert.ToBranch(branch, commit))
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#list-branches
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#list-branches
func ListBranches(c *context.APIContext) {
branches, err := c.Repo.Repository.GetBranches()
if err != nil {
diff --git a/routes/api/v1/repo/collaborators.go b/routes/api/v1/repo/collaborators.go
index d295ac0f..4ccfd547 100644
--- a/routes/api/v1/repo/collaborators.go
+++ b/routes/api/v1/repo/collaborators.go
@@ -5,11 +5,11 @@
package repo
import (
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/models/errors"
- "github.com/gogits/gogs/pkg/context"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/models/errors"
+ "github.com/gogs/gogs/pkg/context"
)
func ListCollaborators(c *context.APIContext) {
diff --git a/routes/api/v1/repo/file.go b/routes/api/v1/repo/file.go
index c783e81f..5afb1113 100644
--- a/routes/api/v1/repo/file.go
+++ b/routes/api/v1/repo/file.go
@@ -5,14 +5,14 @@
package repo
import (
- "github.com/gogits/git-module"
+ "github.com/gogs/git-module"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/routes/repo"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/repo"
)
-// https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-raw-content
+// https://github.com/gogs/go-gogs-client/wiki/Repositories-Contents#download-raw-content
func GetRawFile(c *context.APIContext) {
if !c.Repo.HasAccess() {
c.Status(404)
@@ -38,7 +38,7 @@ func GetRawFile(c *context.APIContext) {
}
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-archive
+// https://github.com/gogs/go-gogs-client/wiki/Repositories-Contents#download-archive
func GetArchive(c *context.APIContext) {
repoPath := models.RepoPath(c.Params(":username"), c.Params(":reponame"))
gitRepo, err := git.OpenRepository(repoPath)
diff --git a/routes/api/v1/repo/hook.go b/routes/api/v1/repo/hook.go
index 66125c50..fb67bf45 100644
--- a/routes/api/v1/repo/hook.go
+++ b/routes/api/v1/repo/hook.go
@@ -9,15 +9,15 @@ import (
"github.com/Unknwon/com"
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/models/errors"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/routes/api/v1/convert"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/models/errors"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/api/v1/convert"
)
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#list-hooks
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#list-hooks
func ListHooks(c *context.APIContext) {
hooks, err := models.GetWebhooksByRepoID(c.Repo.Repository.ID)
if err != nil {
@@ -32,7 +32,7 @@ func ListHooks(c *context.APIContext) {
c.JSON(200, &apiHooks)
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#create-a-hook
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#create-a-hook
func CreateHook(c *context.APIContext, form api.CreateHookOption) {
if !models.IsValidHookTaskType(form.Type) {
c.Error(422, "", "Invalid hook type")
@@ -103,7 +103,7 @@ func CreateHook(c *context.APIContext, form api.CreateHookOption) {
c.JSON(201, convert.ToHook(c.Repo.RepoLink, w))
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#edit-a-hook
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#edit-a-hook
func EditHook(c *context.APIContext, form api.EditHookOption) {
w, err := models.GetWebhookOfRepoByID(c.Repo.Repository.ID, c.ParamsInt64(":id"))
if err != nil {
diff --git a/routes/api/v1/repo/issue.go b/routes/api/v1/repo/issue.go
index d6ae7b4d..47268175 100644
--- a/routes/api/v1/repo/issue.go
+++ b/routes/api/v1/repo/issue.go
@@ -8,12 +8,12 @@ import (
"fmt"
"strings"
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/models/errors"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/pkg/setting"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/models/errors"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/pkg/setting"
)
func listIssues(c *context.APIContext, opts *models.IssuesOptions) {
diff --git a/routes/api/v1/repo/issue_comment.go b/routes/api/v1/repo/issue_comment.go
index 161ddf05..6b2612ae 100644
--- a/routes/api/v1/repo/issue_comment.go
+++ b/routes/api/v1/repo/issue_comment.go
@@ -6,10 +6,10 @@ package repo
import (
"time"
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/pkg/context"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/pkg/context"
)
func ListIssueComments(c *context.APIContext) {
diff --git a/routes/api/v1/repo/issue_label.go b/routes/api/v1/repo/issue_label.go
index f3f2d730..c210825b 100644
--- a/routes/api/v1/repo/issue_label.go
+++ b/routes/api/v1/repo/issue_label.go
@@ -5,11 +5,11 @@
package repo
import (
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/models/errors"
- "github.com/gogits/gogs/pkg/context"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/models/errors"
+ "github.com/gogs/gogs/pkg/context"
)
func ListIssueLabels(c *context.APIContext) {
diff --git a/routes/api/v1/repo/key.go b/routes/api/v1/repo/key.go
index 405440d2..db93b927 100644
--- a/routes/api/v1/repo/key.go
+++ b/routes/api/v1/repo/key.go
@@ -7,19 +7,19 @@ package repo
import (
"fmt"
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/pkg/setting"
- "github.com/gogits/gogs/routes/api/v1/convert"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/pkg/setting"
+ "github.com/gogs/gogs/routes/api/v1/convert"
)
func composeDeployKeysAPILink(repoPath string) string {
return setting.AppURL + "api/v1/repos/" + repoPath + "/keys/"
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories-Deploy-Keys#list-deploy-keys
+// https://github.com/gogs/go-gogs-client/wiki/Repositories-Deploy-Keys#list-deploy-keys
func ListDeployKeys(c *context.APIContext) {
keys, err := models.ListDeployKeys(c.Repo.Repository.ID)
if err != nil {
@@ -40,7 +40,7 @@ func ListDeployKeys(c *context.APIContext) {
c.JSON(200, &apiKeys)
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories-Deploy-Keys#get-a-deploy-key
+// https://github.com/gogs/go-gogs-client/wiki/Repositories-Deploy-Keys#get-a-deploy-key
func GetDeployKey(c *context.APIContext) {
key, err := models.GetDeployKeyByID(c.ParamsInt64(":id"))
if err != nil {
@@ -80,7 +80,7 @@ func HandleAddKeyError(c *context.APIContext, err error) {
}
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories-Deploy-Keys#add-a-new-deploy-key
+// https://github.com/gogs/go-gogs-client/wiki/Repositories-Deploy-Keys#add-a-new-deploy-key
func CreateDeployKey(c *context.APIContext, form api.CreateKeyOption) {
content, err := models.CheckPublicKeyString(form.Key)
if err != nil {
@@ -99,7 +99,7 @@ func CreateDeployKey(c *context.APIContext, form api.CreateKeyOption) {
c.JSON(201, convert.ToDeployKey(apiLink, key))
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories-Deploy-Keys#remove-a-deploy-key
+// https://github.com/gogs/go-gogs-client/wiki/Repositories-Deploy-Keys#remove-a-deploy-key
func DeleteDeploykey(c *context.APIContext) {
if err := models.DeleteDeployKey(c.User, c.ParamsInt64(":id")); err != nil {
if models.IsErrKeyAccessDenied(err) {
diff --git a/routes/api/v1/repo/label.go b/routes/api/v1/repo/label.go
index 1161d633..cd661aa2 100644
--- a/routes/api/v1/repo/label.go
+++ b/routes/api/v1/repo/label.go
@@ -7,10 +7,10 @@ package repo
import (
"github.com/Unknwon/com"
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/pkg/context"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/pkg/context"
)
func ListLabels(c *context.APIContext) {
diff --git a/routes/api/v1/repo/milestone.go b/routes/api/v1/repo/milestone.go
index baf8eb2f..4c73d8a3 100644
--- a/routes/api/v1/repo/milestone.go
+++ b/routes/api/v1/repo/milestone.go
@@ -7,10 +7,10 @@ package repo
import (
"time"
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/pkg/context"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/pkg/context"
)
func ListMilestones(c *context.APIContext) {
diff --git a/routes/api/v1/repo/repo.go b/routes/api/v1/repo/repo.go
index c3fcb093..db3b7251 100644
--- a/routes/api/v1/repo/repo.go
+++ b/routes/api/v1/repo/repo.go
@@ -9,17 +9,17 @@ import (
log "gopkg.in/clog.v1"
- api "github.com/gogits/go-gogs-client"
-
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/models/errors"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/pkg/form"
- "github.com/gogits/gogs/pkg/setting"
- "github.com/gogits/gogs/routes/api/v1/convert"
+ api "github.com/gogs/go-gogs-client"
+
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/models/errors"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/pkg/form"
+ "github.com/gogs/gogs/pkg/setting"
+ "github.com/gogs/gogs/routes/api/v1/convert"
)
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#search-repositories
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#search-repositories
func Search(c *context.APIContext) {
opts := &models.SearchRepoOptions{
Keyword: path.Base(c.Query("q")),
@@ -182,7 +182,7 @@ func CreateUserRepo(c *context.APIContext, owner *models.User, opt api.CreateRep
c.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#create
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#create
func Create(c *context.APIContext, opt api.CreateRepoOption) {
// Shouldn't reach this condition, but just in case.
if c.User.IsOrganization() {
@@ -210,7 +210,7 @@ func CreateOrgRepo(c *context.APIContext, opt api.CreateRepoOption) {
CreateUserRepo(c, org, opt)
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#migrate
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#migrate
func Migrate(c *context.APIContext, f form.MigrateRepo) {
ctxUser := c.User
// Not equal means context user is an organization,
@@ -314,7 +314,7 @@ func parseOwnerAndRepo(c *context.APIContext) (*models.User, *models.Repository)
return owner, repo
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#get
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#get
func Get(c *context.APIContext) {
_, repo := parseOwnerAndRepo(c)
if c.Written() {
@@ -328,7 +328,7 @@ func Get(c *context.APIContext) {
}))
}
-// https://github.com/gogits/go-gogs-client/wiki/Repositories#delete
+// https://github.com/gogs/go-gogs-client/wiki/Repositories#delete
func Delete(c *context.APIContext) {
owner, repo := parseOwnerAndRepo(c)
if c.Written() {