diff --git a/.gitignore b/.gitignore index 6801418ef96..a8d0e64c672 100644 --- a/.gitignore +++ b/.gitignore @@ -24,11 +24,12 @@ _testmain.go *.prof coverage.out -gitea *.db *.log +/gitea + /bin /dist /custom diff --git a/README.md b/README.md index f97e30934d2..e3e8a71772a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ 2. Due to testing purpose, data of [try.gogs.io](https://try.gogs.io) was reset in **Jan 28, 2015** and will reset multiple times after. Please do **NOT** put your important data on the site. 3. The demo site [try.gogs.io](https://try.gogs.io) is running under `develop` branch. 4. If you think there are vulnerabilities in the project, please talk privately to **u@gogs.io**. Thanks! -5. If you're interested in using APIs, we have experimental support with [documentation](https://github.com/gogits/go-gogs-client/wiki). +5. If you're interested in using APIs, we have experimental support with [documentation](https://godoc.org/github.com/go-gitea/go-sdk). 6. If your team/company is using Gogs and would like to put your logo on [our website](https://gogs.io), contact us by any means. ## Purpose diff --git a/cmd/web.go b/cmd/web.go index 2fb1a7e7149..36425b823d9 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -39,7 +39,6 @@ import ( "github.com/go-macaron/toolbox" "github.com/go-xorm/xorm" "github.com/go-gitea/git" - gogs "github.com/gogits/go-gogs-client" version "github.com/mcuadros/go-version" "github.com/urfave/cli" ini "gopkg.in/ini.v1" @@ -94,7 +93,6 @@ func checkVersion() { {"gopkg.in/ini.v1", ini.Version, "1.8.4"}, {"gopkg.in/macaron.v1", macaron.Version, "1.1.7"}, {"github.com/go-gitea/git", git.Version, "0.4.1"}, - {"github.com/gogits/go-gogs-client", gogs.Version, "0.12.1"}, } for _, c := range checkers { if !version.Compare(c.Version(), c.Expected, ">=") { diff --git a/models/action.go b/models/action.go index 6943802f005..055bc4b2994 100644 --- a/models/action.go +++ b/models/action.go @@ -17,7 +17,7 @@ import ( "github.com/go-xorm/xorm" "github.com/go-gitea/git" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/base" "github.com/go-gitea/gitea/modules/log" diff --git a/models/issue.go b/models/issue.go index be9eedcd2bf..b63ff48fec1 100644 --- a/models/issue.go +++ b/models/issue.go @@ -16,7 +16,7 @@ import ( "github.com/Unknwon/com" "github.com/go-xorm/xorm" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" gouuid "github.com/satori/go.uuid" "github.com/go-gitea/gitea/modules/base" diff --git a/models/issue_comment.go b/models/issue_comment.go index 1c615ab5115..d75b42cd3f2 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -12,7 +12,7 @@ import ( "github.com/Unknwon/com" "github.com/go-xorm/xorm" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/markdown" diff --git a/models/issue_label.go b/models/issue_label.go index 0b9644c2492..24d6bcac756 100644 --- a/models/issue_label.go +++ b/models/issue_label.go @@ -13,7 +13,7 @@ import ( "github.com/go-xorm/xorm" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/base" ) diff --git a/models/pull.go b/models/pull.go index adb5ab74f0a..600360f764d 100644 --- a/models/pull.go +++ b/models/pull.go @@ -18,7 +18,7 @@ import ( "github.com/go-gitea/gitea/modules/sync" "github.com/go-xorm/xorm" "github.com/go-gitea/git" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" ) var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength) diff --git a/models/repo.go b/models/repo.go index 6fa023633c0..6ae7d9a25b0 100644 --- a/models/repo.go +++ b/models/repo.go @@ -29,7 +29,7 @@ import ( "github.com/go-gitea/gitea/modules/sync" "github.com/go-xorm/xorm" "github.com/go-gitea/git" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" version "github.com/mcuadros/go-version" ini "gopkg.in/ini.v1" ) diff --git a/models/user.go b/models/user.go index d2e19eb17ed..ffa2f6440f9 100644 --- a/models/user.go +++ b/models/user.go @@ -25,7 +25,7 @@ import ( "github.com/nfnt/resize" "github.com/go-gitea/git" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/avatar" "github.com/go-gitea/gitea/modules/base" diff --git a/models/webhook.go b/models/webhook.go index bb65dc09659..3255f7904e9 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -15,7 +15,7 @@ import ( "github.com/go-xorm/xorm" gouuid "github.com/satori/go.uuid" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/httplib" "github.com/go-gitea/gitea/modules/log" diff --git a/models/webhook_slack.go b/models/webhook_slack.go index 2ee401ee19c..ddc2008a3ad 100644 --- a/models/webhook_slack.go +++ b/models/webhook_slack.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/go-gitea/git" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/setting" ) diff --git a/modules/base/base.go b/modules/base/base.go index 8ba211aa7af..5c5632dee8d 100644 --- a/modules/base/base.go +++ b/modules/base/base.go @@ -4,7 +4,7 @@ package base -const DOC_URL = "https://github.com/gogits/go-gogs-client/wiki" +const DocURL = "https://godoc.org/github.com/go-gitea/go-sdk/gitea" type ( TplName string diff --git a/modules/context/api.go b/modules/context/api.go index dfd9a578187..1ae11f63fbd 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -36,7 +36,7 @@ func (ctx *APIContext) Error(status int, title string, obj interface{}) { ctx.JSON(status, map[string]string{ "message": message, - "url": base.DOC_URL, + "url": base.DocURL, }) } diff --git a/routers/api/v1/admin/org.go b/routers/api/v1/admin/org.go index 5e594e1e5f0..1deaa34b43d 100644 --- a/routers/api/v1/admin/org.go +++ b/routers/api/v1/admin/org.go @@ -5,7 +5,7 @@ package admin import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/admin/org_team.go b/routers/api/v1/admin/org_team.go index 7a28d9566eb..2058ea0021c 100644 --- a/routers/api/v1/admin/org_team.go +++ b/routers/api/v1/admin/org_team.go @@ -5,7 +5,7 @@ package admin import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/admin/repo.go b/routers/api/v1/admin/repo.go index e673447c4bf..1ddf65c5ea2 100644 --- a/routers/api/v1/admin/repo.go +++ b/routers/api/v1/admin/repo.go @@ -5,7 +5,7 @@ package admin import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/context" "github.com/go-gitea/gitea/routers/api/v1/repo" diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index b25c687d2fb..1234dbf0c70 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -5,7 +5,7 @@ package admin import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 2d468eae5fe..2deafa23c12 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -10,7 +10,7 @@ import ( "github.com/go-macaron/binding" "gopkg.in/macaron.v1" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/auth" diff --git a/routers/api/v1/convert/convert.go b/routers/api/v1/convert/convert.go index 94a918be485..a43e00077a8 100644 --- a/routers/api/v1/convert/convert.go +++ b/routers/api/v1/convert/convert.go @@ -10,7 +10,7 @@ import ( "github.com/Unknwon/com" "github.com/go-gitea/git" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" ) diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go index 8ca5cde9539..296f7fababf 100644 --- a/routers/api/v1/misc/markdown.go +++ b/routers/api/v1/misc/markdown.go @@ -5,7 +5,7 @@ package misc import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/context" "github.com/go-gitea/gitea/modules/markdown" diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index 3f26f5510de..98dc74ae7cf 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -5,7 +5,7 @@ package org import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 0c87ce26b97..bb3c8f6fcb5 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -5,7 +5,7 @@ package org import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/context" "github.com/go-gitea/gitea/routers/api/v1/convert" diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index f4327378dc0..06f51bc263d 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -5,7 +5,7 @@ package repo import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/modules/context" "github.com/go-gitea/gitea/routers/api/v1/convert" diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go index cfb21189057..13cba48141c 100644 --- a/routers/api/v1/repo/collaborators.go +++ b/routers/api/v1/repo/collaborators.go @@ -5,7 +5,7 @@ package repo import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index 315172199b2..3d0bb80a7c7 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -9,7 +9,7 @@ import ( "github.com/Unknwon/com" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index 9193c021063..4e5369961f6 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -8,7 +8,7 @@ import ( "fmt" "strings" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go index 71ce19fe332..28751008da7 100644 --- a/routers/api/v1/repo/issue_comment.go +++ b/routers/api/v1/repo/issue_comment.go @@ -6,7 +6,7 @@ package repo import ( "time" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index 0d520a4f935..8f56afd61b8 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -5,7 +5,7 @@ package repo import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go index ec60bc516ba..adac6a6e69d 100644 --- a/routers/api/v1/repo/key.go +++ b/routers/api/v1/repo/key.go @@ -7,7 +7,7 @@ package repo import ( "fmt" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go index efa68b0a1dc..1e4f78f59e2 100644 --- a/routers/api/v1/repo/label.go +++ b/routers/api/v1/repo/label.go @@ -5,7 +5,7 @@ package repo import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/milestone.go b/routers/api/v1/repo/milestone.go index 8913190f6d6..4e4b40ae9ff 100644 --- a/routers/api/v1/repo/milestone.go +++ b/routers/api/v1/repo/milestone.go @@ -7,7 +7,7 @@ package repo import ( "time" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index e6890ca33d3..0b28ee0f929 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -7,7 +7,7 @@ package repo import ( "path" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/auth" diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go index 90b571dbba2..0e8081f5f45 100644 --- a/routers/api/v1/user/app.go +++ b/routers/api/v1/user/app.go @@ -5,7 +5,7 @@ package user import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/user/email.go b/routers/api/v1/user/email.go index 1643f2b0aef..1667ee5984b 100644 --- a/routers/api/v1/user/email.go +++ b/routers/api/v1/user/email.go @@ -5,7 +5,7 @@ package user import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/user/follower.go b/routers/api/v1/user/follower.go index 0f0e7fcec32..661bdcbcef8 100644 --- a/routers/api/v1/user/follower.go +++ b/routers/api/v1/user/follower.go @@ -5,7 +5,7 @@ package user import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go index ba4c1e1ee1e..316ebb65c9d 100644 --- a/routers/api/v1/user/key.go +++ b/routers/api/v1/user/key.go @@ -5,7 +5,7 @@ package user import ( - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index 6258662b687..e7322d725ff 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -7,7 +7,7 @@ package user import ( "github.com/Unknwon/com" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index 77da3ea4802..3cb6d1d27e4 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -13,7 +13,7 @@ import ( "github.com/Unknwon/com" "github.com/go-gitea/git" - api "github.com/gogits/go-gogs-client" + api "github.com/go-gitea/go-sdk/gitea" "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/auth" @@ -32,7 +32,7 @@ func Webhooks(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.settings.hooks") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["BaseLink"] = ctx.Repo.RepoLink - ctx.Data["Description"] = ctx.Tr("repo.settings.hooks_desc", "https://github.com/gogits/go-gogs-client/wiki/Repositories-Webhooks") + ctx.Data["Description"] = ctx.Tr("repo.settings.hooks_desc", "https://godoc.org/github.com/go-gitea/go-sdk/gitea") ws, err := models.GetWebhooksByRepoID(ctx.Repo.Repository.ID) if err != nil { diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 337e096e5b5..7e608b1d34c 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -83,7 +83,7 @@
- +