aboutsummaryrefslogtreecommitdiff
path: root/routes/api/v1
diff options
context:
space:
mode:
Diffstat (limited to 'routes/api/v1')
-rw-r--r--routes/api/v1/admin/org.go10
-rw-r--r--routes/api/v1/admin/org_repo.go6
-rw-r--r--routes/api/v1/admin/org_team.go10
-rw-r--r--routes/api/v1/admin/repo.go10
-rw-r--r--routes/api/v1/admin/user.go24
-rw-r--r--routes/api/v1/api.go22
-rw-r--r--routes/api/v1/convert/convert.go6
-rw-r--r--routes/api/v1/convert/utils.go2
-rw-r--r--routes/api/v1/misc/markdown.go10
-rw-r--r--routes/api/v1/org/org.go20
-rw-r--r--routes/api/v1/org/team.go6
-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
-rw-r--r--routes/api/v1/user/app.go10
-rw-r--r--routes/api/v1/user/email.go16
-rw-r--r--routes/api/v1/user/follower.go18
-rw-r--r--routes/api/v1/user/key.go26
-rw-r--r--routes/api/v1/user/user.go10
27 files changed, 167 insertions, 167 deletions
diff --git a/routes/api/v1/admin/org.go b/routes/api/v1/admin/org.go
index 89251d2e..88468426 100644
--- a/routes/api/v1/admin/org.go
+++ b/routes/api/v1/admin/org.go
@@ -5,14 +5,14 @@
package admin
import (
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/routes/api/v1/user"
- "github.com/gogits/gogs/routes/api/v1/org"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/api/v1/org"
+ "github.com/gogs/gogs/routes/api/v1/user"
)
-// https://github.com/gogits/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization
+// https://github.com/gogs/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization
func CreateOrg(c *context.APIContext, form api.CreateOrgOption) {
org.CreateOrgForUser(c, form, user.GetUserByParams(c))
}
diff --git a/routes/api/v1/admin/org_repo.go b/routes/api/v1/admin/org_repo.go
index 7abad1a8..a2064921 100644
--- a/routes/api/v1/admin/org_repo.go
+++ b/routes/api/v1/admin/org_repo.go
@@ -5,9 +5,9 @@
package admin
import (
- "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 GetRepositoryByParams(c *context.APIContext) *models.Repository {
diff --git a/routes/api/v1/admin/org_team.go b/routes/api/v1/admin/org_team.go
index ae748504..5ddf6ae1 100644
--- a/routes/api/v1/admin/org_team.go
+++ b/routes/api/v1/admin/org_team.go
@@ -5,12 +5,12 @@
package admin
import (
- 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/routes/api/v1/convert"
- "github.com/gogits/gogs/routes/api/v1/user"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/api/v1/convert"
+ "github.com/gogs/gogs/routes/api/v1/user"
)
func CreateTeam(c *context.APIContext, form api.CreateTeamOption) {
diff --git a/routes/api/v1/admin/repo.go b/routes/api/v1/admin/repo.go
index 920bac8d..cec04b49 100644
--- a/routes/api/v1/admin/repo.go
+++ b/routes/api/v1/admin/repo.go
@@ -5,14 +5,14 @@
package admin
import (
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/routes/api/v1/repo"
- "github.com/gogits/gogs/routes/api/v1/user"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/api/v1/repo"
+ "github.com/gogs/gogs/routes/api/v1/user"
)
-// https://github.com/gogits/go-gogs-client/wiki/Administration-Repositories#create-a-new-repository
+// https://github.com/gogs/go-gogs-client/wiki/Administration-Repositories#create-a-new-repository
func CreateRepo(c *context.APIContext, form api.CreateRepoOption) {
owner := user.GetUserByParams(c)
if c.Written() {
diff --git a/routes/api/v1/admin/user.go b/routes/api/v1/admin/user.go
index d48ecc2f..b35e3096 100644
--- a/routes/api/v1/admin/user.go
+++ b/routes/api/v1/admin/user.go
@@ -7,14 +7,14 @@ package admin
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/mailer"
- "github.com/gogits/gogs/pkg/setting"
- "github.com/gogits/gogs/routes/api/v1/user"
+ 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/mailer"
+ "github.com/gogs/gogs/pkg/setting"
+ "github.com/gogs/gogs/routes/api/v1/user"
)
func parseLoginSource(c *context.APIContext, u *models.User, sourceID int64, loginName string) {
@@ -37,7 +37,7 @@ func parseLoginSource(c *context.APIContext, u *models.User, sourceID int64, log
u.LoginName = loginName
}
-// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-new-user
+// https://github.com/gogs/go-gogs-client/wiki/Administration-Users#create-a-new-user
func CreateUser(c *context.APIContext, form api.CreateUserOption) {
u := &models.User{
Name: form.Username,
@@ -74,7 +74,7 @@ func CreateUser(c *context.APIContext, form api.CreateUserOption) {
c.JSON(201, u.APIFormat())
}
-// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#edit-an-existing-user
+// https://github.com/gogs/go-gogs-client/wiki/Administration-Users#edit-an-existing-user
func EditUser(c *context.APIContext, form api.EditUserOption) {
u := user.GetUserByParams(c)
if c.Written() {
@@ -130,7 +130,7 @@ func EditUser(c *context.APIContext, form api.EditUserOption) {
c.JSON(200, u.APIFormat())
}
-// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#delete-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Administration-Users#delete-a-user
func DeleteUser(c *context.APIContext) {
u := user.GetUserByParams(c)
if c.Written() {
@@ -151,7 +151,7 @@ func DeleteUser(c *context.APIContext) {
c.Status(204)
}
-// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-public-key-for-user
+// https://github.com/gogs/go-gogs-client/wiki/Administration-Users#create-a-public-key-for-user
func CreatePublicKey(c *context.APIContext, form api.CreateKeyOption) {
u := user.GetUserByParams(c)
if c.Written() {
diff --git a/routes/api/v1/api.go b/routes/api/v1/api.go
index da811c25..ca29ee86 100644
--- a/routes/api/v1/api.go
+++ b/routes/api/v1/api.go
@@ -10,17 +10,17 @@ import (
"github.com/go-macaron/binding"
"gopkg.in/macaron.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/routes/api/v1/admin"
- "github.com/gogits/gogs/routes/api/v1/misc"
- "github.com/gogits/gogs/routes/api/v1/org"
- "github.com/gogits/gogs/routes/api/v1/repo"
- "github.com/gogits/gogs/routes/api/v1/user"
+ 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/routes/api/v1/admin"
+ "github.com/gogs/gogs/routes/api/v1/misc"
+ "github.com/gogs/gogs/routes/api/v1/org"
+ "github.com/gogs/gogs/routes/api/v1/repo"
+ "github.com/gogs/gogs/routes/api/v1/user"
)
func repoAssignment() macaron.Handler {
diff --git a/routes/api/v1/convert/convert.go b/routes/api/v1/convert/convert.go
index fcadb51f..a6ced6fc 100644
--- a/routes/api/v1/convert/convert.go
+++ b/routes/api/v1/convert/convert.go
@@ -9,10 +9,10 @@ import (
"github.com/Unknwon/com"
- "github.com/gogits/git-module"
- api "github.com/gogits/go-gogs-client"
+ "github.com/gogs/git-module"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/models"
+ "github.com/gogs/gogs/models"
)
func ToEmail(email *models.EmailAddress) *api.Email {
diff --git a/routes/api/v1/convert/utils.go b/routes/api/v1/convert/utils.go
index d0beab3d..e9326eed 100644
--- a/routes/api/v1/convert/utils.go
+++ b/routes/api/v1/convert/utils.go
@@ -5,7 +5,7 @@
package convert
import (
- "github.com/gogits/gogs/pkg/setting"
+ "github.com/gogs/gogs/pkg/setting"
)
// ToCorrectPageSize makes sure page size is in allowed range.
diff --git a/routes/api/v1/misc/markdown.go b/routes/api/v1/misc/markdown.go
index 98bfd7d0..6c210294 100644
--- a/routes/api/v1/misc/markdown.go
+++ b/routes/api/v1/misc/markdown.go
@@ -5,13 +5,13 @@
package misc
import (
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/pkg/markup"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/pkg/markup"
)
-// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
+// https://github.com/gogs/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
func Markdown(c *context.APIContext, form api.MarkdownOption) {
if c.HasApiError() {
c.Error(422, "", c.GetErrMsg())
@@ -31,7 +31,7 @@ func Markdown(c *context.APIContext, form api.MarkdownOption) {
}
}
-// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-a-markdown-document-in-raw-mode
+// https://github.com/gogs/go-gogs-client/wiki/Miscellaneous#render-a-markdown-document-in-raw-mode
func MarkdownRaw(c *context.APIContext) {
body, err := c.Req.Body().Bytes()
if err != nil {
diff --git a/routes/api/v1/org/org.go b/routes/api/v1/org/org.go
index 25a0e5b6..3d32eb51 100644
--- a/routes/api/v1/org/org.go
+++ b/routes/api/v1/org/org.go
@@ -5,12 +5,12 @@
package org
import (
- 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/routes/api/v1/convert"
- "github.com/gogits/gogs/routes/api/v1/user"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/api/v1/convert"
+ "github.com/gogs/gogs/routes/api/v1/user"
)
func CreateOrgForUser(c *context.APIContext, apiForm api.CreateOrgOption, user *models.User) {
@@ -54,17 +54,17 @@ func listUserOrgs(c *context.APIContext, u *models.User, all bool) {
c.JSON(200, &apiOrgs)
}
-// https://github.com/gogits/go-gogs-client/wiki/Organizations#list-your-organizations
+// https://github.com/gogs/go-gogs-client/wiki/Organizations#list-your-organizations
func ListMyOrgs(c *context.APIContext) {
listUserOrgs(c, c.User, true)
}
-// https://github.com/gogits/go-gogs-client/wiki/Organizations#create-your-organization
+// https://github.com/gogs/go-gogs-client/wiki/Organizations#create-your-organization
func CreateMyOrg(c *context.APIContext, apiForm api.CreateOrgOption) {
CreateOrgForUser(c, apiForm, c.User)
}
-// https://github.com/gogits/go-gogs-client/wiki/Organizations#list-user-organizations
+// https://github.com/gogs/go-gogs-client/wiki/Organizations#list-user-organizations
func ListUserOrgs(c *context.APIContext) {
u := user.GetUserByParams(c)
if c.Written() {
@@ -73,12 +73,12 @@ func ListUserOrgs(c *context.APIContext) {
listUserOrgs(c, u, false)
}
-// https://github.com/gogits/go-gogs-client/wiki/Organizations#get-an-organization
+// https://github.com/gogs/go-gogs-client/wiki/Organizations#get-an-organization
func Get(c *context.APIContext) {
c.JSON(200, convert.ToOrganization(c.Org.Organization))
}
-// https://github.com/gogits/go-gogs-client/wiki/Organizations#edit-an-organization
+// https://github.com/gogs/go-gogs-client/wiki/Organizations#edit-an-organization
func Edit(c *context.APIContext, form api.EditOrgOption) {
org := c.Org.Organization
if !org.IsOwnedBy(c.User.ID) {
diff --git a/routes/api/v1/org/team.go b/routes/api/v1/org/team.go
index fd92e728..ff2d4a2b 100644
--- a/routes/api/v1/org/team.go
+++ b/routes/api/v1/org/team.go
@@ -5,10 +5,10 @@
package org
import (
- api "github.com/gogits/go-gogs-client"
+ api "github.com/gogs/go-gogs-client"
- "github.com/gogits/gogs/pkg/context"
- "github.com/gogits/gogs/routes/api/v1/convert"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/routes/api/v1/convert"
)
func ListTeams(c *context.APIContext) {
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() {
diff --git a/routes/api/v1/user/app.go b/routes/api/v1/user/app.go
index bda1e23f..09ac1909 100644
--- a/routes/api/v1/user/app.go
+++ b/routes/api/v1/user/app.go
@@ -5,13 +5,13 @@
package user
import (
- 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"
)
-// https://github.com/gogits/go-gogs-client/wiki/Users#list-access-tokens-for-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Users#list-access-tokens-for-a-user
func ListAccessTokens(c *context.APIContext) {
tokens, err := models.ListAccessTokens(c.User.ID)
if err != nil {
@@ -26,7 +26,7 @@ func ListAccessTokens(c *context.APIContext) {
c.JSON(200, &apiTokens)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users#create-a-access-token
+// https://github.com/gogs/go-gogs-client/wiki/Users#create-a-access-token
func CreateAccessToken(c *context.APIContext, form api.CreateAccessTokenOption) {
t := &models.AccessToken{
UID: c.User.ID,
diff --git a/routes/api/v1/user/email.go b/routes/api/v1/user/email.go
index bd1ea52b..2e16212c 100644
--- a/routes/api/v1/user/email.go
+++ b/routes/api/v1/user/email.go
@@ -5,15 +5,15 @@
package user
import (
- 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"
)
-// https://github.com/gogits/go-gogs-client/wiki/Users-Emails#list-email-addresses-for-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Users-Emails#list-email-addresses-for-a-user
func ListEmails(c *context.APIContext) {
emails, err := models.GetEmailAddresses(c.User.ID)
if err != nil {
@@ -27,7 +27,7 @@ func ListEmails(c *context.APIContext) {
c.JSON(200, &apiEmails)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Emails#add-email-addresses
+// https://github.com/gogs/go-gogs-client/wiki/Users-Emails#add-email-addresses
func AddEmail(c *context.APIContext, form api.CreateEmailOption) {
if len(form.Emails) == 0 {
c.Status(422)
@@ -59,7 +59,7 @@ func AddEmail(c *context.APIContext, form api.CreateEmailOption) {
c.JSON(201, &apiEmails)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Emails#delete-email-addresses
+// https://github.com/gogs/go-gogs-client/wiki/Users-Emails#delete-email-addresses
func DeleteEmail(c *context.APIContext, form api.CreateEmailOption) {
if len(form.Emails) == 0 {
c.Status(204)
diff --git a/routes/api/v1/user/follower.go b/routes/api/v1/user/follower.go
index 6bbd4c7e..7c743025 100644
--- a/routes/api/v1/user/follower.go
+++ b/routes/api/v1/user/follower.go
@@ -5,10 +5,10 @@
package user
import (
- 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 responseApiUsers(c *context.APIContext, users []*models.User) {
@@ -32,7 +32,7 @@ func ListMyFollowers(c *context.APIContext) {
listUserFollowers(c, c.User)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#list-followers-of-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Users-Followers#list-followers-of-a-user
func ListFollowers(c *context.APIContext) {
u := GetUserByParams(c)
if c.Written() {
@@ -54,7 +54,7 @@ func ListMyFollowing(c *context.APIContext) {
listUserFollowing(c, c.User)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#list-users-followed-by-another-user
+// https://github.com/gogs/go-gogs-client/wiki/Users-Followers#list-users-followed-by-another-user
func ListFollowing(c *context.APIContext) {
u := GetUserByParams(c)
if c.Written() {
@@ -71,7 +71,7 @@ func checkUserFollowing(c *context.APIContext, u *models.User, followID int64) {
}
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#check-if-you-are-following-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Users-Followers#check-if-you-are-following-a-user
func CheckMyFollowing(c *context.APIContext) {
target := GetUserByParams(c)
if c.Written() {
@@ -80,7 +80,7 @@ func CheckMyFollowing(c *context.APIContext) {
checkUserFollowing(c, c.User, target.ID)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#check-if-one-user-follows-another
+// https://github.com/gogs/go-gogs-client/wiki/Users-Followers#check-if-one-user-follows-another
func CheckFollowing(c *context.APIContext) {
u := GetUserByParams(c)
if c.Written() {
@@ -93,7 +93,7 @@ func CheckFollowing(c *context.APIContext) {
checkUserFollowing(c, u, target.ID)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#follow-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Users-Followers#follow-a-user
func Follow(c *context.APIContext) {
target := GetUserByParams(c)
if c.Written() {
@@ -106,7 +106,7 @@ func Follow(c *context.APIContext) {
c.Status(204)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Followers#unfollow-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Users-Followers#unfollow-a-user
func Unfollow(c *context.APIContext) {
target := GetUserByParams(c)
if c.Written() {
diff --git a/routes/api/v1/user/key.go b/routes/api/v1/user/key.go
index aef42afc..97188861 100644
--- a/routes/api/v1/user/key.go
+++ b/routes/api/v1/user/key.go
@@ -5,14 +5,14 @@
package user
import (
- 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/setting"
- "github.com/gogits/gogs/routes/api/v1/convert"
- "github.com/gogits/gogs/routes/api/v1/repo"
+ 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/setting"
+ "github.com/gogs/gogs/routes/api/v1/convert"
+ "github.com/gogs/gogs/routes/api/v1/repo"
)
func GetUserByParamsName(c *context.APIContext, name string) *models.User {
@@ -53,12 +53,12 @@ func listPublicKeys(c *context.APIContext, uid int64) {
c.JSON(200, &apiKeys)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Public-Keys#list-your-public-keys
+// https://github.com/gogs/go-gogs-client/wiki/Users-Public-Keys#list-your-public-keys
func ListMyPublicKeys(c *context.APIContext) {
listPublicKeys(c, c.User.ID)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Public-Keys#list-public-keys-for-a-user
+// https://github.com/gogs/go-gogs-client/wiki/Users-Public-Keys#list-public-keys-for-a-user
func ListPublicKeys(c *context.APIContext) {
user := GetUserByParams(c)
if c.Written() {
@@ -67,7 +67,7 @@ func ListPublicKeys(c *context.APIContext) {
listPublicKeys(c, user.ID)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Public-Keys#get-a-single-public-key
+// https://github.com/gogs/go-gogs-client/wiki/Users-Public-Keys#get-a-single-public-key
func GetPublicKey(c *context.APIContext) {
key, err := models.GetPublicKeyByID(c.ParamsInt64(":id"))
if err != nil {
@@ -100,12 +100,12 @@ func CreateUserPublicKey(c *context.APIContext, form api.CreateKeyOption, uid in
c.JSON(201, convert.ToPublicKey(apiLink, key))
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Public-Keys#create-a-public-key
+// https://github.com/gogs/go-gogs-client/wiki/Users-Public-Keys#create-a-public-key
func CreatePublicKey(c *context.APIContext, form api.CreateKeyOption) {
CreateUserPublicKey(c, form, c.User.ID)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users-Public-Keys#delete-a-public-key
+// https://github.com/gogs/go-gogs-client/wiki/Users-Public-Keys#delete-a-public-key
func DeletePublicKey(c *context.APIContext) {
if err := models.DeletePublicKey(c.User, c.ParamsInt64(":id")); err != nil {
if models.IsErrKeyAccessDenied(err) {
diff --git a/routes/api/v1/user/user.go b/routes/api/v1/user/user.go
index 8326eea5..b2af271b 100644
--- a/routes/api/v1/user/user.go
+++ b/routes/api/v1/user/user.go
@@ -7,12 +7,12 @@ package user
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/pkg/markup"
+ "github.com/gogs/gogs/models"
+ "github.com/gogs/gogs/models/errors"
+ "github.com/gogs/gogs/pkg/context"
+ "github.com/gogs/gogs/pkg/markup"
)
func Search(c *context.APIContext) {