Compare commits

..

79 Commits

Author SHA1 Message Date
Unknwon
348c75c91b issue: response wrong type of comment from AJAX 2017-04-03 20:06:15 -04:00
Unknwon
76ebdb265b css: update fonts
[CI SKIP]
2017-04-03 18:20:49 -04:00
Unknwon
88ae3510ff Prepare release 2017-04-03 16:26:43 -04:00
Unknwon
c07899701a vendor: update github.com/gogits/git-module 2017-04-03 15:09:53 -04:00
Unknwon
ab42671c63 repo: handle git.ErrUnsupportedVersion error type 2017-04-01 17:56:55 -04:00
Unknwon
b3ac33cbcf vendor: update github.com/gogits/git-module 2017-04-01 17:50:11 -04:00
Unknwon
3b94162803 modules/setting: set default session GC interval to 3600s 2017-03-31 23:55:42 -04:00
Unknwon
52aade232d modes: fix test compile error 2017-03-31 18:28:08 -04:00
Unknwon
3a9276307c modules/markup: move common functions to markup.go 2017-03-31 17:46:57 -04:00
Unknwon
ca6326c937 modules/base: move file-related functions to file.go 2017-03-31 17:20:05 -04:00
Unknwon
8da16ac302 modules/markup: rename Markdown render fucntions
The unified function 'Markdown' accepts both string or []byte type
input and renders to HTML with []byte type.
2017-03-31 16:37:30 -04:00
Unknwon
761bb3cf53 modules/markup: protect sanitizer from possible modification
Only expose public APIs for 'Sanitize' and 'SanitizeBytes' to
eliminate unintentional modifications to sanitizer policy. Also
use 'sync.Once' to make sure multiple calls of 'NewSanitizer' is
safe (although should never happen, but this is a better way).
2017-03-31 16:19:10 -04:00
Unknwon
c1c269d9ef modules: rename markdown -> markup
To further support more markup languages (e.g. Org-mode, AsciiDoc,
reStructuredText), the name 'markdown' is inappropriate.

This is the first step towards more markup language support.
2017-03-31 15:29:43 -04:00
Unknwon
9edac05e05 templates/repo: improve README icon and font 2017-03-31 15:11:40 -04:00
Unknwon
9c1620d49c css: font-family fixes for Chinese 2017-03-31 14:13:25 -04:00
John Behm
65bb6eb284 locale: update TRANSLATORS (#4372)
* Update TRANSLATORS

* Update TRANSLATORS
2017-03-31 12:37:46 -04:00
Unknwon
aff55ff105 vendor: update github.com/go-macaron/captcha
[CI SKIP]
2017-03-30 12:35:43 -04:00
Unknwon
4a67bb5806 migrations.v17: skip if table not exist 2017-03-30 11:37:27 -04:00
Unknwon
1afafde3b3 user/setting: preserve user input with validation error (#1123) 2017-03-30 01:03:44 -04:00
Unknwon
ab634ce61a cmd/web: fix routes requires sign in (#4359)
Redirect user to sign in page when visit private repository with
public issues if user want to post comment or create new issue.
2017-03-30 00:34:20 -04:00
Unknwon
9d06ebd01a markdown: improve filter of class attribute for code blocks
Only allow HighlightJS specific classes.

Reported by ChALkeR.
2017-03-29 19:52:53 -04:00
Kyle McCullough
09723ec0e5 migration.v17: handle mysql error (#4361) 2017-03-29 19:02:07 -04:00
Hassan Amouhzi
864761c2d0 js: use jQuery .find() (#4343) 2017-03-28 17:36:48 -04:00
Unknwon
abe7f7bc36 migration.v17: add nil error check 2017-03-28 16:38:16 -04:00
Unknwon
717bcc4ad8 migration/v17: skip if protect_branch_whitelist table not exist (#4355) 2017-03-28 11:20:58 -04:00
Unknwon
11ffdac3f8 org/dashboard: fix wrong repository count (#4351)
Should not include count for inaccessible repositories.
2017-03-28 11:16:29 -04:00
David Beitey
cf7d5d0c56 docker: fix heading in README.md (#4353)
The unicode non-breaking space character was breaking the heading format; this switches that character for an ASCII space.
2017-03-28 07:50:36 -04:00
Unknwon
375f1b1fde Prepare release
[CI SKIP]
2017-03-27 14:56:56 -04:00
Unknwon
ad3c6ef205 Update locales 2017-03-27 14:40:55 -04:00
Unknwon
30d9e2ee3c docker: use vendor to replace go get 2017-03-27 14:04:48 -04:00
Unknwon
1038916460 models/protect_branch: fix whitelist with invalid 'protect_branch_id' (#4333)
If user creates a protect branch for the first time (which has ID=0),
it generates invalid whitelist records with 'protect_branch_id=0'.
This prevents future updates of protect branch whitelist.

Migration: remove existing invalid protect branch whitelist records.
2017-03-27 13:13:04 -04:00
Unknwon
73de9f9d6a repo/settings/branches: add prompt for bare repository 2017-03-27 13:12:29 -04:00
Jonas
f40eb9774e modes/mirror: corrected NextUpdate not set (#4345) 2017-03-26 23:24:48 -04:00
Pablo Saavedra
496e07c1c9 models/repo: avoid duplicated results in SearchRepositoryByName (#4344) 2017-03-26 23:23:17 -04:00
Unknwon
c238647020 cmd/web: remove dependency version checker 2017-03-25 04:17:55 -04:00
Unknwon
78f94986e3 user/settings: fix bad error handle of leave organization 2017-03-25 03:44:12 -04:00
Unknwon
8f52ab8201 models/repo_editor: add pull request test task after commit (#4338) 2017-03-25 03:36:13 -04:00
Unknwon
260ebcc1ca repo/milestone: simplify code 2017-03-24 18:54:17 -04:00
Unknwon
09cb48e41c repo: recalculate milestone completeness on issue list (#4316) 2017-03-24 18:36:35 -04:00
Unknwon
674106c7b6 repo: cleanup some code 2017-03-24 16:32:14 -04:00
Unknwon
8196430f47 repo: allow private repository to have public wiki or issues
Relates to #649 and #2157
2017-03-24 16:25:40 -04:00
Unknwon
7a99e56893 repo: update size after fork, migrate and mirror sync (#4336) 2017-03-24 14:22:19 -04:00
Unknwon
79ba0314e9 milestone: only show issue-related count under issue list (#4316) 2017-03-24 14:00:01 -04:00
Unknwon
c441f8080e api/repo: add endpoint to sync mirror (#2235) 2017-03-23 20:46:39 -04:00
Unknwon
bd1e757350 user: remove sanitizer for FullName (#1937) 2017-03-23 20:24:02 -04:00
Unknwon
3144be5c81 repo: remove legacy sanitizer for repository description
Related to #4329.
2017-03-23 20:23:23 -04:00
Unknwon
fdc7cb565d repo: fix unable to propose pull request from secondary fork (#4324) 2017-03-23 20:04:20 -04:00
Unknwon
a6dbde4c46 user/settings: minor input style fix (#4327) 2017-03-23 19:39:05 -04:00
Unknwon
8ce23e2c71 cmd/backup: able to specify archive name (#4320)
Added flag '--archive-name' for backup command.
2017-03-23 18:44:24 -04:00
Unknwon
8a3f4fc616 models: add config options for XORM logger (#3183)
Added new config section '[log.xorm]'.
2017-03-23 18:34:25 -04:00
Unknwon
66c1e6b0e8 user/settings: complete repositories panel (#4312) 2017-03-23 14:28:31 -04:00
Unknwon
beee6e03b1 error: move ErrRepoNotExist -> errors.RepoNotExist 2017-03-23 14:27:34 -04:00
Rob Richards
902372067c user/settings: add repositories panel (#4312)
* Add Repositories panel to user settings
issue #4277

* modified personal repo settings format
2017-03-23 12:57:43 -04:00
Nikolay Korotkiy
7adaf8f812 locale: fix language names (#4330) 2017-03-23 11:37:46 -04:00
Unknwon
71753cdd46 templates/label: another minor style improve 2017-03-22 16:20:31 -04:00
Unknwon
d3363430dc templates/label: minor style improve
Add an empty space to make <span> have width.
2017-03-22 15:54:27 -04:00
Unknwon
945e65eedf README: update alts
[CI SKIP]
2017-03-22 15:28:22 -04:00
Unknwon
85a050fca7 issue: fix redirect to random issue if index does not exist (#4315) 2017-03-22 13:20:29 -04:00
Unknwon
bb86d66496 repo: rename PageIsViewCode -> PageIsViewFiles
Also highlight 'Files' tab when use editor.
2017-03-22 12:58:12 -04:00
Unknwon
aba8789542 vendor: update github.com/go-macaron/session (#3363) 2017-03-20 14:06:41 -04:00
Unknwon
5f1bbbde49 user/settings: fix cannot change profile for non-local users (#4313) 2017-03-20 14:01:23 -04:00
Unknwon
0203eaab00 user/dashboard: hide More button if reached end on first load 2017-03-20 14:00:51 -04:00
Unknwon
2807274e2d repo/webhook: able to retrigger delivery history (#2187) 2017-03-19 17:44:46 -04:00
Unknwon
55a5ad5cdc api/repo: fix incorrect permission values (#4309) 2017-03-18 16:44:40 -04:00
Unknwon
b3c4a39208 setting: add config option for raw file render mode (#3608)
Added '[repository] ENABLE_RAW_FILE_RENDER_MODE'.
2017-03-17 19:42:21 -04:00
Unknwon
cac7af2c78 explore: able list and search for private but accessible repositories (#3088) 2017-03-17 19:17:40 -04:00
Unknwon
2d4dc544be install: able to enable console mode (#3119) 2017-03-17 00:16:46 -04:00
Unknwon
171f97868d repo: allow issues and wiki for bare repository (#4104) 2017-03-16 23:10:45 -04:00
Unknwon
becaec19a7 setting: add login status cookie (#2885)
Added config options EnableLoginStatusCookie and LoginStatusCookieName under section '[security]'.
2017-03-16 22:42:17 -04:00
Unknwon
bc630cc52b repo/commit: able to config default commits page size (#4230)
Added config option '[ui.user] COMMITS_PAGING_NUM'.
2017-03-16 22:28:32 -04:00
Unknwon
d591cb0dfb dashboard/feeds: able to load more history (#2511) 2017-03-16 22:05:53 -04:00
Unknwon
07a9cbe0a9 setting: able to config dashboard news feed paging number (#4247) 2017-03-16 20:25:28 -04:00
Unknwon
7c802f6d83 repo/setting: filter out deleted branch in protect list (#4288) 2017-03-16 20:09:27 -04:00
Unknwon
431e930367 Add Go 1.8 to .travis.yml 2017-03-16 17:46:55 -04:00
Unknwon
9e8ffa14cb webhook: add file status to push event (#3897) 2017-03-16 17:33:04 -04:00
Unknwon
0ccd7c97ab models: rename ErrUserNotExist -> errors.UserNotExist 2017-03-16 17:18:43 -04:00
Unknwon
4e64e71e28 templates/repo/webhook: move to its own directory 2017-03-16 15:50:18 -04:00
Unknwon
86c7f45383 js: minor fix for #4294 2017-03-15 16:38:41 -04:00
Brian Paulson
50b36a732c ui: added Select class to ui.dropdown menus to prevent label changing (#4294) 2017-03-15 16:35:13 -04:00
165 changed files with 3148 additions and 2029 deletions

View File

@@ -14,6 +14,4 @@ config.codekit
.editorconfig
.gitignore
Dockerfile*
vendor
vendor/**
gogs

View File

@@ -21,5 +21,5 @@ indent_style = space
indent_size = 2
[*.js]
indent_style = space
indent_style = tab
indent_size = 4

5
.gitattributes vendored
View File

@@ -1,8 +1,7 @@
public/conf/gitignore/* linguist-vendored
public/conf/license/* linguist-vendored
conf/gitignore/* linguist-vendored
conf/license/* linguist-vendored
public/assets/* linguist-vendored
public/plugins/* linguist-vendored
public/plugins/* linguist-vendored
public/css/themes/* linguist-vendored
public/css/github.min.css linguist-vendored
public/css/semantic-2.2.7.min.css linguist-vendored

View File

@@ -3,6 +3,7 @@ go:
- 1.5.x
- 1.6.x
- 1.7.x
- 1.8.x
- master
before_install:

View File

@@ -7,9 +7,9 @@ Gogs [![Build Status](https://travis-ci.org/gogits/gogs.svg?branch=master)](http
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
|![Dashboard](https://gogs.io/img/screenshots/1.png)|![Repository](https://gogs.io/img/screenshots/2.png)|![Commits History](https://gogs.io/img/screenshots/3.png)|
|![Profile](https://gogs.io/img/screenshots/4.png)|![Admin Dashboard](https://gogs.io/img/screenshots/5.png)|![Diff](https://gogs.io/img/screenshots/6.png)|
|![Issues](https://gogs.io/img/screenshots/7.png)|![Releases](https://gogs.io/img/screenshots/8.png)|![Organization](https://gogs.io/img/screenshots/9.png)|
|![Dashboard](https://gogs.io/img/screenshots/1.png)|![Repository](https://gogs.io/img/screenshots/2.png)|![Editor](https://gogs.io/img/screenshots/3.png)|
|![Profile](https://gogs.io/img/screenshots/4.png)|![Diff](https://gogs.io/img/screenshots/5.png)|![Repository Settings](https://gogs.io/img/screenshots/6.png?ts=20170322)|
|![Webhook](https://gogs.io/img/screenshots/7.png)|![Organization](https://gogs.io/img/screenshots/8.png)|![Admin Dashboard](https://gogs.io/img/screenshots/9.png)|
### Important Notes
@@ -50,7 +50,7 @@ The goal of this project is to make the easiest, fastest, and most painless way
- Gravatar and Federated avatar with custom source
- Mail service
- Administration panel
- Supports MySQL, PostgreSQL, SQLite3, MSSQL and [TiDB](https://github.com/pingcap/tidb) (experimental)
- Supports MySQL, PostgreSQL, SQLite3, MSSQL and [TiDB](https://github.com/pingcap/tidb) (via MySQL protocol)
- Multi-language support ([23 languages](https://crowdin.com/project/gogs))
## Hardware Requirements

View File

@@ -9,7 +9,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
## 项目概览
- 有关基本用法和变更日志,请通过 [使用手册](https://gogs.io/docs/intro/) 查看。
- 有关基本用法和变更日志,请通过 [使用手册](https://gogs.io/docs/intro) 查看。
- 想要先睹为快?直接去 [在线体验](https://try.gogs.io/gogs/gogs) 。
- 使用过程中遇到问题?尝试从 [故障排查](https://gogs.io/docs/intro/troubleshooting.html) 页面或 [用户论坛](https://discuss.gogs.io/) 获取帮助。
- 希望帮助多国语言界面的翻译吗?请立即访问 [详情页面](https://gogs.io/docs/features/i18n.html)
@@ -31,7 +31,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
- 支持 Jupyter Notebook
- 支持邮件服务
- 支持后台管理面板
- 支持 MySQL、PostgreSQL、SQLite3、MSSQL 和 [TiDB](https://github.com/pingcap/tidb)实验性支持) 数据库
- 支持 MySQL、PostgreSQL、SQLite3、MSSQL 和 [TiDB](https://github.com/pingcap/tidb)通过 MySQL 协议)数据库
- 支持多语言本地化([23 种语言]([more](https://crowdin.com/project/gogs))
## 硬件要求

View File

@@ -33,6 +33,7 @@ portable among all supported database engines.`,
boolFlag("verbose, v", "Show process details"),
stringFlag("tempdir, t", os.TempDir(), "Temporary directory path"),
stringFlag("target", "./", "Target directory path to save backup archive"),
stringFlag("archive-name", fmt.Sprintf("gogs-backup-%d.zip", time.Now().Unix()), "Name of backup archive"),
boolFlag("database-only", "Only dump database"),
boolFlag("exclude-repos", "Exclude repositories"),
},
@@ -69,7 +70,7 @@ func runBackup(c *cli.Context) error {
log.Fatal(0, "Fail to save metadata '%s': %v", metaFile, err)
}
archiveName := path.Join(c.String("target"), fmt.Sprintf("gogs-backup-%d.zip", time.Now().Unix()))
archiveName := path.Join(c.String("target"), c.String("archive-name"))
log.Info("Packing backup files to: %s", archiveName)
z, err := zip.Create(archiveName)

View File

@@ -17,6 +17,7 @@ import (
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/setting"
http "github.com/gogits/gogs/routers/repo"
)
@@ -153,7 +154,7 @@ func runServ(c *cli.Context) error {
owner, err := models.GetUserByName(ownerName)
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
fail("Repository owner does not exist", "Unregistered owner: %s", ownerName)
}
fail("Internal error", "Fail to get repository owner '%s': %v", ownerName, err)
@@ -161,7 +162,7 @@ func runServ(c *cli.Context) error {
repo, err := models.GetRepositoryByName(owner.ID, repoName)
if err != nil {
if models.IsErrRepoNotExist(err) {
if errors.IsRepoNotExist(err) {
fail(_ACCESS_DENIED_MESSAGE, "Repository does not exist: %s/%s", owner.Name, repoName)
}
fail("Internal error", "Fail to get repository: %v", err)

View File

@@ -24,16 +24,11 @@ import (
"github.com/go-macaron/i18n"
"github.com/go-macaron/session"
"github.com/go-macaron/toolbox"
"github.com/go-xorm/xorm"
"github.com/mcuadros/go-version"
"github.com/urfave/cli"
log "gopkg.in/clog.v1"
"gopkg.in/ini.v1"
"gopkg.in/macaron.v1"
"github.com/gogits/git-module"
"github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/bindata"
"github.com/gogits/gogs/modules/context"
@@ -62,49 +57,19 @@ and it takes care of all the other things for you`,
},
}
type VerChecker struct {
ImportPath string
Version func() string
Expected string
}
// checkVersion checks if binary matches the version of templates files.
func checkVersion() {
// Templates.
data, err := ioutil.ReadFile(setting.StaticRootPath + "/templates/.VERSION")
if err != nil {
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
log.Fatal(2, "Fail to read 'templates/.VERSION': %v", err)
}
tplVer := string(data)
if tplVer != setting.AppVer {
if version.Compare(tplVer, setting.AppVer, ">") {
log.Fatal(4, "Binary version is lower than template file version, did you forget to recompile Gogs?")
log.Fatal(2, "Binary version is lower than template file version, did you forget to recompile Gogs?")
} else {
log.Fatal(4, "Binary version is higher than template file version, did you forget to update template files?")
}
}
// Check dependency version.
// LEGACY [0.11]: no need to check version as we check in vendor into version control
checkers := []VerChecker{
{"github.com/go-xorm/xorm", func() string { return xorm.Version }, "0.6.0"},
{"github.com/go-macaron/binding", binding.Version, "0.3.2"},
{"github.com/go-macaron/cache", cache.Version, "0.1.2"},
{"github.com/go-macaron/csrf", csrf.Version, "0.1.0"},
{"github.com/go-macaron/i18n", i18n.Version, "0.3.0"},
{"github.com/go-macaron/session", session.Version, "0.1.6"},
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.3"},
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
{"gopkg.in/macaron.v1", macaron.Version, "1.1.7"},
{"github.com/gogits/git-module", git.Version, "0.4.12"},
{"github.com/gogits/go-gogs-client", gogs.Version, "0.12.1"},
}
for _, c := range checkers {
if !version.Compare(c.Version(), c.Expected, ">=") {
log.Fatal(4, `Dependency outdated!
Package '%s' current version (%s) is below requirement (%s),
please use following command to update this package and recompile Gogs:
go get -u %[1]s`, c.ImportPath, c.Version(), c.Expected)
log.Fatal(2, "Binary version is higher than template file version, did you forget to update template files?")
}
}
}
@@ -255,14 +220,16 @@ func runWeb(ctx *cli.Context) error {
m.Get("", user.SettingsOrganizations)
m.Post("/leave", user.SettingsLeaveOrganization)
})
m.Group("/repositories", func() {
m.Get("", user.SettingsRepos)
m.Post("/leave", user.SettingsLeaveRepo)
})
m.Route("/delete", "GET,POST", user.SettingsDelete)
}, reqSignIn, func(ctx *context.Context) {
ctx.Data["PageIsUserSettings"] = true
})
m.Group("/user", func() {
// r.Get("/feeds", binding.Bind(form.Feeds{}), user.Feeds)
m.Any("/activate", user.Activate)
m.Any("/activate_email", user.ActivateEmail)
m.Get("/email2user", user.Email2User)
@@ -460,12 +427,16 @@ func runWeb(ctx *cli.Context) error {
m.Post("/gogs/new", bindIgnErr(form.NewWebhook{}), repo.WebHooksNewPost)
m.Post("/slack/new", bindIgnErr(form.NewSlackHook{}), repo.SlackHooksNewPost)
m.Post("/discord/new", bindIgnErr(form.NewDiscordHook{}), repo.DiscordHooksNewPost)
m.Get("/:id", repo.WebHooksEdit)
m.Post("/:id/test", repo.TestWebhook)
m.Post("/gogs/:id", bindIgnErr(form.NewWebhook{}), repo.WebHooksEditPost)
m.Post("/slack/:id", bindIgnErr(form.NewSlackHook{}), repo.SlackHooksEditPost)
m.Post("/discord/:id", bindIgnErr(form.NewDiscordHook{}), repo.DiscordHooksEditPost)
m.Group("/:id", func() {
m.Get("", repo.WebHooksEdit)
m.Post("/test", repo.TestWebhook)
m.Post("/redelivery", repo.RedeliveryWebhook)
})
m.Group("/git", func() {
m.Get("", repo.SettingsGitHooks)
m.Combo("/:name").Get(repo.SettingsGitHooksEdit).
@@ -485,6 +456,12 @@ func runWeb(ctx *cli.Context) error {
}, reqSignIn, context.RepoAssignment(), reqRepoAdmin, context.RepoRef())
m.Get("/:username/:reponame/action/:action", reqSignIn, context.RepoAssignment(), repo.Action)
m.Group("/:username/:reponame", func() {
m.Get("/issues", repo.RetrieveLabels, repo.Issues)
m.Get("/issues/:index", repo.ViewIssue)
m.Get("/labels/", repo.RetrieveLabels, repo.Labels)
m.Get("/milestones", repo.Milestones)
}, ignSignIn, context.RepoAssignment(true))
m.Group("/:username/:reponame", func() {
// FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest.
// So they can apply their own enable/disable logic on routers.
@@ -492,12 +469,6 @@ func runWeb(ctx *cli.Context) error {
m.Combo("/new", repo.MustEnableIssues).Get(context.RepoRef(), repo.NewIssue).
Post(bindIgnErr(form.NewIssue{}), repo.NewIssuePost)
m.Group("/:index", func() {
m.Post("/label", repo.UpdateIssueLabel)
m.Post("/milestone", repo.UpdateIssueMilestone)
m.Post("/assignee", repo.UpdateIssueAssignee)
}, reqRepoWriter)
m.Group("/:index", func() {
m.Post("/title", repo.UpdateIssueTitle)
m.Post("/content", repo.UpdateIssueContent)
@@ -508,6 +479,24 @@ func runWeb(ctx *cli.Context) error {
m.Post("", repo.UpdateCommentContent)
m.Post("/delete", repo.DeleteComment)
})
}, reqSignIn, context.RepoAssignment(true))
m.Group("/:username/:reponame", func() {
m.Group("/wiki", func() {
m.Get("/?:page", repo.Wiki)
m.Get("/_pages", repo.WikiPages)
}, repo.MustEnableWiki, context.RepoRef())
}, ignSignIn, context.RepoAssignment(false, true))
m.Group("/:username/:reponame", func() {
// FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest.
// So they can apply their own enable/disable logic on routers.
m.Group("/issues", func() {
m.Group("/:index", func() {
m.Post("/label", repo.UpdateIssueLabel)
m.Post("/milestone", repo.UpdateIssueMilestone)
m.Post("/assignee", repo.UpdateIssueAssignee)
}, reqRepoWriter)
})
m.Group("/labels", func() {
m.Post("/new", bindIgnErr(form.CreateLabel{}), repo.NewLabel)
m.Post("/edit", bindIgnErr(form.CreateLabel{}), repo.UpdateLabel)
@@ -529,8 +518,8 @@ func runWeb(ctx *cli.Context) error {
m.Post("/delete", repo.DeleteRelease)
m.Get("/edit/*", repo.EditRelease)
m.Post("/edit/*", bindIgnErr(form.EditRelease{}), repo.EditReleasePost)
}, reqRepoWriter, func(ctx *context.Context) {
ctx.Data["PageIsViewCode"] = true
}, repo.MustBeNotBare, reqRepoWriter, func(ctx *context.Context) {
ctx.Data["PageIsViewFiles"] = true
})
// FIXME: Should use ctx.Repo.PullRequest to unify template, currently we have inconsistent URL
@@ -560,35 +549,32 @@ func runWeb(ctx *cli.Context) error {
return
}
})
}, reqRepoWriter, context.RepoRef(), func(ctx *context.Context) {
}, repo.MustBeNotBare, reqRepoWriter, context.RepoRef(), func(ctx *context.Context) {
if !ctx.Repo.CanEnableEditor() {
ctx.NotFound()
return
}
ctx.Data["PageIsViewFiles"] = true
})
}, reqSignIn, context.RepoAssignment(), repo.MustBeNotBare)
}, reqSignIn, context.RepoAssignment())
m.Group("/:username/:reponame", func() {
m.Group("", func() {
m.Get("/releases", repo.Releases)
m.Get("/^:type(issues|pulls)$", repo.RetrieveLabels, repo.Issues)
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)
m.Get("/labels/", repo.RetrieveLabels, repo.Labels)
m.Get("/milestones", repo.Milestones)
m.Get("/releases", repo.MustBeNotBare, repo.Releases)
m.Get("/pulls", repo.RetrieveLabels, repo.Pulls)
m.Get("/pulls/:index", repo.ViewPull)
}, context.RepoRef())
m.Group("/branches", func() {
m.Get("", repo.Branches)
m.Get("/all", repo.AllBranches)
m.Post("/delete/*", reqSignIn, reqRepoWriter, repo.DeleteBranchPost)
}, func(ctx *context.Context) {
ctx.Data["PageIsViewCode"] = true
}, repo.MustBeNotBare, func(ctx *context.Context) {
ctx.Data["PageIsViewFiles"] = true
})
m.Group("/wiki", func() {
m.Get("/?:page", repo.Wiki)
m.Get("/_pages", repo.WikiPages)
m.Group("", func() {
m.Combo("/_new").Get(repo.NewWiki).
Post(bindIgnErr(form.NewWiki{}), repo.NewWikiPost)
@@ -598,7 +584,7 @@ func runWeb(ctx *cli.Context) error {
}, reqSignIn, reqRepoWriter)
}, repo.MustEnableWiki, context.RepoRef())
m.Get("/archive/*", repo.Download)
m.Get("/archive/*", repo.MustBeNotBare, repo.Download)
m.Group("/pulls/:index", func() {
m.Get("/commits", context.RepoRef(), repo.ViewPullCommits)
@@ -612,18 +598,18 @@ func runWeb(ctx *cli.Context) error {
m.Get("/commits/*", repo.RefCommits)
m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.Diff)
m.Get("/forks", repo.Forks)
}, context.RepoRef())
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff)
}, repo.MustBeNotBare, context.RepoRef())
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.MustBeNotBare, repo.RawDiff)
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", context.RepoRef(), repo.CompareDiff)
}, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare)
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.MustBeNotBare, context.RepoRef(), repo.CompareDiff)
}, ignSignIn, context.RepoAssignment())
m.Group("/:username/:reponame", func() {
m.Get("/stars", repo.Stars)
m.Get("/watchers", repo.Watchers)
}, ignSignIn, context.RepoAssignment(), context.RepoRef())
m.Group("/:username", func() {
m.Get("/:reponame", ignSignIn, context.RepoAssignment(true), context.RepoRef(), repo.Home)
m.Get("/:reponame", ignSignIn, context.RepoAssignment(), context.RepoRef(), repo.Home)
m.Group("/:reponame", func() {
m.Head("/tasks/trigger", repo.TriggerTask)
@@ -632,7 +618,7 @@ func runWeb(ctx *cli.Context) error {
// Duplicated routes to enable different ways of accessing same set of URLs,
// e.g. with or without ".git" suffix.
m.Group("/:reponame([\\d\\w-_\\.]+\\.git$)", func() {
m.Get("", ignSignIn, context.RepoAssignment(true), context.RepoRef(), repo.Home)
m.Get("", ignSignIn, context.RepoAssignment(), context.RepoRef(), repo.Home)
m.Route("/*", "GET,POST", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP)
})
m.Route("/:reponame/*", "GET,POST", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP)

View File

@@ -93,6 +93,8 @@ ENABLE_LOCAL_PATH_MIGRATION = false
; value depend of how many CPUs (cores) you have. If the value is set to zero
; or under, GOGS will automatically detect the number of CPUs your system have
COMMITS_FETCH_CONCURRENCY = 0
; Enable render mode for raw file
ENABLE_RAW_FILE_RENDER_MODE = false
[repository.editor]
; List of file extensions that should have line wraps in the CodeMirror editor.
@@ -182,6 +184,9 @@ COOKIE_REMEMBER_NAME = gogs_incredible
COOKIE_SECURE = false
; Reverse proxy authentication header name of user name
REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
; Enable to set cookie to indicate user login status
ENABLE_LOGIN_STATUS_COOKIE = false
LOGIN_STATUS_COOKIE_NAME = login_status
[service]
ACTIVE_CODE_LIVE_MINUTES = 180
@@ -266,8 +271,8 @@ COOKIE_NAME = i_like_gogits
COOKIE_SECURE = false
; Enable set cookie, default is true
ENABLE_SET_COOKIE = true
; Session GC time interval, default is 86400
GC_INTERVAL_TIME = 86400
; Session GC time interval, default is 3600
GC_INTERVAL_TIME = 3600
; Session life time, default is 86400
SESSION_LIFE_TIME = 86400
; Cookie name for CSRF
@@ -343,6 +348,16 @@ LEVEL =
; Webhook URL
URL =
[log.xorm]
; Enable file rotation
ROTATE = true
; Rotate every day
ROTATE_DAILY = true
; Rotate once file size excesses x MB
MAX_SIZE = 100
; Maximum days to keep logger files
MAX_DAYS = 3
[cron]
; Enable running cron tasks periodically.
ENABLED = true
@@ -429,10 +444,14 @@ ORG_PAGING_NUM = 50
[ui.user]
; Number of repos that are showed in one page
REPO_PAGING_NUM = 15
; Number of news feeds that are showed in one page
NEWS_FEED_PAGING_NUM = 20
; Number of commits that are showed in one page
COMMITS_PAGING_NUM = 30
[i18n]
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,gl-ES,uk-UA
NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türkçe,čeština,Српски,Svenska,한국어,Galego,Українська
NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,français,Nederlands,latviešu,русский,日本語,español,português do Brasil,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어,galego,українська
; Used for datetimepicker
[i18n.datelang]

View File

@@ -42,6 +42,7 @@ Ilya Makarov
Jamie Mansfield <dev AT jamierocks DOT uk>
Javier Ortiz Bultron <javier DOT ortiz DOT 78 AT gmail DOT com>
Jean THOMAS <contact AT tibounise DOT com>
John Behm <jxsl13 AT googlemail DOT com>
Jonas De Kegel <jonasgithub [AT] gmail [DOT] com>
Joubert RedRat <me+github AT redrat DOT com DOT br>
Juraj Bubniak <contact AT jbub DOT eu>

View File

@@ -82,6 +82,8 @@ app_url=URL адрес на приложението
app_url_helper=Този настройка променя HTTP/HTTPS адреса за клониране, а понякога и адреса на ел. поща.
log_root_path=Път към журналите
log_root_path_helper=Директория в която се записват журналите.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Опционални настройки
email_title=Настройки на пощенска услуга
@@ -256,6 +258,7 @@ ssh_keys=SSH ключове
social=Социални профили
applications=Приложения
orgs=Организации
repos=Repositories
delete=Изтрий профил
uid=UID
@@ -344,6 +347,11 @@ orgs.none=Не сте член на никоя организация.
orgs.leave_title=Напусни организация
orgs.leave_desc=Ще загубите достъп до всички хранилища и екипи, след като напуснете организацията. Желаете ли да продължите?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Изтриване на собствения профил
delete_prompt=Тази операция ще изтрие Вашия профил завинаги и тя <strong>НЕ МОЖЕ</strong> да бъде отменена в последствие!
confirm_delete_account=Потвърди изтриването
@@ -414,7 +422,7 @@ quick_guide=Бърз справочник
clone_this_repo=Клонирай хранилището
create_new_repo_command=Създай ново хранилище чрез командния ред
push_exist_repo=Предай съществуващо хранилище през командния ред
repo_is_empty=Това хранилище е празно. Моля проверете по-късно пак!
bare_message=This repository does not have any content yet.
files=Файлове
branch=Клон
@@ -650,6 +658,7 @@ settings.collaboration.write=За писане
settings.collaboration.read=За четене
settings.collaboration.undefined=Недефинирано
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Тази промяна ще засегне вр
settings.advanced_settings=Разширени настройки
settings.wiki_desc=Включи система за уики
settings.use_internal_wiki=Използвай вградено уики
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Използвай външно уики
settings.external_wiki_url=URL адрес на външно уики
settings.external_wiki_url_desc=Посетителите ще бъдат пренасочени към този URL адрес от връзката за раздел уики.
settings.issues_desc=Включи система за проследяване на задачи
settings.use_internal_issue_tracker=Изполвай вградена система за проследяване на задачи
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Използвай външна система за проследяване на задачи
settings.external_tracker_url=URL адрес на външна система за проследяване на задачи
settings.external_tracker_url_desc=Посетителите ще бъдат пренасочени към този URL адрес от връзката на раздела.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Уеб-куката е изтрита успе
settings.webhook.test_delivery=Тестово изпращане
settings.webhook.test_delivery_desc=Симулира тестово изпращане за тест на настройките на уеб-куката
settings.webhook.test_delivery_success=Тестовата уеб-кука е добавена в опашката за изпращане. Може да отнеме няколко секунди преди да се появи в историята с доставени.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Заявка
settings.webhook.response=Отговор
settings.webhook.headers=Заглавки

View File

@@ -1,4 +1,4 @@
app_desc=Bezbolestná soukromá Git služba
app_desc=Snadná soukromá služba Git
home=Domů
dashboard=Přehled
@@ -27,7 +27,7 @@ repository=Repozitář
organization=Organizace
mirror=Zrcadlo
new_repo=Nový repozitář
new_migrate=Nová migrace
new_migrate=Nové přenesení
new_mirror=Nové zrcadlo
new_fork=Nový repositář rozštěpení
new_org=Nová organizace
@@ -39,7 +39,7 @@ your_profile=Váš profil
your_settings=Vaše nastavení
activities=Aktivity
pull_requests=Požadavek na natažení
pull_requests=Požadavky na natažení
issues=Úkoly
cancel=Zrušit
@@ -48,18 +48,18 @@ cancel=Zrušit
install=Instalace
title=Kroky instalace pro první běh
docker_helper=Spouštíte-li Gogs uvnitř Dockeru, přečtěte si prosím pečlivě <a target="_blank" href="%s">návod</a>, než něco změníte na této stránce!
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
requite_db_desc=Gogs vyžaduje MySQL, PostgreSQL, SQLite3, MSSQL nebo TiDB.
db_title=Nastavení databáze
db_type=Typ databáze
host=Hostitel
host=Server
user=Uživatel
password=Heslo
db_name=Název databáze
db_helper=Prosíme, pro MySQL použijte INNODB engine se znakovou sadou utf8_general_ci.
ssl_mode=SSL Mód
path=Cesta
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
sqlite_helper=Cesta k SQLite3 databázi. <br>Prosím, použijte absolutní cestu, pokud startujete Gogs jako službu.
err_empty_db_path=Cesta k SQLite3 databázi nemůže být prázdná.
no_admin_and_disable_registration=Nemůžete vypnout registraci účtů bez vytvoření účtu správce.
err_empty_admin_password=Heslo správce nemůže být prázdné.
@@ -74,14 +74,16 @@ domain=Doména
domain_helper=Toto ovlivňuje URL klonů skrze SSH.
ssh_port=Port SSH
ssh_port_helper=Číslo portu, které používá váš SSH server. Nechte jej prázdné pro vypnutí používání SSH.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
use_builtin_ssh_server=Použít vestavěný SSH server
use_builtin_ssh_server_popup=Pro Git operace spustit vestavěný SSH server, aby byl rozpoznán od systémové SSH služby.
http_port=Port HTTP
http_port_helper=Číslo portu, na kterém aplikace naslouchá.
app_url=URL aplikace
app_url_helper=Toto ovlivňuje URL klonů skrze HTTP/HTTPS a odkazů v e-mailech.
log_root_path=Adresář logů
log_root_path_helper=Adresář, kam se budou zapisovat logy.
log_root_path=Adresář systémových záznamů
log_root_path_helper=Adresář, kam se budou zapisovat systémové záznamy.
enable_console_mode=Povolit režim konzoly
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Dodatečná nastavení
email_title=Nastavení e-mailové služby
@@ -93,17 +95,17 @@ mailer_password=Heslo
register_confirm=Povolit potvrzení registrace
mail_notify=Povolit upozornění e-mailem
server_service_title=Nastavení serveru a ostatních služeb
offline_mode=Zapnout režim offline
offline_mode=Povolit režim offline
offline_mode_popup=Vypnout síť doručování obsahu (CDN) i v produkčním režimu, vše bude obslouženo místně.
disable_gravatar=Vypnout službu Gravatar
disable_gravatar_popup=Vypnout službu Gravatar a ostatní zdroje. Všechny ikony uživatelů budou nahrány uživateli nebo výchozí.
federated_avatar_lookup=Povolit vyhledání avatarů z veřejných zdrojů
federated_avatar_lookup_popup=Povolte vyhledání avatarů z veřejných zdrojů pro využití služeb založených na libravatar.
federated_avatar_lookup=Povolit vyhledání ikon uživatelů z veřejných zdrojů
federated_avatar_lookup_popup=Povolit vyhledání ikon uživatelů z veřejných zdrojů pro využití služeb založených na libravatar.
disable_registration=Vypnout možnost se zaregistrovat
disable_registration_popup=Vypnout možnost registrace, pouze správce může vytvořit účty.
enable_captcha=Povolit službu CAPTCHA
enable_captcha_popup=Vyžadovat správně zadaný text CAPTCHA při registraci.
require_sign_in_view=Zapnout nutnost přihlášení pro zobrazení stránek
require_sign_in_view=Povolit nutnost přihlášení pro zobrazení stránek
require_sign_in_view_popup=Stránky budou zobrazeny pouze přihlášeným uživatelům, ostatní návštěvníci uvidí pouze přihlašovací a registrační formulář.
admin_setting_desc=Nemusíte teď hned vytváře správce, kterýkoliv uživatel s ID=1 dostane automaticky správcovský přístup.
admin_title=Nastavení účtu správce
@@ -117,11 +119,11 @@ sqlite3_not_available=Vaše verze vydání Gogs nepodporuje SQLite3, prosíme st
invalid_db_setting=Nastavení databáze není správné: %v
invalid_repo_path=Kořenový adresář repositáře není správný: %v
run_user_not_match=Uživatel pro spuštění není aktuální uživatel: %s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
invalid_smtp_from=Hodnota položky SMTP server není zadána správně: %v
save_config_failed=Uložení konfigurace se nezdařilo: %v
invalid_admin_setting=Nastavení účtu správce není správné: %v
install_success=Vítejte! Jsme rádi, že jste si vybrali Gogs. Bavte se a opatrujte se.
invalid_log_root_path=Kořenový adresář logů není správný: %v
invalid_log_root_path=Kořenový adresář systémových záznamů není správný: %v
[home]
uname_holder=Uživatelské jméno nebo e-mailová adresa
@@ -201,7 +203,7 @@ Content=Obsah
require_error=` nemůže být prázdný.`
alpha_dash_error=` musí být pouze písmena, číslice či znaky - a _ .`
alpha_dash_dot_error=` musí být pouze písmena, číslice, tečka či znaky - a _ .`
alpha_dash_dot_slash_error=` must be valid alpha or numeric or dash(-_) or dot characters or slashes.`
alpha_dash_dot_slash_error=` musí být validní písmena, čísla nebo pomlčka, podtržítko či tečka, čárka a nebo lomítka.`
size_error=` musí být minimálně velikosti %s.`
min_size_error=` musí obsahovat nejméně %s znaků.`
max_size_error=` musí obsahovat maximálně %s znaků.`
@@ -256,6 +258,7 @@ ssh_keys=Klíče SSH
social=Sociální účty
applications=Aplikace
orgs=Organizace
repos=Repositáře
delete=Smazat účet
uid=UID
@@ -273,10 +276,10 @@ continue=Pokračovat
cancel=Zrušit
lookup_avatar_by_mail=Vyhledávat uživatelskou ikonu podle emailu
federated_avatar_lookup=Vyhledání Avatarů ve veřejných zdrojích
federated_avatar_lookup=Vyhledání ikon uživatelů ve veřejných zdrojích
enable_custom_avatar=Povolit uživatelskou ikonu uživatele
choose_new_avatar=Vybrat novou ikonu uživatele
update_avatar=Aktualizovat nastavení ikony uživatele
update_avatar=Změnit nastavení ikony uživatele
delete_current_avatar=Smazat aktuální ikonu uživatele
uploaded_avatar_not_a_image=Nahraný soubor není obrázkem.
update_avatar_success=Nastavení vaší ikony uživatele bylo změněno.
@@ -338,11 +341,16 @@ generate_token_succees=Vaše přístupová poukázka byl úspěšně vygenerová
delete_token=Smazat
access_token_deletion=Smazání osobní přístupové poukázky
access_token_deletion_desc=Smazáním této osobní přístupové poukázky odstraní všechen návazný přístup aplikace. Chcete pokračovat?
delete_token_success=Osobní přístupová poukázka byla úspěšně odstraněna! Nezapomeňte také aktualizovat vaši aplikaci.
delete_token_success=Osobní přístupová poukázka byla úspěšně odstraněna! Nezapomeňte také změnit nastavení vaší aplikace.
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
orgs.none=Nejste členem žádné organizace.
orgs.leave_title=Opustit organizaci
orgs.leave_desc=Opuštěním organizace ztratíte přístup do všech repositářů a k týmům. Chcete pokračovat?
repos.leave=Opustit
repos.leave_title=Opustit repositář
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Smazat váš účet
delete_prompt=Tato operace permanentně smaže váš účet a tato změna <strong>nemůže</strong> být vrácena!
@@ -387,13 +395,13 @@ form.name_reserved=Název repositáře '%s' je rezervován.
form.name_pattern_not_allowed=Vzor názvu repositáře '%s' není povolen.
need_auth=Ověření je vyžadováno
migrate_type=Typ migrace
migrate_type=Typ přenesení
migrate_type_helper=Tento repositář bude <span class="text blue">zrcadlem</span>
migrate_repo=Přenést repositář
migrate.clone_address=Naklonovat adresu
migrate.clone_address_desc=This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=Není dovoleno importovat místní repositáře.
migrate.clone_address_desc=Toto může být HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=Máte povoleno přenést repositář z lokální cesty serveru.
migrate.permission_denied=Není vám dovoleno importovat místní repositáře.
migrate.invalid_local_path=Neplatná místní cesta, buď neexistuje nebo není adresářem.
migrate.failed=Přenesení selhalo: %v
@@ -413,10 +421,10 @@ no_desc=Bez popisu
quick_guide=Krátká příručka
clone_this_repo=Naklonovat tento repositář
create_new_repo_command=Vytvořit nový repositář v příkazové řádce
push_exist_repo=Nahrát existující repositář z příkazové řádky
repo_is_empty=Tento repositář je prázdný, prosíme, vraťte se brzo zpátky!
push_exist_repo=Odeslat existující repositář z příkazové řádky
bare_message=This repository does not have any content yet.
files=Files
files=Soubory
branch=Větev
tree=Strom
filter_branch_and_tag=Filtr pro větev nebo značku
@@ -425,23 +433,23 @@ tags=Značky
issues=Úkoly
pulls=Požadavky na natažení
labels=Štítky
milestones=Mezníky
milestones=Milník
commits=Revize
git_branches=Branches
git_branches=Větve
releases=Vydání
file_raw=Surový
file_history=Historie
file_view_raw=Zobrazit v surovém stavu
file_permalink=Trvalý odkaz
file_too_large=Tento soubor je příliš velký pro zobrazení
video_not_supported_in_browser=Váš prohlížeč nepodporuje tag pro HTML5 video.
video_not_supported_in_browser=Váš prohlížeč nepodporuje značku pro HTML5 video.
branches.overview=Overview
branches.active_branches=Active Branches
branches.stale_branches=Stale Branches
branches.all=All Branches
branches.updated_by=Updated %[1]s by %[2]s
branches.change_default_branch=Change Default Branch
branches.overview=Přehled
branches.active_branches=Aktivní větve
branches.stale_branches=Zastaralé větve
branches.all=Všechny větve
branches.updated_by=%[2]s změnil %[1]s
branches.change_default_branch=Změnit výchozí větev
editor.new_file=Nový soubor
editor.upload_file=Nahrát soubor
@@ -450,7 +458,7 @@ editor.preview_changes=Náhled změn
editor.cannot_edit_non_text_files=Netextové soubory není možné upravovat
editor.edit_this_file=Upravit tento soubor
editor.must_be_on_a_branch=Musíte mít zvolenu větev pro úpravu či návrh změn tohoto souboru
editor.fork_before_edit=Musíte provést rozvětvení repositáře před úpravou souboru
editor.fork_before_edit=Musíte provést rozštěpení repositáře před úpravou souboru
editor.delete_this_file=Odstranit tento soubor
editor.must_have_write_access=Musíte mít přístup pro zápis pro dělání či navrhování změn tohoto souboru
editor.file_delete_success=Soubor '%s' byl úspěšně odstraněn!
@@ -461,11 +469,11 @@ editor.cancel_lower=zrušit
editor.commit_changes=Uložit změny revize
editor.add_tmpl=Přidat '%s/<nazev_souboru>'
editor.add=Přidat '%s'
editor.update=Aktualizovat "%s"
editor.update=Změnit "%s"
editor.delete=Smazat '%s'
editor.commit_message_desc=Přidat dobrovolný rozšířený popis...
editor.commit_directly_to_this_branch=Uložte změny revize přímo do větve <strong class="branch-name">%s</strong>.
editor.create_new_branch=Vytvořit <strong>novou větev</strong> pro tuto revizi a spustit požadavek na stažení.
editor.create_new_branch=Vytvořit <strong>novou větev</strong> pro tuto revizi a vytvořit požadavek na natažení.
editor.new_branch_name_desc=Nový název větve...
editor.cancel=Zrušit
editor.filename_cannot_be_empty=Název souboru nemůže být prázdný.
@@ -482,7 +490,7 @@ editor.add_subdir=Přidat podadresář...
editor.unable_to_upload_files=Nepodařilo se nahrát soubor '%s'. Chyba: %v
editor.upload_files_to_dir=Nahrát soubory do '%s'
commits.commit_history=Commit History
commits.commit_history=Historie revizí
commits.commits=Revize
commits.search=Hledání revizí
commits.find=Hledat
@@ -529,8 +537,8 @@ issues.filter_type.mentioning_you=Zmiňující vás
issues.filter_sort=Seřadit
issues.filter_sort.latest=Nejnovější
issues.filter_sort.oldest=Nejstarší
issues.filter_sort.recentupdate=Nedávno aktualizova
issues.filter_sort.leastupdate=Nejdřívější změny
issues.filter_sort.recentupdate=Nedávno změně
issues.filter_sort.leastupdate=Poslední změny
issues.filter_sort.mostcomment=Nejvíce komentované
issues.filter_sort.leastcomment=Nejméně komentované
issues.opened_by=otevřeno %[1]s uživatelem <a href="%[2]s">%[3]s</a>
@@ -574,7 +582,7 @@ issues.attachment.download=`Klikněte pro stažení "%s"`
pulls.new=Nový požadavek na natažení
pulls.compare_changes=Porovnat změny
pulls.compare_changes_desc=Porovnat dvě větve a vytvořit pro změny žádost na natažení.
pulls.compare_changes_desc=Porovnat dvě větve a vytvořit pro změny požadavek na natažení.
pulls.compare_base=základní
pulls.compare_compare=porovnat
pulls.filter_branch=Filtrovat větev
@@ -590,13 +598,13 @@ pulls.tab_files=Změněné soubory
pulls.reopen_to_merge=Prosíme, otevřete znovu tento požadavek na natažení, aby se provedla operace sloučení.
pulls.merged=Sloučený
pulls.has_merged=Tento požadavek na natažení byl úspěšně sloučen!
pulls.data_broken=Data této žádosti na natažení byla narušena z důvodu smazání informací o rozštěpení.
pulls.is_checking=Kontrola konfliktů stále pokračuje, prosíme obnovte za několik okamžiků stránku.
pulls.data_broken=Data tohoto požadavku na natažení byla narušena z důvodu smazání informace o rozštěpení.
pulls.is_checking=Kontrola rozporů stále pokračuje, prosíme obnovte za několik okamžiků stránku.
pulls.can_auto_merge_desc=Tento požadavek na natažení může být automaticky sloučen.
pulls.cannot_auto_merge_desc=Tento požadavek na natažení nemůže být automaticky sloučen, neboť se v něm nachází konflikty.
pulls.cannot_auto_merge_helper=Prosíme proveďte sloučení ručně, aby byly vyřešeny konflitky.
pulls.merge_pull_request=Sloučit požadavek na stažení
pulls.open_unmerged_pull_exists=`Nemůžete znovuotevřít požadavek na stažení, neboť požadavek na stažení ze stejného repositáře se stejnými informacemi pro sloučení již existuje (#%d).`
pulls.cannot_auto_merge_desc=Tento požadavek na natažení nemůže být automaticky sloučen, neboť se v něm nachází rozpory.
pulls.cannot_auto_merge_helper=Prosíme proveďte sloučení ručně, aby byly vyřešeny rozpory.
pulls.merge_pull_request=Sloučit požadavek na natažení
pulls.open_unmerged_pull_exists=`Nemůžete znovuotevřít požadavek na natažení, neboť požadavek na natažení ze stejného repositáře se stejnými informacemi pro sloučení již existuje (#%d) a čeká na sloučení.`
pulls.delete_branch=Smazat větev
pulls.delete_branch_has_new_commits=Větev nemůže být smazána, neboť po sloučení jsou v ní nové revize.
@@ -631,7 +639,7 @@ wiki.create_first_page=Vytvořte první stránku
wiki.page=Stránka
wiki.filter_page=Filtr stránky
wiki.new_page=Vytvořit novou stránku
wiki.default_commit_message=Napište (volitelnou) poznámku k této úpravě.
wiki.default_commit_message=Napište (volitelnou) poznámku k této změně.
wiki.save_page=Uložit stránku
wiki.last_commit_info=%s upravil tuto stránku %s
wiki.edit_page_button=Změnit stránku
@@ -640,7 +648,7 @@ wiki.delete_page_button=Smazat stránku
wiki.delete_page_notice_1=Toto smaže stránku <code>"%s"</code>. Buďte si prosím jisti.
wiki.page_already_exists=Stránka Wiki se stejným názvem již existuje.
wiki.pages=Stránky
wiki.last_updated=Naposledy aktualizováno: %s
wiki.last_updated=Naposledy změněné: %s
settings=Nastavení
settings.options=Možnosti
@@ -649,27 +657,28 @@ settings.collaboration.admin=Správce
settings.collaboration.write=Zápis
settings.collaboration.read=Čtení
settings.collaboration.undefined=Neurčeno
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch. Users in whitelist will bypass require pull request check.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.branches=Větve
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Výchozí větev
settings.default_branch_desc=Výchozí větev je považována za "základní" větev pro zápisy změn revizí, požadavky na natažení a on-line úpravy.
settings.update=Změnit
settings.update_default_branch_success=Výchozí větev tohoto repositáře byla úspěšně změněna!
settings.protected_branches=Chráněné větve
settings.protected_branches_desc=Ochrana větví před vynuceným odesláním a náhodným smazáním. Schválený seznam uživatelů ukládající zápisy revizí.
settings.choose_a_branch=Vyberte větev...
settings.branch_protection=Ochrana větví
settings.branch_protection_desc=Prosím vyberte možnosti ochrany větve <b>%s</b>.
settings.protect_this_branch=Chránit tuto větev
settings.protect_this_branch_desc=Vypnout vynucená odeslání a zabránit smazání.
settings.protect_require_pull_request=Vyžaduje požadavek na natažení místo přímého odeslání
settings.protect_require_pull_request_desc=Tato možnost zakáže přímé odeslání do větve. Revize musí být odeslány do jiné nechráněné větve a sloučeny do této větvě pomocí požadavku na natažení.
settings.protect_whitelist_committers=Seznam uživatelů, kteří mohou odesílat do této větve
settings.protect_whitelist_committers_desc=Přidejte uživatele a týmy, které mají povolení odesílat do této větve. Tito uživatelé mohou obejít kontrolu na požadavek na natažení.
settings.protect_whitelist_users=Uživatelé, kteří mohou odesílat do této větvě
settings.protect_whitelist_search_users=Vyhledat uživatele
settings.protect_whitelist_teams=Týmy, jejichž členové mohou odesílat do této větve
settings.protect_whitelist_search_teams=Vyhledat týmy
settings.update_protect_branch_success=Možnosti ochrany této větve byly úspěšně změněny!
settings.hooks=Webové háčky
settings.githooks=Háčky Gitu
settings.basic_settings=Základní nastavení
@@ -682,22 +691,24 @@ settings.change_reponame_prompt=Tato změna ovlivní vztah odkazů k repositář
settings.advanced_settings=Pokročilá nastavení
settings.wiki_desc=Povolit systém Wiki
settings.use_internal_wiki=Použít vestavěný systém Wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Používat externí Wiki
settings.external_wiki_url=URL externí Wiki
settings.external_wiki_url_desc=Návštěvníci budou při kliknutí na záložku přesměrování na tuto URL.
settings.issues_desc=Povolit systém úkolů
settings.use_internal_issue_tracker=Povolit věstavěný odlehčený systém úkolů
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Použít externí systém úkolů
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.external_tracker_url=URL externí evidence úkolů
settings.external_tracker_url_desc=Návštěvníci budou po kliknutí na danou záložku přesměrováni na danou adresu.
settings.tracker_url_format=Formát URL externího systému úkolů
settings.tracker_issue_style=Styl pojmenování externího systému úkolů:
settings.tracker_issue_style.numeric=Číselný
settings.tracker_issue_style.alphanumeric=Alfanumerický
settings.tracker_url_format_desc=Můžete použít zástupné výrazy <code>{user} {repo} {index}</code> pro uživatelské jméno, název repositáře a index úkolu.
settings.pulls_desc=Povolit požadavky na stažení, aby veřejné příspěvky mohly být akceptovány
settings.pulls_desc=Povolit požadavky na natažení, aby mohly být příspěvky veřejnosti akceptovány
settings.danger_zone=Nebezpečná zóna
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.cannot_fork_to_same_owner=Nemůžete rozštěpit repositář jejímu vlastníkovi.
settings.new_owner_has_same_repo=Nový vlastník již repositář se stejným názvem má. Vyberte, prosíme, jiné jméno.
settings.convert=Převést na běžný repositář
settings.convert_desc=Můžete převést toto zrcadlo na běžný repositář. Tato změna nemůže být vrácena.
@@ -738,8 +749,10 @@ settings.webhook_deletion=Smazat webový háček
settings.webhook_deletion_desc=Smazáním tohoto webového háčku dojte také ke smazání veškerých informací o něm a také historie volání. Chcete pokračovat?
settings.webhook_deletion_success=Webový háček byl úspěšně smazán!
settings.webhook.test_delivery=Test doručitelnosti
settings.webhook.test_delivery_desc=Odeslat falešnou událost doručení nahrání pro test vašeho nastavení webových háčků
settings.webhook.test_delivery_desc=Odeslat falešnou událost doručení odeslání pro test vašeho nastavení webových háčků
settings.webhook.test_delivery_success=Testovací webový háček byl přidán do fronty doručení. Bude to trvat několik sekund, než se ukáže v historii doručení.
settings.webhook.redelivery=Opětovné doručení
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Požadavek
settings.webhook.response=Odpověď
settings.webhook.headers=Hlavičky
@@ -749,50 +762,50 @@ settings.githooks_desc=Jelikož háčky Gitu jsou spravovány Gitem samotným, m
settings.githook_edit_desc=Je-li háček neaktivní, bude zobrazen vzorový obsah. Nebude-li zadán žádný obsah, háček bude vypnut.
settings.githook_name=Název háčku
settings.githook_content=Obsah háčku
settings.update_githook=Upravit háček
settings.update_githook=Změnit háček
settings.add_webhook_desc=Gogs zašle požadavek typu <code>POST</code> na zadanou URL, společně s informacemi o události, která nastala. Můžete také specifikovat, jaký datový formát se má použít po spuštění daného háčku (JSON, x-www-form-urlencoded, XML atp.). Více informací je k nalezení v našem <a target="_blank" href="%s">Návodu na webové háčky</a>.
settings.payload_url=URL obsahu
settings.content_type=Typ obsahu
settings.secret=Tajný klíč
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.secret_desc=Tajný klíč bude odeslán jako SHA256 HMAC hexadecimální přehled použítím hlavičky <code>X-Gogs-Signature</code>.
settings.slack_username=Uživatelské jméno
settings.slack_icon_url=URL ikony uživatele
settings.slack_color=Barva
settings.event_desc=Kdyby měl být webový háček spouštěn?
settings.event_push_only=Jen pouze při událost <code>nahrání</code>.
settings.event_push_only=Jen pouze při události <code>odeslání</code>.
settings.event_send_everything=Potřebuji <strong>vše</strong>.
settings.event_choose=Nech mne vybrat, co potřebuji.
settings.event_create=Vytvořit
settings.event_create_desc=Větev nebo značka byla vytvořena
settings.event_delete=Delete
settings.event_delete_desc=Branch or tag deleted
settings.event_fork=Fork
settings.event_fork_desc=Repository forked
settings.event_push=Nahrát
settings.event_push_desc=Nahrání pomocí Gitu do repositáře
settings.event_issues=Issues
settings.event_issues_desc=Issue opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, or demilestoned.
settings.event_issue_comment=Issue Comment
settings.event_issue_comment_desc=Issue comment created, edited, or deleted.
settings.event_pull_request=Požadavek na stažení
settings.event_pull_request_desc=Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, demilestoned, or synchronized.
settings.event_release=Release
settings.event_release_desc=Release published in a repository.
settings.event_delete=Smazat
settings.event_delete_desc=Větev nebo značka smazána
settings.event_fork=Rozštěpení
settings.event_fork_desc=Repositář rozštěpen
settings.event_push=Odeslat
settings.event_push_desc=Odeslání pomocí Gitu do repositáře
settings.event_issues=Úkoly
settings.event_issues_desc=Úkol, který je otevřen, uzavřen, změněn, přiřazen, nepřiřazen, mající změněn štítek, smazán štítek, mající přiřazen milník, nemající přiřazen milník.
settings.event_issue_comment=Komentář k úkolu
settings.event_issue_comment_desc=Komentář k úkolu vytvořen, upraven nebo smazán.
settings.event_pull_request=Požadavek na natažení
settings.event_pull_request_desc=Požadavek na natažení otevřen, uzavřen, znovuotevřen, změněn, přiřazen, nepřiřazen, změněn štítek, smazán štítek, mající nastaven štítek, zrušeno nastavení štítku nebo synchronizován.
settings.event_release=Vydání
settings.event_release_desc=Vydání vystaveno v repositáři.
settings.active=Aktivní
settings.active_helper=Podrobnosti vztahující se k události, která spustila háček, budou doručeny taktéž.
settings.add_hook_success=Nový webový háček byl přidán.
settings.update_webhook=Upravit webový háček
settings.update_hook_success=Webový háček byl upraven.
settings.update_webhook=Změnit webový háček
settings.update_hook_success=Webový háček byl změněn.
settings.delete_webhook=Smazat webový háček
settings.recent_deliveries=Nedávné dodávky
settings.hook_type=Typ háčku
settings.add_slack_hook_desc=Přidat integraci <a href="%s">Slacku</a> do vašeho repositáře.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.add_discord_hook_desc=Přidat integraci <a href="%s">Discord</a> do vašeho repositáře.
settings.slack_token=Poukázka
settings.slack_domain=Doména
settings.slack_channel=Kanál
settings.deploy_keys=Klíče pro nasazení
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.deploy_keys_helper=<b>Přichycen při činu!</b> Pokud chcete přidat osobní veřejné klíče, zadejte je prosím v <a href="%s%s">nastavení vašeho účtu</a>.
settings.add_deploy_key=Přidat klíč pro nasazení
settings.deploy_key_desc=Klíče pro nasazení mají pouze přístup ke čtení. Nejsou stejné jako osobní klíče SSH.
settings.no_deploy_keys=Žádné klíče pro nasazení nebyly ještě přidány.
@@ -829,7 +842,7 @@ release.new_subheader=Pro iteraci produktu zveřejňujte vydání.
release.edit_subheader=Detailní log změn může pomoci uživatelům porozumět, co bylo vylepšeno.
release.tag_name=Název značky
release.target=Cíl
release.tag_helper=Vyberte existující značku nebo vytvořte novou značku při vydání.
release.tag_helper=Vyberte existující značku nebo vytvořte novou při vydání.
release.title=Název
release.content=Obsah
release.write=Zapsat
@@ -846,7 +859,7 @@ release.deletion=Smazání vydání
release.deletion_desc=Smazáním tohoto vydání se také smaže odpovídající značka. Chcete pokračovat?
release.deletion_success=Vydání bylo úspěšně smazáno!
release.tag_name_already_exist=Vydání s touto značkou již existuje.
release.tag_name_invalid=Název štítku není platný.
release.tag_name_invalid=Název značky není platný.
release.downloads=Soubory ke stažení
[org]
@@ -854,7 +867,7 @@ org_name_holder=Název organizace
org_full_name_holder=Celý název organizace
org_name_helper=Skvělé názvy organizací jsou krátké a zapamatovatelné.
create_org=Vytvořit organizaci
repo_updated=Upraveno
repo_updated=Změněné
people=Lidé
invite_someone=Přizvěte někoho
teams=Týmy
@@ -870,15 +883,15 @@ team_permission_desc=Jakou úroveň přístupu má mít tento tým?
form.name_reserved=Název organizace '%s' je již rezervován.
form.name_pattern_not_allowed=Vzor názvu organizace '%s' není povolen.
form.team_name_reserved=Team name '%s' is reserved.
form.team_name_reserved=Název týmu '%s' je vyhrazen.
settings=Nastavení
settings.options=Možnosti
settings.full_name=Celé jméno
settings.website=Webové stránky
settings.location=Umístění
settings.update_settings=Upravit nastavení
settings.update_setting_success=Nastavení organizace bylo úspěšně upraveno.
settings.update_settings=Změnit nastavení
settings.update_setting_success=Nastavení organizace bylo úspěšně změněno.
settings.change_orgname_prompt=Tato změna ovlivní vztah odkazů k organizaci.
settings.update_avatar_success=Nastavení ikony organizace bylo úspěšně změněno.
settings.delete=Smazat organizaci
@@ -897,7 +910,7 @@ members.private_helper=označit jako veřejný
members.member_role=Role člena:
members.owner=Vlastník
members.member=Člen
members.remove=Smazat
members.remove=Odstranit
members.leave=Opustit
members.invite_desc=Přidat nového člena do %s:
members.invite_now=Pozvat teď
@@ -907,26 +920,26 @@ teams.leave=Opustit
teams.read_access=Právo čtení
teams.read_access_helper=Tento tým bude moci prohlížet a klonovat své repositáře.
teams.write_access=Právo zápisu
teams.write_access_helper=Tento tým bude schopen jak číst své repositáře, tak do nich nahrávat.
teams.write_access_helper=Tento tým bude schopen jak číst své repositáře, tak do nich odesílat.
teams.admin_access=Přístup správce
teams.admin_access_helper=Tento tým bude schopen odeslat a natáhnout změny do svých repositářů, stejně tak přidat k těmto repositářům další spolupracovníky.
teams.no_desc=Tento tým není žádný popis
teams.settings=Nastavení
teams.owners_permission_desc=Vlastníci mají plný přístup do <strong>všech repositářů</strong> a jsou <strong>správci</strong> této organizace.
teams.members=Členové týmu
teams.update_settings=Upravit nastavení
teams.update_settings=Změnit nastavení
teams.delete_team=Smazat tento tým
teams.add_team_member=Přidat člena týmu
teams.delete_team_title=Smazání týmu
teams.delete_team_desc=Jelikož bude tento tým smazán, jeho členové mohou ztratit přístup do některých repositářů. Chcete pokračovat?
teams.delete_team_success=Daný tým byl úspěšně smazán.
teams.read_permission_desc=Členství v tom týmu poskytuje právo <strong>čtení</strong>: členové mohou číst z a vytvářet klony repositářů týmu.
teams.write_permission_desc=Členství v tom týmu poskytuje právo <strong>zápisu</strong>: členové mohou číst z a nahrávat do repositářů týmu.
teams.admin_permission_desc=Členství v tom týmu poskytuje právo <strong>správce</strong>: členové mohou číst z, nahrávat do a přidávat spolupracovníky do repositářů týmu.
teams.write_permission_desc=Členství v tom týmu poskytuje právo <strong>zápisu</strong>: členové mohou číst z a odesílat do repositářů týmu.
teams.admin_permission_desc=Členství v tom týmu poskytuje právo <strong>správce</strong>: členové mohou číst z, odesílat do a přidávat spolupracovníky do repositářů týmu.
teams.repositories=Repositáře týmu
teams.search_repo_placeholder=Hledat repositář...
teams.add_team_repository=Přidat repositář týmu
teams.remove_repo=Smazat
teams.remove_repo=Odstranit
teams.add_nonexistent_repo=Repositář, který se snažíte přidat, neexistuje. Prosím, nejdříve jej vytvořte.
[admin]
@@ -945,7 +958,7 @@ total=Celkem: %d
dashboard.statistic=Statistika
dashboard.operations=Operace
dashboard.system_status=Stav sledování systému
dashboard.statistic_info=Databáze Gogs obsahuje <b>%d</b> uživatelů, <b>%d</b> organizací, <b>%d</b> veřejných klíčů, <b>%d</b> repositářů, <b>%d</b> hlídání, <b>%d</b> oblíbení, <b>%d</b> akcí, <b>%d</b> přístupů, <b>%d</b> úkolů, <b>%d</b> komentářů, <b>%d</b> sociálních účtů, <b>%d</b> sledování, <b>%d</b> zrcadel, <b>%d</b> vydání, <b>%d</b> zdrojů přihlášení, <b>%d</b> webových háčků, <b>%d</b> milníků, <b>%d</b> štítků, <b>%d</b> háčků, <b>%d</b> týmů, <b>%d</b> úkolu změn, <b>%d</b> příloh.
dashboard.statistic_info=Databáze Gogs obsahuje <b>%d</b> uživatelů, <b>%d</b> organizací, <b>%d</b> veřejných klíčů, <b>%d</b> repositářů, <b>%d</b> hlídání, <b>%d</b> oblíbení, <b>%d</b> akcí, <b>%d</b> přístupů, <b>%d</b> úkolů, <b>%d</b> komentářů, <b>%d</b> sociálních účtů, <b>%d</b> sledování, <b>%d</b> zrcadel, <b>%d</b> vydání, <b>%d</b> zdrojů přihlášení, <b>%d</b> webových háčků, <b>%d</b> milníků, <b>%d</b> štítků, <b>%d</b> háčků, <b>%d</b> týmů, <b>%d</b> úkolů změn, <b>%d</b> příloh.
dashboard.operation_name=Název operace
dashboard.operation_switch=Přepnout
dashboard.operation_run=Spustit
@@ -957,12 +970,12 @@ dashboard.delete_repo_archives=Smazat všechny archívy repositářů
dashboard.delete_repo_archives_success=Všechny archívy repositářů byly úspěšně smazány.
dashboard.delete_missing_repos=Smazat všechny záznamy repositářů, které ztratily soubory Gitu
dashboard.delete_missing_repos_success=Všechny repositáře, které ztratily soubory Gity, byly úspěšně smazány.
dashboard.git_gc_repos=Provést úklid nad repositáři
dashboard.git_gc_repos_success=Úklid nad všemi repositáři byl úspěšně proveden.
dashboard.git_gc_repos=Provést úklid GC nad repositáři
dashboard.git_gc_repos_success=Úklid GC nad všemi repositáři byl úspěšně proveden.
dashboard.resync_all_sshkeys=Přepsat soubor '.ssh/authorized_keys' (upozornění: klíče nevzniklé v Gogs budou ztraceny)
dashboard.resync_all_sshkeys_success=Všechny veřejné klíče byly úspěšně přepsány.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.resync_all_hooks=Sesynchronizovat háčky před-získání, změny a po-získání pro všechny repositáře
dashboard.resync_all_hooks_success=Všechny háčky repositáře pro před-získání, změnu a po-získání byly úspěšně sesynchronizovány.
dashboard.reinit_missing_repos=Znovu inicializovat záznamy všech repositářů, které ztratily soubory Gitu
dashboard.reinit_missing_repos_success=Záznamy všech repositářů, které ztratily soubory Gitu, byly znovu úspěšně inicializovány.
@@ -1017,9 +1030,9 @@ users.max_repo_creation_desc=(Nastavte na -1 pro použití výchozího systémov
users.is_activated=Tento účet je aktivován
users.prohibit_login=Tento účet má zakázáno přihlášení
users.is_admin=Tento účet je správce
users.allow_git_hook=Tento účet má právo vytváře háčky Gitu
users.allow_git_hook=Tento účet má právo vytvářet háčky Gitu
users.allow_import_local=Tento účet má právo importovat místní repositáře
users.update_profile=Upravil profil účtu
users.update_profile=Změnit profil účtu
users.delete_account=Smazat tento účet
users.still_own_repo=Tento účet je stále vlastníkem nejméně jednoho repositáře, je potřeba repositář nejdříve smazat nebo předat.
users.still_has_org=Tento účet je členem minimálně jedné organizace, musíte nejdříve dané organizace opustit nebo je smazat.
@@ -1034,17 +1047,17 @@ repos.repo_manage_panel=Panel správy repositářů
repos.owner=Vlastník
repos.name=Název
repos.private=Soukromý
repos.watches=Sledovače
repos.watches=Sledovači
repos.stars=Oblíbení
repos.issues=Úkoly
repos.size=Size
repos.size=Velikost
auths.auth_manage_panel=Panel správy způsobů ověřování
auths.new=Přidat nový zdroj
auths.name=Název
auths.type=Typ
auths.enabled=Povolený
auths.updated=Upravený
auths.updated=Změněné
auths.auth_type=Typ ověření
auths.auth_name=Název ověření
auths.security_protocol=Protokol zabezpečení
@@ -1054,9 +1067,9 @@ auths.port=Port
auths.bind_dn=Připojení DN
auths.bind_password=Heslo připojení
auths.bind_password_helper=Upozornění: Toto heslo je ukládáno nešifrované. Nepoužívejte pro správcovské účty.
auths.user_base=Výchozí bod hledání uživatelů
auths.user_base=Výchozí místo hledání uživatelů
auths.user_dn=DN uživatele
auths.attribute_username=Atribut uživatelského jména
auths.attribute_username=Uživatelské jméno
auths.attribute_username_placeholder=Zanechat prázdné pro použití hodnoty pole uživatelského jména z přihlašovacího formuláře.
auths.attribute_name=Křestní jméno
auths.attribute_surname=Příjmení
@@ -1093,16 +1106,16 @@ config.app_ver=Verze aplikace
config.app_url=URL aplikace
config.domain=Doména
config.offline_mode=Režim off-line
config.disable_router_log=Vypnout log směrovače
config.disable_router_log=Vypnout systémové záznamy směrovače
config.run_user=Účet pro spouštění
config.run_mode=Režim spouštění
config.git_version=Git Version
config.git_version=Verze Gitu
config.static_file_root_path=Kořenový adresář statického souboru
config.log_file_root_path=Kořenový adresář souboru logu
config.log_file_root_path=Kořenový adresář souboru systémových záznamů
config.reverse_auth_user=Uživatel obráceného ověření
config.ssh_config=Nastavení SSH
config.ssh_enabled=Zapnutý
config.ssh_enabled=Povolený
config.ssh_start_builtin_server=Spustit vestavěný server
config.ssh_domain=Doména
config.ssh_port=Port
@@ -1113,15 +1126,15 @@ config.ssh_keygen_path=Cesta ke generátoru klíčů ('ssh-keygen')
config.ssh_minimum_key_size_check=Kontrola minimální velikosti klíčů
config.ssh_minimum_key_sizes=Minimální velikost klíčů
config.repo_config=Repository Configuration
config.repo_config=Nastavení repositáře
config.repo_root_path=Kořenový adresář repositářů
config.script_type=Typ skriptu
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.repo_force_private=Vynutit soukromé
config.max_creation_limit=Maximální lhůta pro vytvoření
config.preferred_licenses=Upřednostňované licence
config.disable_http_git=Vypnout HTTP Git
config.enable_local_path_migration=Povolit migraci z místní cesty
config.commits_fetch_concurrency=Souběžnost vyzvednutí revizí
config.db_config=Nastavení databáze
config.db_type=Typ
@@ -1150,8 +1163,8 @@ config.deliver_timeout=Časový limit doručení
config.skip_tls_verify=Přeskočit ověření TLS
config.mailer_config=Nastavení odesílání e-mailů
config.mailer_enabled=Zapnutý
config.mailer_disable_helo=Zakázat HELO
config.mailer_enabled=Povolený
config.mailer_disable_helo=Vypnout HELO
config.mailer_name=Název
config.mailer_host=Server
config.mailer_user=Uživatel
@@ -1160,7 +1173,7 @@ config.test_mail_failed=Odeslání testovacího e-mailu na '%s' selhalo: %v
config.test_mail_sent=Zkušební e-mail byl odeslán na '%s'.
config.oauth_config=Nastavení ověření OAuth
config.oauth_enabled=Zapnutý
config.oauth_enabled=Povolený
config.cache_config=Nastavení mezipaměti
config.cache_adapter=Adaptér mezipaměti
@@ -1179,24 +1192,24 @@ config.cookie_life_time=Doba života souboru cookie
config.picture_config=Nastavení ikony uživatele
config.picture_service=Služba ikon uživatelů
config.disable_gravatar=Zakázat službu Gravatar
config.enable_federated_avatar=Povolit jednotné avatary
config.disable_gravatar=Vypnout službu Gravatar
config.enable_federated_avatar=Povolit jednotné ikony uživatelů
config.git_config=Konfigurace Gitu
config.git_disable_diff_highlight=Zakázat zvýraznění syntaxe v rozdílovém zobrazení
config.git_max_diff_lines=Maximální počet rozdílových řádků jednoho souboru
config.git_max_diff_line_characters=Maximální počet zobrazených rozdílových znaků
config.git_max_diff_files=Maximální počet zobrazených rozdílových souborů
config.git_disable_diff_highlight=Vypnout zvýraznění syntaxe v rozdílovém zobrazení
config.git_max_diff_lines=Maximální počet rozdílných řádků jednoho souboru
config.git_max_diff_line_characters=Maximální počet zobrazených rozdílných znaků jedné řádky
config.git_max_diff_files=Maximální počet zobrazených rozdílných souborů
config.git_gc_args=Parametry GC
config.git_migrate_timeout=Časový limit migrace
config.git_migrate_timeout=Časová lhůta přenesení
config.git_mirror_timeout=Časový limit aktualizace zrcadla
config.git_clone_timeout=Časový limit operace naklonování
config.git_pull_timeout=Časový limit operace stažení
config.git_gc_timeout=Časový limit operace GC
config.log_config=Nastavení logů
config.log_mode=Mode
config.log_options=Options
config.log_config=Nastavení systémových záznamů
config.log_mode=Režim
config.log_options=Možnosti
monitor.cron=Naplánované úlohy
monitor.name=Název
@@ -1214,7 +1227,7 @@ notices.view_detail_header=Zobrazit detail oznámení
notices.actions=Akce
notices.select_all=Vybrat vše
notices.deselect_all=Zrušit výběr všech
notices.inverse_selection=Inverzní výběr
notices.inverse_selection=Převrátit výběr
notices.delete_selected=Smazat vybrané
notices.delete_all=Smazat všechna oznámení
notices.type=Typ
@@ -1225,7 +1238,7 @@ notices.delete_success=Systémová upozornění byla úspěšně smazána.
[action]
create_repo=vytvořil repositář <a href="%s">%s</a>
fork_repo=forked a repository to <a href="%s">%s</a>
fork_repo=rozštěpil repositář do <a href="%s">%s</a>
rename_repo=přejmenoval repositář z <code>%[1]s</code> na <a href="%[2]s">%[3]s</a>
commit_repo=odeslal do <a href="%[1]s/src/%[2]s">%[3]s</a> v <a href="%[1]s">%[4]s</a>
compare_commits=Zobrazit porovnání pro tyto %d revize
@@ -1233,23 +1246,23 @@ transfer_repo=předal repositář <code>%s</code> uživateli/organizaci <a href=
create_issue=`vytvořil úkol <a href="%s/issues/%s">%s#%[2]s</a>`
close_issue=`uzavřel úkol <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_issue=`znovuotevřel úkol <a href="%s/issues/%s">%s#%[2]s</a>`
comment_issue=`přidal komentář k úkolu <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`vytvořil požadavek na stažení <a href="%s/pulls/%s">%s#%[2]s</a>`
close_pull_request=`zavřel požadavek na stažení <a href="%s/pulls/%s">%s#%[2]s</a>`
reopen_pull_request=`znovuotevřel požadavek na stažení <a href="%s/pulls/%s">%s#%[2]s</a>`
merge_pull_request=`sloučil požadavek na stažení <a href="%s/pulls/%s">%s#%[2]s</a>`
create_branch=created new branch <a href="%[1]s/src/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
delete_branch=deleted branch <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
push_tag=nahrál značku <a href="%s/src/%s">%[2]s</a> do <a href="%[1]s">%[3]s</a>
delete_tag=deleted tag <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
comment_issue=`okomentoval úkol <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`vytvořil požadavek na natažení <a href="%s/pulls/%s">%s#%[2]s</a>`
close_pull_request=`zavřel požadavek na natažení <a href="%s/pulls/%s">%s#%[2]s</a>`
reopen_pull_request=`znovuotevřel požadavek na natažení <a href="%s/pulls/%s">%s#%[2]s</a>`
merge_pull_request=`sloučil požadavek na natažení <a href="%s/pulls/%s">%s#%[2]s</a>`
create_branch=vytvořil novou větev <a href="%[1]s/src/%[2]s">%[3]s</a> v <a href="%[1]s">%[4]s</a>
delete_branch=smazal větev <code>%[2]s</code> v <a href="%[1]s">%[3]s</a>
push_tag=odeslal značku <a href="%s/src/%s">%[2]s</a> do <a href="%[1]s">%[3]s</a>
delete_tag=smazána značka <code>%[2]s</code> v <a href="%[1]s">%[3]s</a>
[tool]
ago=před
from_now=od teď
now=nyní
1s=%s 1 sekundou
1m=%s před jednou minutou
1h=%s jednou hodinou
1m=%s 1 minutou
1h=%s 1 hodinou
1d=%s 1 dnem
1w=%s 1 týdnem
1mon=%s 1 měsícem
@@ -1261,12 +1274,12 @@ days=%[2]s %[1]d dny
weeks=%[2]s %[1]d týdny
months=%[2]s %[1]d měsíci
years=%[2]s %[1]d roky
raw_seconds=sekund
raw_minutes=minut
raw_seconds=sekundy
raw_minutes=minuty
[dropzone]
default_message=Přetáhněte soubory sem nebo stiskněte Nahrát.
invalid_input_type=Nelze nahrát soubory tohoto typu.
file_too_big=Velikost souboru ({{filesize}} MB) je vyšší než maximální velikost ({{maxFilesize}} MB).
remove_file=Smazat soubor
remove_file=Odstranit soubor

View File

@@ -82,6 +82,8 @@ app_url=Anwendungs-URL
app_url_helper=Dies hat Auswirkung auf die HTTP/HTTPS Klon-URLs und den Inhalt der E-Mails.
log_root_path=Logdateipfad
log_root_path_helper=Verzeichnis in das Logdateien geschrieben werden.
enable_console_mode=Konsolen-Modus einschalten
enable_console_mode_popup=Zusätzlich zum Datei-Modus, zeige Logs auch in der Konsole.
optional_title=Optionale Einstellungen
email_title=E-Mail-Service Einstellungen
@@ -201,7 +203,7 @@ Content=Inhalt
require_error=` darf nicht leer sein.`
alpha_dash_error=` kann ausschließlich alphanumerische Zeichen und "-_" enthalten.`
alpha_dash_dot_error=` kann ausschließlich alphanumerische Zeichen und ".-_" enthalten.`
alpha_dash_dot_slash_error=` must be valid alpha or numeric or dash(-_) or dot characters or slashes.`
alpha_dash_dot_slash_error=` kann ausschließlich alphanumerische Zeichen und ".-_/" enthalten.`
size_error=` muss die Größe %s haben.`
min_size_error=` muss mindestens %s Zeichen enthalten.`
max_size_error=` darf höchstens %s Zeichen enthalten.`
@@ -256,6 +258,7 @@ ssh_keys=SSH-Schlüssel
social=Soziale Konten
applications=Anwendungen
orgs=Organisationen
repos=Repositories
delete=Konto löschen
uid=Uid
@@ -344,6 +347,11 @@ orgs.none=Sie sind kein Mitglied einer Organisation.
orgs.leave_title=Organisation verlassen
orgs.leave_desc=Sie verlieren den Zugriff auf alle Repositories und Teams nach dem Verlassen der Organisation. Möchten Sie fortfahren?
repos.leave=Verlassen
repos.leave_title=Repository verlassen
repos.leave_desc=Der Zugriff zum Repository wird verloren gehen, nachdem diese verlassen wird. Möchten Sie fortfahren?
repos.leave_success=Sie haben die Repository '%s' erfolgreich verlassen!
delete_account=Konto löschen
delete_prompt=Diese Aktion wird Ihr Konto dauerhaft löschen und kann <strong>NICHT</strong> rückgängig gemacht werden!
confirm_delete_account=Löschvorgang bestätigen
@@ -392,7 +400,7 @@ migrate_type_helper=Dieses Repository wird ein <span class="text blue">Mirror</s
migrate_repo=Repository migrieren
migrate.clone_address=Adresse kopieren
migrate.clone_address_desc=Dies kann eine HTTP/HTTPS/GIT-URL sein.
migrate.clone_address_desc_import_local=Sie dürfen auch eine Repository vom lokalen Serverpfad migrieren.
migrate.clone_address_desc_import_local=Sie dürfen auch ein Repository vom lokalen Serverpfad migrieren.
migrate.permission_denied=Ihnen fehlen die Rechte zum Importieren lokaler Repositories.
migrate.invalid_local_path=Der lokale Pfad ist ungültig, existiert nicht oder ist kein Ordner.
migrate.failed=Fehler bei Migration: %v
@@ -414,7 +422,7 @@ quick_guide=Kurzanleitung
clone_this_repo=Dieses Repository klonen
create_new_repo_command=Erstellen Sie ein neues Repository mittels der Kommandozeile
push_exist_repo=Bestehendes Repository von der Kommandozeile pushen
repo_is_empty=Dieses Repository ist leer. Bitte kommen Sie später wieder!
bare_message=Diese Repository hat noch keinen Inhalt.
files=Dateien
branch=Branch
@@ -436,12 +444,12 @@ file_permalink=Permalink
file_too_large=Diese Datei ist zu groß zum Anzeigen
video_not_supported_in_browser=Ihr Browser unterstützt HTML5 Video-Tags nicht.
branches.overview=Overview
branches.active_branches=Active Branches
branches.stale_branches=Stale Branches
branches.all=All Branches
branches.updated_by=Updated %[1]s by %[2]s
branches.change_default_branch=Change Default Branch
branches.overview=Übersicht
branches.active_branches=Aktive Branches
branches.stale_branches=Alte Branches
branches.all=Alle Branches
branches.updated_by=Aktualisiert %[1]s von %[2]s
branches.change_default_branch=Ändere Standard-Branch
editor.new_file=Neue Datei
editor.upload_file=Datei hochladen
@@ -650,6 +658,7 @@ settings.collaboration.write=Schreibrechte
settings.collaboration.read=Leserechte
settings.collaboration.undefined=Nicht definiert
settings.branches=Branches
settings.branches_bare=Branches leerer Repositories können nicht verwaltet werden. Bitte erst Datei(en) pushen.
settings.default_branch=Standard-Branch
settings.default_branch_desc=Der Standard-Branch gilt als Basis für Commits, Pull-Requests und Online-Bearbeitung.
settings.update=Aktualisieren
@@ -664,7 +673,7 @@ settings.protect_this_branch_desc=Verhindere forcierte Pushes sowie Löschungen.
settings.protect_require_pull_request=Verlange Pull-Request an Stelle von direkten Pushes
settings.protect_require_pull_request_desc=Aktivieren Sie diese Option, um direktes Pushen in diesen Branch zu verhindern. Commits müssen in einen anderen, ungeschützten Branch gepusht werden und dann per Pull-Request in diesen Branch überführt werden.
settings.protect_whitelist_committers=Hinzufügen von Benutzern oder Teams zur Whitelist, die in diesen Branch pushen dürfen
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch. Users in whitelist will bypass require pull request check.
settings.protect_whitelist_committers_desc=Fügt Benutzer oder Teams zur Push-Whitelist dieses Branches hinzu. Auf der Whitelist geführte Benutze können können ohne Prüfung von Pull-Requests pushen.
settings.protect_whitelist_users=Benutzer, die in diesen Branch pushen können
settings.protect_whitelist_search_users=Benutzer suchen
settings.protect_whitelist_teams=Teams, deren Mitglieder in diesen Branch pushen können
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Diese Änderung wirkt sich darauf aus, wie sich
settings.advanced_settings=Erweiterte Einstellungen
settings.wiki_desc=Wiki einschalten
settings.use_internal_wiki=Eingebautes Wiki verwenden
settings.allow_public_wiki_desc=Erlaube öffentlichen Zugang zum Wiki, auch wenn die Repository privat ist.
settings.use_external_wiki=Externes Wiki verwenden
settings.external_wiki_url=Externe Wiki URL
settings.external_wiki_url_desc=Besucher werden auf diese URL umgeleitet, wenn sie auf den Tab klicken.
settings.issues_desc=Issue-Tracker einschalten
settings.use_internal_issue_tracker=Eingebauten Issue-Tracker verwenden
settings.allow_public_issues_desc=Erlaube öffentlichen Zugriff auf Issues, auch wenn die Repository privat ist.
settings.use_external_issue_tracker=Externes Issue-System verwenden
settings.external_tracker_url=URL eines externen Issue Trackers
settings.external_tracker_url_desc=Besucher werden auf diese URL umgeleitet, wenn sie auf den Tab klicken.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook wurde erfolgreich entfernt!
settings.webhook.test_delivery=Senden testen
settings.webhook.test_delivery_desc=Sendet ein simuliertes Push-Ereignis, um die Webhook-Einstellungen zu testen
settings.webhook.test_delivery_success=Test-Webhook wurde zur Auslieferungswarteschlange hinzugefügt. Es kann einige Sekunden dauern, bevor es in der Auslieferungshistorie erscheint.
settings.webhook.redelivery=Erneuter Versand
settings.webhook.redelivery_success=Hook-Task '%s' wurde wieder zur Auslieferungswarteschlange hinzugefügt. Es kann einige Sekunden, bis sich der Auslieferungsstatus in der History aktualisiert hat.
settings.webhook.request=Anfrage
settings.webhook.response=Antwort
settings.webhook.headers=Kopfzeilen
@@ -764,20 +777,20 @@ settings.event_send_everything=Ich brauche <strong>alles</strong>.
settings.event_choose=Lass mich auswählen, was ich brauche.
settings.event_create=Erstellen
settings.event_create_desc=Branch/Tag erstellt
settings.event_delete=Delete
settings.event_delete_desc=Branch or tag deleted
settings.event_delete=Löschen
settings.event_delete_desc=Branch/Tag gelöscht
settings.event_fork=Fork
settings.event_fork_desc=Repository forked
settings.event_fork_desc=Repository geforkt
settings.event_push=Push
settings.event_push_desc=Git push auf ein Repository
settings.event_issues=Issues
settings.event_issues_desc=Issue opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, or demilestoned.
settings.event_issue_comment=Issue Comment
settings.event_issue_comment_desc=Issue comment created, edited, or deleted.
settings.event_issues_desc=Issue geöffnet, geschlossen, wieder geöffnet, bearbeitet, zugewiesen, nicht zugewiesen, Label aktualisiert, Label gelöscht, einem Meilenstein zugewiesen oder davon entfernt.
settings.event_issue_comment=Issue-Kommentar
settings.event_issue_comment_desc=Issue-Kommentar angelegt, geändert oder gelöscht.
settings.event_pull_request=Pull-Request
settings.event_pull_request_desc=Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, demilestoned, or synchronized.
settings.event_pull_request_desc=Pull-Request geöffnet, geschlossen, wieder geöffnet, bearbeitet, zugewiesen, nicht zugewiesen, Label aktualisiert, Label gelöscht, einem Meilenstein zugewiesen, davon entfernt oder synchronisiert.
settings.event_release=Release
settings.event_release_desc=Release published in a repository.
settings.event_release_desc=Release in Repository veröffentlicht.
settings.active=Aktiv
settings.active_helper=Details über das auslösende Ereignis des Webhooks werden ebenfalls mit gesendet
settings.add_hook_success=Webhook hinzugefügt
@@ -1037,7 +1050,7 @@ repos.private=Privat
repos.watches=Beobachtungen
repos.stars=Favoriten
repos.issues=Issues
repos.size=Size
repos.size=Größe
auths.auth_manage_panel=Authentifizierung
auths.new=Neue Quelle hinzufügen
@@ -1195,8 +1208,8 @@ config.git_pull_timeout=Zeitlimit für Pull
config.git_gc_timeout=Zeitlimit für GC
config.log_config=Konfiguration des Loggings
config.log_mode=Mode
config.log_options=Options
config.log_mode=Modus
config.log_options=Optionen
monitor.cron=Cron-Tasks
monitor.name=Name
@@ -1225,7 +1238,7 @@ notices.delete_success=Systemmitteilungen wurden erfolgreich gelöscht.
[action]
create_repo=hat das Repository <a href="%s">%s</a> erstellt
fork_repo=forked a repository to <a href="%s">%s</a>
fork_repo=hat das Repository nach <a href="%s">%s</a> geforkt
rename_repo=hat das Repository von <code>%[1]s</code> zu <a href="%[2]s">%[3]s</a> umbenannt
commit_repo=hat auf <a href="%[1]s/src/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a> gepusht
compare_commits=Zeige Vergleich für diese %d Commits
@@ -1238,10 +1251,10 @@ create_pull_request=`hat Pull-Request <a href="%s/pulls/%s">%s#%[2]s</a> erstell
close_pull_request=`hat Pull-Request <a href="%s/pulls/%s">%s#%[2]s</a> geschlossen`
reopen_pull_request=`hat den Pull-Request <a href="%s/pulls/%s">%s#%[2]s</a> wieder geöffnet`
merge_pull_request=`hat Pull-Request <a href="%s/pulls/%s">%s#%[2]s</a> zuammengeführt`
create_branch=created new branch <a href="%[1]s/src/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
delete_branch=deleted branch <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
create_branch=hat neuen Branch <a href="%[1]s/src/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a> angelegt
delete_branch=hat Branch <code>%[2]s</code> in <a href="%[1]s">%[3]s</a> gelöscht
push_tag=hat Tag <a href="%s/src/%s">%[2]s</a> auf <a href="%[1]s">%[3]s</a> gepusht
delete_tag=deleted tag <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
delete_tag=hat Tag <code>%[2]s</code> in <a href="%[1]s">%[3]s</a> gelöscht
[tool]
ago=vor

View File

@@ -82,6 +82,8 @@ app_url = Application URL
app_url_helper = This affects HTTP/HTTPS clone URL and somewhere in email.
log_root_path = Log Path
log_root_path_helper = Directory to write log files to.
enable_console_mode = Enable Console Mode
enable_console_mode_popup = In addition to file mode, also print logs to console.
optional_title = Optional Settings
email_title = Email Service Settings
@@ -256,6 +258,7 @@ ssh_keys = SSH Keys
social = Social Accounts
applications = Applications
orgs = Organizations
repos = Repositories
delete = Delete Account
uid = Uid
@@ -341,9 +344,14 @@ access_token_deletion_desc = Delete this personal access token will remove all r
delete_token_success = Personal access token has been removed successfully! Don't forget to update your application as well.
orgs.none = You are not a member of any organizations.
orgs.leave_title = Leave an organization
orgs.leave_title = Leave organization
orgs.leave_desc = You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave = Leave
repos.leave_title = Leave repository
repos.leave_desc = You will lose access to the repository after you left. Do you want to continue?
repos.leave_success = You have left repository '%s' successfully!
delete_account = Delete Your Account
delete_prompt = The operation will delete your account permanently, and <strong>CANNOT</strong> be undone!
confirm_delete_account = Confirm Deletion
@@ -414,7 +422,7 @@ quick_guide = Quick Guide
clone_this_repo = Clone this repository
create_new_repo_command = Create a new repository on the command line
push_exist_repo = Push an existing repository from the command line
repo_is_empty = This repository is empty, please come back later!
bare_message = This repository does not have any content yet.
files = Files
branch = Branch
@@ -650,9 +658,11 @@ settings.collaboration.write = Write
settings.collaboration.read = Read
settings.collaboration.undefined = Undefined
settings.branches = Branches
settings.branches_bare = You cannot manage branches for bare repository. Please push some content first.
settings.default_branch = Default Branch
settings.default_branch_desc = The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update = Update
settings.update_default_branch_unsupported = Change default branch is not supported by the Git version on server.
settings.update_default_branch_success = Default branch of this repository has been updated successfully!
settings.protected_branches = Protected Branches
settings.protected_branches_desc = Protect branches from force pushing, accidental deletion and whitelist code committers.
@@ -682,11 +692,13 @@ settings.change_reponame_prompt = This change will affect how links relate to th
settings.advanced_settings = Advanced Settings
settings.wiki_desc = Enable wiki system
settings.use_internal_wiki = Use builtin wiki
settings.allow_public_wiki_desc = Allow public access to wiki when repository is private
settings.use_external_wiki = Use external wiki
settings.external_wiki_url = External Wiki URL
settings.external_wiki_url_desc = Visitors will be redirected to URL when they click on the tab.
settings.issues_desc = Enable issue tracker
settings.use_internal_issue_tracker = Use builtin lightweight issue tracker
settings.allow_public_issues_desc = Allow public access to issues when repository is private
settings.use_external_issue_tracker = Use external issue tracker
settings.external_tracker_url = External Issue Tracker URL
settings.external_tracker_url_desc = Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +752,8 @@ settings.webhook_deletion_success = Webhook has been deleted successfully!
settings.webhook.test_delivery = Test Delivery
settings.webhook.test_delivery_desc = Send a fake push event delivery to test your webhook settings
settings.webhook.test_delivery_success = Test webhook has been added to delivery queue. It may take few seconds before it shows up in the delivery history.
settings.webhook.redelivery = Redelivery
settings.webhook.redelivery_success = Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request = Request
settings.webhook.response = Response
settings.webhook.headers = Headers

View File

@@ -82,6 +82,8 @@ app_url=URL de la aplicación
app_url_helper=Esto afecta a las URLs para clonar por HTTP/HTTPS y a algunos correos electrónicos.
log_root_path=Ruta del registro
log_root_path_helper=Directorio donde almacenar los registros.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Configuración opcional
email_title=Configuración del servicio de correo
@@ -256,6 +258,7 @@ ssh_keys=Claves SSH
social=Redes Sociales
applications=Aplicaciones
orgs=Organizaciones
repos=Repositories
delete=Eliminar cuenta
uid=UUID
@@ -344,6 +347,11 @@ orgs.none=No eres un miembro de ninguna organización.
orgs.leave_title=Salir de una organización
orgs.leave_desc=Perderá el acceso a todos los repositorios y equipos después dejar la organización. ¿Desea continuar?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Elimina tu cuenta
delete_prompt=La operación eliminará tu cuenta de forma permanente y ¡<strong>NO</strong> se puede deshacer!
confirm_delete_account=Confirmar Eliminación
@@ -414,7 +422,7 @@ quick_guide=Guía Rápida
clone_this_repo=Clonar este repositorio
create_new_repo_command=Crear un nuevo repositorio desde línea de comandos
push_exist_repo=Hacer Push de un repositorio existente desde línea de comandos
repo_is_empty=Este repositorio está vacío, por favor, ¡vuelva más tarde!
bare_message=This repository does not have any content yet.
files=Archivos
branch=Rama
@@ -650,6 +658,7 @@ settings.collaboration.write=Escritura
settings.collaboration.read=Lectura
settings.collaboration.undefined=Indefinido
settings.branches=Ramas
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Rama predeterminada
settings.default_branch_desc=Se considera la rama «base» como la rama por defecto para commits de código, las solicitudes pull y edición en línea.
settings.update=Actualizar
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Este cambio afectará a los enlaces al repositor
settings.advanced_settings=Ajustes avanzados
settings.wiki_desc=Activar sistema de wiki
settings.use_internal_wiki=Usar wiki integrada
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Usar Wiki externa
settings.external_wiki_url=URL externa de la Wiki
settings.external_wiki_url_desc=Los visitantes serán redireccionados a la URL cuando hagan click en la barra.
settings.issues_desc=Habilitar rastreo de incidencias
settings.use_internal_issue_tracker=Usar rastreo de incidencias ligero incluido
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Usar tracker externo de incidencias
settings.external_tracker_url=URL de seguimiento de problemas externos
settings.external_tracker_url_desc=Los visitantes serán redirigidos a la URL cuando hagan click en la barra.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=¡Webhook eliminado con éxito!
settings.webhook.test_delivery=Test de entrega
settings.webhook.test_delivery_desc=Enviar un falso evento Push de entrega para probar tus ajustes de webhook
settings.webhook.test_delivery_success=Probar que los webhook han sido añadidos a la cola de entrega. Esto puede tomar algunos segundos antes de aparecer en el historial de entregas.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Petición
settings.webhook.response=Respuesta
settings.webhook.headers=Encabezado

View File

@@ -64,7 +64,7 @@ no_admin_and_disable_registration=Et voi poistaa käytöstä rekisteröintiä lu
err_empty_admin_password=Ylläpito salasana ei voi olla tyhjä.
general_title=Sovellus yleiset asetukset
app_name=Sovellus nimi
app_name=Sovelluksen nimi
app_name_helper=Laita organisaatiosi nimi tähän isolla ja kovaäänisesti!
repo_path=Repon juuren polku
repo_path_helper=Kaikki Git etä repot tullaan tallentamaan tähän hakemistoon.
@@ -82,6 +82,8 @@ app_url=Sovellus URL
app_url_helper=Tämä vaikuttaa HTTP/HTTPS klooni URLeihin ja joihinkin sähköposteihin.
log_root_path=Lokin polku
log_root_path_helper=Lokien tallennushakemisto.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Valinnaiset asetukset
email_title=Sähköposti palvelu asetukset
@@ -256,6 +258,7 @@ ssh_keys=SSH avaimet
social=Sosiaaliset tilit
applications=Sovellukset
orgs=Organisaatiot
repos=Repositories
delete=Poista tili
uid=Käyttäjä ID
@@ -344,6 +347,11 @@ orgs.none=Et ole yhdenkään organisaation jäsen.
orgs.leave_title=Poistu organisaatiosta
orgs.leave_desc=Menetät oikeudet kaikkiin niihin repoihin ja tiimeihin joihin organisaatio on sinulle oikeudet antanut. Haluatko varmasti jatkaa?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Poista tilisi
delete_prompt=Toiminto poistaa tilisi pysyvästi ja tätä <strong>EI VOI</strong> peruuttaa myöhemmin!
confirm_delete_account=Varmista poisto
@@ -414,7 +422,7 @@ quick_guide=Pikaopas
clone_this_repo=Kloonaa tämä repo
create_new_repo_command=Luo uusi repo komentoriviltä
push_exist_repo=Työnnä olemassaoleva repo komentoriviltä
repo_is_empty=Tämä repo on tyhjä, ole hyvä ja tule takaisin myöhemmin!
bare_message=This repository does not have any content yet.
files=Tiedostot
branch=Branch
@@ -650,6 +658,7 @@ settings.collaboration.write=Kirjoita
settings.collaboration.read=Lue
settings.collaboration.undefined=Määrittelemätön
settings.branches=Haarat
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Oletushaara
settings.default_branch_desc=Oletushaaraa käytetään "pohjahaarana" commiteille, pull-pyynnöille ja sivustolla toteutetuille muokkauksille.
settings.update=Päivitä
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Tämä muutos vaikuttaa siihen miten linkit liit
settings.advanced_settings=Lisäasetukset
settings.wiki_desc=Ota wiki käyttöön
settings.use_internal_wiki=Käytä sisäänrakennettua wikiä
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Käytä ulkoista wikiä
settings.external_wiki_url=Ulkoinen Wiki URL
settings.external_wiki_url_desc=Vierailijat uudelleenohjataan URL-osoitteeseen kun he klikkaavat välilehteä.
settings.issues_desc=Ota virheenseuranta käyttöön
settings.use_internal_issue_tracker=Käytä sisäänrakennettua kevyttä virheenseurantaa
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Käytä ulkoista vikaseurantaa
settings.external_tracker_url=Ulkoisen virheenseurannan URL
settings.external_tracker_url_desc=Vierailijat ohjataan URL-osoitteeseen kun he klikkaavat välilehteä.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webkoukku on poistettu onnistuneesti!
settings.webhook.test_delivery=Testitoimitus
settings.webhook.test_delivery_desc=Lähetä väärennetty push toimitusjakelu testataksesi webkoukku asetuksia
settings.webhook.test_delivery_success=Testi webkoukku on lisätty toimitusjonoon. Muutama sekunti voi mennä ennenkuin se näkyy toimitushistoriassa.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Pyyntö
settings.webhook.response=Vastaus
settings.webhook.headers=Otsikot

View File

@@ -82,6 +82,8 @@ app_url=URL de l'application
app_url_helper=Cela affecte les doublons d'URL HTTP/HTTPS et le contenu d'e-mail.
log_root_path=Chemin des fichiers log
log_root_path_helper=Répertoire d'écriture des fichiers de log.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Paramètres facultatifs
email_title=Paramètres du service de messagerie
@@ -256,6 +258,7 @@ ssh_keys=Clés SSH
social=Réseaux Sociaux
applications=Applications
orgs=Organisations
repos=Repositories
delete=Supprimer le compte
uid=ID d'Utilisateur
@@ -344,6 +347,11 @@ orgs.none=Vous n'êtes membre d'aucune organisation.
orgs.leave_title=Quitter une organisation
orgs.leave_desc=Vous perdrez accès à tous les dépôts et équipes après que vous ayez quitté l'organisation. Voulez-vous continuer ?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Supprimer votre compte
delete_prompt=Votre compte sera définitivement supprimé et cette opération est <strong>irréversible</strong> !
confirm_delete_account=Confirmer la suppression
@@ -414,7 +422,7 @@ quick_guide=Introduction rapide
clone_this_repo=Cloner ce dépôt
create_new_repo_command=Créer un nouveau dépôt en ligne de commande
push_exist_repo=Soumettre un dépôt existant par ligne de commande
repo_is_empty=Ce dépôt est vide, veuillez revenir plus tard !
bare_message=This repository does not have any content yet.
files=Fichiers
branch=Branche
@@ -437,11 +445,11 @@ file_too_large=Ce fichier est trop gros pour être afficher
video_not_supported_in_browser=Votre navigateur ne supporte pas la balise video HTML5.
branches.overview=Overview
branches.active_branches=Active Branches
branches.active_branches=Branches Actives
branches.stale_branches=Stale Branches
branches.all=All Branches
branches.all=Toutes les Branches
branches.updated_by=Updated %[1]s by %[2]s
branches.change_default_branch=Change Default Branch
branches.change_default_branch=Changer la Branche par Défaut
editor.new_file=Nouveau fichier
editor.upload_file=Téléverser un fichier
@@ -650,6 +658,7 @@ settings.collaboration.write=Écrire
settings.collaboration.read=Lire
settings.collaboration.undefined=Indéfini
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Branche par défaut
settings.default_branch_desc=La branche par défaut est considérée comme la branche « originale » pour les commits de code, les requêtes de fusion et l'édition en ligne.
settings.update=Actualiser
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Ce changement affectera comment les liens sont r
settings.advanced_settings=Paramètres avancés
settings.wiki_desc=Activer le wiki
settings.use_internal_wiki=Utiliser le wiki interne
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Utiliser un wiki externe
settings.external_wiki_url=URL Wiki externe
settings.external_wiki_url_desc=Les visiteurs seront redirigés vers cette URL lorsqu'ils cliqueront sur l'onglet.
settings.issues_desc=Activer le système de tickets
settings.use_internal_issue_tracker=Utiliser le système simplifié de tickets interne
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Utiliser un bug-tracker externe
settings.external_tracker_url=Adresse de l'issue tracker externe
settings.external_tracker_url_desc=Les visiteurs seront redirigés vers cette URL lorsqu'ils cliqueront sur l'onglet.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Le webhook a été supprimé avec succès !
settings.webhook.test_delivery=Tester la version
settings.webhook.test_delivery_desc=Envoyer un faux push pour tester la configuration des webhooks
settings.webhook.test_delivery_success=Le webhook de test a été ajouté à la file d'attente de livraison. L'affichage dans l'historique de livraison peut prendre quelques secondes.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Requête
settings.webhook.response=Réponse
settings.webhook.headers=Entêtes 
@@ -758,19 +771,19 @@ settings.secret_desc=Le secret sera envoyé comme digest de payload SHA256 HMAC
settings.slack_username=Nom d'utilisateur
settings.slack_icon_url=URL de l'icône
settings.slack_color=Couleur
settings.event_desc=Quel évènement ce Webhook doit-il déclencher ?
settings.event_desc=Quand ce webhook doit-il être déclenché ?
settings.event_push_only=Uniquement les <code>push</code> (soumissions).
settings.event_send_everything=J'ai besoin de <strong>tout</strong>.
settings.event_choose=Permettez-moi de choisir ce dont j'ai besoin.
settings.event_create=Créer
settings.event_create_desc=Branche, ou Tag créé
settings.event_delete=Delete
settings.event_delete_desc=Branch or tag deleted
settings.event_delete=Supprimer
settings.event_delete_desc=Branche ou tag supprimé
settings.event_fork=Fork
settings.event_fork_desc=Repository forked
settings.event_push=Push
settings.event_push_desc=Git push vers un dépôt
settings.event_issues=Issues
settings.event_issues=Tickets
settings.event_issues_desc=Issue opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, or demilestoned.
settings.event_issue_comment=Issue Comment
settings.event_issue_comment_desc=Issue comment created, edited, or deleted.

View File

@@ -82,6 +82,8 @@ app_url=URL da aplicación
app_url_helper=Isto afecta ás URLs para clonar por HTTP/HTTPS e a algúns correos electrónicos.
log_root_path=Ruta do rexistro
log_root_path_helper=Directorio onde almacenar os rexistros.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Configuración opcional
email_title=Configuración do servizo de correo
@@ -256,6 +258,7 @@ ssh_keys=Claves SSH
social=Redes sociais
applications=Aplicacións
orgs=Organizacións
repos=Repositories
delete=Eliminar conta
uid=UUID
@@ -344,6 +347,11 @@ orgs.none=Non es membro de nengunha organización.
orgs.leave_title=Deixar unha organización
orgs.leave_desc=Deixarás de ter aceso ao tódolos repositorios e equipos despois de deixar a organización. Desexas abandonala?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Elimina a túa conta
delete_prompt=A operación eliminará a túa conta de forma permanente e <strong>NON</strong> se pode desfacer!
confirm_delete_account=Confirmar eliminación
@@ -414,7 +422,7 @@ quick_guide=Guía rápida
clone_this_repo=Clonar este repositorio
create_new_repo_command=Crear un novo repositorio desde liña de comandos
push_exist_repo=Facer Push dun repositorio existente desde liña de comandos
repo_is_empty=Este repositorio está baleiro, por favor, volva máis tarde!
bare_message=This repository does not have any content yet.
files=Ficheiros
branch=Rama
@@ -650,6 +658,7 @@ settings.collaboration.write=Escritura
settings.collaboration.read=Lectura
settings.collaboration.undefined=Indefinido
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Este cambio afectaralles ás ligazóns ao reposi
settings.advanced_settings=Axustes avanzados
settings.wiki_desc=Activar sistema de wiki
settings.use_internal_wiki=Usar wiki integrada
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Usar Wiki externa
settings.external_wiki_url=URL externa da Wiki
settings.external_wiki_url_desc=Os visitantes serán redireccionados á URL cando preman na barra.
settings.issues_desc=Habilitar rastrexo de incidencias
settings.use_internal_issue_tracker=Usar rastrexo de incidencias lixeiro incluído
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Usar tracker externo de incidencias
settings.external_tracker_url=URL de seguimento de problemas externos
settings.external_tracker_url_desc=Os visitantes serán redireccionados á URL cando preman na barra.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook eliminado con éxito!
settings.webhook.test_delivery=Test de entrega
settings.webhook.test_delivery_desc=Enviar un falso evento Push de entrega para probar os teus axustes de webhook
settings.webhook.test_delivery_success=Probar que os webhook foron engadidos á cola de entrega. Isto pode levar algúns segundos antes de aparecer no historial de entregas.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Petición
settings.webhook.response=Resposta
settings.webhook.headers=Encabezado

View File

@@ -75,13 +75,15 @@ domain_helper=Questo influisce sugli URL per il clonaggio via SSH.
ssh_port=Porta SSH
ssh_port_helper=Numero di porta utilizzato dal server SSH, lasciare vuoto per disabilitare l'integrazione SSH.
use_builtin_ssh_server=Usa il server SSH integrato
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
use_builtin_ssh_server_popup=Avvia il server SSH integrato per le operazioni Git per distinguerle dal demone SSH di sistema.
http_port=Porta HTTP
http_port_helper=Porta di ascolto dell'applicazione.
app_url=URL Applicazione
app_url_helper=Questo influisce sugli URL per il clonaggio via HTTP/HTTPS e da qualche parte nella posta elettronica.
log_root_path=Percorso dei log
log_root_path_helper=Directory in cui scrivere i file di log.
enable_console_mode=Abilita modalità Terminale
enable_console_mode_popup=In aggiunta alla modalità file, invia i log anche al terminale.
optional_title=Impostazioni Facoltative
email_title=Impostazioni E-mail
@@ -256,6 +258,7 @@ ssh_keys=Chiavi SSH
social=Account Sociali
applications=Applicazioni
orgs=Organizzazioni
repos=Repositories
delete=Elimina account
uid=Uid
@@ -344,6 +347,11 @@ orgs.none=Non sei membro di alcuna organizzazione.
orgs.leave_title=Abbandona una organizzazione
orgs.leave_desc=Abbandonando l'organizzazione perderai l'accesso a tutti i repository e i gruppi. Confermi?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Elimina Account
delete_prompt=L'operazione eliminerà permanentemente l'account e <strong>NON POTRÀ</strong> essere annullata!
confirm_delete_account=Conferma Eliminazione
@@ -414,7 +422,7 @@ quick_guide=Guida rapida
clone_this_repo=Clona questo repository
create_new_repo_command=Crea nuovo repository da riga di comando
push_exist_repo=Push un repo esistente dalla riga di comando
repo_is_empty=Questo repository è vuoto, si prega di tornare più tardi!
bare_message=This repository does not have any content yet.
files=File
branch=Ramo (Branch)
@@ -650,6 +658,7 @@ settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Questa modifica influirà i link al repository.
settings.advanced_settings=Opzioni avanzate
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Usa Wiki esterno
settings.external_wiki_url=URL Wiki esterno
settings.external_wiki_url_desc=I visitatori verranno reindirizzati all'URL quando cliccano sulla scheda.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Utilizza gestore di problemi esterno
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Il Webhook è stato eliminato con successo!
settings.webhook.test_delivery=Test di consegna
settings.webhook.test_delivery_desc=Send a fake push event delivery to test your webhook settings
settings.webhook.test_delivery_success=Test webhook has been added to delivery queue. It may take few seconds before it shows up in the delivery history.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Richiesta
settings.webhook.response=Risposta
settings.webhook.headers=Headers

View File

@@ -82,6 +82,8 @@ app_url=アプリケーションの URL
app_url_helper=この設定は、HTTP / HTTPSのクローンURLおよび、一部のメールボックスへのリンクに影響を与えます。
log_root_path=ログのパス
log_root_path_helper=ログファイルを書き込むディレクトリ。
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=オプション設定
email_title=メールサービス設定
@@ -256,6 +258,7 @@ ssh_keys=SSH キー
social=SNSアカウント
applications=アプリケーション
orgs=組織
repos=Repositories
delete=アカウントを削除
uid=Uid
@@ -341,9 +344,14 @@ access_token_deletion_desc=パーソナルアクセストークンを削除す
delete_token_success=パーソナルアクセストークンは正常に削除されました!同時にあなたのアプリケーションを更新することを忘れないでください。
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_title=Leave organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=アカウントを削除
delete_prompt=この操作をするとアカウントが完全に削除され、<strong>二度と元に戻すことができなくなります</strong>
confirm_delete_account=削除の確認
@@ -414,7 +422,7 @@ quick_guide=クイック ガイド
clone_this_repo=このリポジトリのクローンを作成
create_new_repo_command=コマンドラインで新しいリポジトリを作成します。
push_exist_repo=コマンド ・ ラインから既存のリポジトリをプッシュ
repo_is_empty=このリポジトリは空です、後で戻って来て下さい!
bare_message=This repository does not have any content yet.
files=Files
branch=ブランチ
@@ -650,6 +658,7 @@ settings.collaboration.write=書込
settings.collaboration.read=読込
settings.collaboration.undefined=Undefined
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=この変更はリンクがリポジトリに関
settings.advanced_settings=拡張設定
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=外部 wiki を使用します。
settings.external_wiki_url=外部 Wiki の URL
settings.external_wiki_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=外部課題トラッキングシステムを使用
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook が正常に削除されました。
settings.webhook.test_delivery=テスト配信
settings.webhook.test_delivery_desc=Send a fake push event delivery to test your webhook settings
settings.webhook.test_delivery_success=Test webhook has been added to delivery queue. It may take few seconds before it shows up in the delivery history.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=リクエスト
settings.webhook.response=レスポンス
settings.webhook.headers=ヘッダ
@@ -795,7 +808,7 @@ settings.deploy_keys=デプロイキー
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=デプロイキーを追加
settings.deploy_key_desc=個人アカウントのSSHキーとは異なり、デプロイキーは読み取り専用アクセスとなります。
settings.no_deploy_keys=プロキーは1つも追加されていません。
settings.no_deploy_keys=プロキーは1つも追加されていません。
settings.title=タイトル
settings.deploy_key_content=コンテント
settings.key_been_used=デプロイキーが使用されています。

View File

@@ -82,6 +82,8 @@ app_url=애플리케이션 URL
app_url_helper=이 작업은 HTTP/HTTPS 클론 URL과 이메일의 어딘가에 영향을 미칩니다.
log_root_path=로그 경로
log_root_path_helper=로그 파일을 쓸 디렉터리.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=추가설정
email_title=이메일 서비스 설정
@@ -256,6 +258,7 @@ ssh_keys=SSH 키
social=소셜 계정
applications=애플리케이션
orgs=조직
repos=Repositories
delete=계정 삭제
uid=Uid
@@ -344,6 +347,11 @@ orgs.none=당신은 어떤 조직의 구성원도 아닙니다.
orgs.leave_title=조직 떠나기
orgs.leave_desc=조직을 떠난 후에는 모든 리포지토리와 팀에 액세스 할 수 없게 됩니다. 계속 하시겠습니까?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=계정 삭제
delete_prompt=당신의 계정을 삭제합니다. 완료된 후에는 <strong>취소할 수 없습니다</strong>.
confirm_delete_account=삭제 승인
@@ -414,7 +422,7 @@ quick_guide=퀵 가이드
clone_this_repo=이 저장소 복제
create_new_repo_command=커맨드 라인에서 새 저장소 만들기
push_exist_repo=커맨드 라인에서 기존 저장소 푸시하기
repo_is_empty=이 저장소는 비어 있습니다. 나중에 다시 와주세요!
bare_message=This repository does not have any content yet.
files=파일
branch=브렌치
@@ -651,6 +659,7 @@ settings.collaboration.write=쓰기
settings.collaboration.read=읽기
settings.collaboration.undefined=미정의
settings.branches=브랜치
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=기본 브랜치
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=업데이트
@@ -683,11 +692,13 @@ settings.change_reponame_prompt=이 변경은 이 저장소와 연관된 링크
settings.advanced_settings=고급 설정
settings.wiki_desc=위키 시스템 활성화
settings.use_internal_wiki=내장 위키 사용
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=외부 위키 사용하기
settings.external_wiki_url=외부 위키 URL
settings.external_wiki_url_desc=탭을 클릭하면 URL로 리다이렉트됩니다.
settings.issues_desc=이슈 추적기를 사용하도록 설정
settings.use_internal_issue_tracker=내장된 경량 이슈 트레커를 사용
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=외부 이슈 트래커 사용하기
settings.external_tracker_url=외부 이슈 트래커 URL
settings.external_tracker_url_desc=방문자는 탭을 클릭하면 URL로 리다이렉트 됩니다.
@@ -741,6 +752,8 @@ settings.webhook_deletion_success=Webhook을 성공적으로 삭제했습니다!
settings.webhook.test_delivery=전달 시험
settings.webhook.test_delivery_desc=가짜 푸시 이벤트 전달하여 웹훅 설정을 테스트합니다.
settings.webhook.test_delivery_success=Webhook 테스트가 delivery 큐에 추가되었습니다. delivery 기록에서 나오기까지 몇 초의 시간이 걸릴 것입니다.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=요청
settings.webhook.response=응답
settings.webhook.headers=제목

View File

@@ -82,6 +82,8 @@ app_url=Lietotnes URL
app_url_helper=Tas ietekmē HTTP/HTTPS klonēšanas URL un e-pasta saturā izsūtītās saites.
log_root_path=Žurnalizēšanas direktorija
log_root_path_helper=Direktorija, kurā tiks glabāti žurnāla faili.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Neobligātie iestatījumi
email_title=E-pasta pakalpojuma iestatījumi
@@ -256,6 +258,7 @@ ssh_keys=SSH atslēgas
social=Sociālie konti
applications=Lietotnes
orgs=Organizācijas
repos=Repositories
delete=Dzēst kontu
uid=Lietotāja ID
@@ -341,9 +344,14 @@ access_token_deletion_desc=Dzēšot personīgo piekļuves talonu, tiks liegta pi
delete_token_success=Personīgās piekļuves talons veiksmīgi izdzēsts! Neaizmirstiet nomainīt uz citu aplikācijās, kas to izmantoja.
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_title=Leave organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Dzēst savu kontu
delete_prompt=Šī darbība pilnībā izdzēsīs Jūsu kontu, kā arī tā ir <strong>NEATGRIEZENISKA</strong>!
confirm_delete_account=Apstiprināt dzēšanu
@@ -414,7 +422,7 @@ quick_guide=Īsa pamācība
clone_this_repo=Klonēt šo repozitoriju
create_new_repo_command=Izveidot jaunu repozitoriju komandrindā
push_exist_repo=Nosūtīt izmaiņas no komandrindas eksistējošam repozitorijam
repo_is_empty=Šis repozitorijs ir tukšs, apskatiet atkal vēlāk!
bare_message=This repository does not have any content yet.
files=Files
branch=Atzars
@@ -650,6 +658,7 @@ settings.collaboration.write=Rakstīšanas
settings.collaboration.read=Skatīšanās
settings.collaboration.undefined=Nedefinētas
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Šī izmaiņa ietekmēs saites, kas ir saistīta
settings.advanced_settings=Papildu iestatījumi
settings.wiki_desc=Iespējot vikivietnes
settings.use_internal_wiki=Izmantot iebūvēto vikivietni
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Izmantot ārējo vikivietni
settings.external_wiki_url=Ārējās Vikivietnes adrese
settings.external_wiki_url_desc=Apmeklētāji tiks novirzīti uz adresi, kad viņi uzklikšķinās uz cilnes.
settings.issues_desc=Iespējot problēmu sekotāju
settings.use_internal_issue_tracker=Izmantot iebūvētu vieglu problēmu sekotāju
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Izmantot ārējo problēmu sekotāju
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Tīmekļa āķis tika veiksmīgi izdzēsts!
settings.webhook.test_delivery=Testa piegāde
settings.webhook.test_delivery_desc=Veikt viltus push-notikuma piegādi lai notestētu Jūsu tīmekļa āķa iestatījumus
settings.webhook.test_delivery_success=Testa web-āķis ir pievienots piegādes rindai. Var paiet dažas sekundes, kamēr tas parādīsies piegāžu vēsturē.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Pieprasījums
settings.webhook.response=Atbilde
settings.webhook.headers=Galvenes

View File

@@ -82,6 +82,8 @@ app_url=Applicatie URL
app_url_helper=Dit heeft invloed op de HTTP/HTTPS kloon urls en de urls die in de email worden gebruikt
log_root_path=Log-pad
log_root_path_helper=Directory waar logbestanden opgeslagen worden.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Optionele instellingen
email_title=E-mail service instellingen
@@ -256,6 +258,7 @@ ssh_keys=SSH-sleutels
social=Sociale netwerk-accounts
applications=Toepassingen
orgs=Organisaties
repos=Repositories
delete=Verwijder account
uid=uid
@@ -344,6 +347,11 @@ orgs.none=U bent geen lid van een organisatie.
orgs.leave_title=Een organisatie verlaten
orgs.leave_desc=U verliest toegang tot alle repositories en teams nadat u de organisatie verlaten hebt. Wilt u doorgaan?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Verwijder uw account
delete_prompt=Deze handeling zal uw account definitief verwijderen, u kunt dit <strong> NIET </strong> terug draaien!
confirm_delete_account=Bevestig verwijdering
@@ -414,7 +422,7 @@ quick_guide=Snelstart gids
clone_this_repo=Kloon deze repositorie
create_new_repo_command=Maak een nieuwe repositorie aan vanaf de console
push_exist_repo=Push een bestaande repositorie vanaf de console
repo_is_empty=Deze repositories is leeg is, probeer het later opnieuw!
bare_message=This repository does not have any content yet.
files=Bestanden
branch=Aftakking
@@ -650,6 +658,7 @@ settings.collaboration.write=Schrijven
settings.collaboration.read=Lezen
settings.collaboration.undefined=Niet gedefinieerd
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Deze verandering zal gevolgen hebben voor hoe li
settings.advanced_settings=Geavanceerde opties
settings.wiki_desc=Wiki-systeem inschakelen
settings.use_internal_wiki=Ingebouwde wiki gebruiken
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Externe wiki gebruiken
settings.external_wiki_url=Externe wiki-URL
settings.external_wiki_url_desc=Bezoekers worden doorgestuurd naar de URL als ze op het tabblad klikken.
settings.issues_desc=Kwestietracker inschakelen
settings.use_internal_issue_tracker=Gebruik ingebouwde eenvoudige kwestietracker
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Externe issuetracker gebruiken
settings.external_tracker_url=URL externe kwestietracker
settings.external_tracker_url_desc=Bezoekers worden doorgestuurd naar de URL als ze op het tabblad klikken.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook is succesvol verwijderd!
settings.webhook.test_delivery=Test-bezorging
settings.webhook.test_delivery_desc=Stuur een nep push bericht om de webhook te testen
settings.webhook.test_delivery_success=De test webhook is toegevoegd aan de wachtrij. Het kan enkele seconden duren voor deze in de geschiedenis wordt weergegeven.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Verzoek
settings.webhook.response=Antwoord
settings.webhook.headers=Headers

View File

@@ -82,6 +82,8 @@ app_url=Adres URL aplikacji
app_url_helper=To wpłynie na adresy klonowania HTTP/HTTPS i w wiadomościach e-mail.
log_root_path=Ścieżka dla logów
log_root_path_helper=Katalog do zapisu logów.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Ustawienia opcjonalne
email_title=Ustawienia serwera e-mail
@@ -256,6 +258,7 @@ ssh_keys=Klucze SSH
social=Konta społecznościowe
applications=Aplikacje
orgs=Organizacje
repos=Repositories
delete=Usuń konto
uid=UID
@@ -341,9 +344,14 @@ access_token_deletion_desc=Usunięcie tego tokena osobistego dostęp spowoduje u
delete_token_success=Osobisty token dostępu został usunięty pomyślnie! Nie zapomnij również zaktualizować swoich aplikacji.
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_title=Leave organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Usuń swoje konto
delete_prompt=Ta operacja trwale usunie Twoje konto i <strong>NIE MOŻE</strong> zostać cofnięta!
confirm_delete_account=Potwierdź usunięcie
@@ -414,7 +422,7 @@ quick_guide=Skrócona instrukcja
clone_this_repo=Klonuj repozytorium
create_new_repo_command=Utwórz nowe repozytorium z wiersza poleceń
push_exist_repo=Prześlij istniejące repozytorium z wiersza poleceń
repo_is_empty=To repozytorium jest puste, proszę wrócić później!
bare_message=This repository does not have any content yet.
files=Files
branch=Gałąź
@@ -650,6 +658,7 @@ settings.collaboration.write=Zapis
settings.collaboration.read=Odczyt
settings.collaboration.undefined=Niezdefiniowany
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Zmiana nazwy repozytorium wpłynie na linki do n
settings.advanced_settings=Ustawienia zaawansowane
settings.wiki_desc=Włącz system wiki
settings.use_internal_wiki=Użyj wbudowanego wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Użyj zewnętrznego Wiki
settings.external_wiki_url=Adres URL zewnętrznego Wiki
settings.external_wiki_url_desc=Odwiedzający zostaną przekierowani do adresu URL po kliknięciu zakładki.
settings.issues_desc=Włącz system zgłaszania problemów
settings.use_internal_issue_tracker=Użyj wbudowany lekki system zgłaszania problemów
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Użyj zewnętrznego systemu zgłaszania problemów
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook został pomyślnie usunięty!
settings.webhook.test_delivery=Testuj dostawę
settings.webhook.test_delivery_desc=Wyślij fałszywe zdarzenie push aby przetestować ustawienie webhooka
settings.webhook.test_delivery_success=Testowy webhook został dodany do kolejki dostawy. To może zająć kilka sekund, zanim to pojawia się w historii dostawy.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Żądanie
settings.webhook.response=Odpowiedź
settings.webhook.headers=Nagłówki

View File

@@ -82,6 +82,8 @@ app_url=URL do aplicativo
app_url_helper=Isto afeta a URL de clone via HTTP/HTTPs e também o e-mail.
log_root_path=Caminho do log
log_root_path_helper=Pasta dos arquivos de log.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Configurações opcionais
email_title=Configurações do serviço de e-mail
@@ -256,6 +258,7 @@ ssh_keys=Chaves SSH
social=Contas sociais
applications=Aplicativos
orgs=Organizações
repos=Repositories
delete=Deletar conta
uid=Uid
@@ -344,6 +347,11 @@ orgs.none=Você não é participante de nenhuma organização.
orgs.leave_title=Deixar uma organização
orgs.leave_desc=Você perderá acesso a todos os repositórios e equipes após deixar a organização. Deseja continuar?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Deletar sua conta
delete_prompt=A operação deletará sua conta permanentemente, e <strong>NÃO PODERÁ</strong> ser desfeita!
confirm_delete_account=Confirmar exclusão
@@ -414,7 +422,7 @@ quick_guide=Guia rápido
clone_this_repo=Clonar este repositório
create_new_repo_command=Criar um novo repositório na linha de comando
push_exist_repo=Push um repositório existente na linha de comando
repo_is_empty=Este repositório está vazio, por favor volte mais tarde!
bare_message=This repository does not have any content yet.
files=Arquivos
branch=Branch
@@ -650,6 +658,7 @@ settings.collaboration.write=Escrita
settings.collaboration.read=Leitura
settings.collaboration.undefined=Indefinido
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Esta mudança irá afetar os links para este rep
settings.advanced_settings=Configurações avançadas
settings.wiki_desc=Habilitar sistema de wiki
settings.use_internal_wiki=Usar wiki nativa
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Usar wiki externa
settings.external_wiki_url=URL externa da wiki
settings.external_wiki_url_desc=Os visitantes serão redirecionados para a URL ao clicar na aba.
settings.issues_desc=Habilitar issue tracker
settings.use_internal_issue_tracker=Usar o issue tracker nativo
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Usar issue tracker externo
settings.external_tracker_url=URL do Issue Tracker Externo
settings.external_tracker_url_desc=Visitantes serão redirecionados ao URL quando clicarem na aba.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook deletado com sucesso!
settings.webhook.test_delivery=Entrega de teste
settings.webhook.test_delivery_desc=Enviar uma entrega de evento de Push falso para testar suas configurações de webhook
settings.webhook.test_delivery_success=O Webhook de teste foi adicionado para a fila de entrega. Pode demorar alguns segundos antes de ser exibido no histórico de entrega.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Solicitação
settings.webhook.response=Resposta
settings.webhook.headers=Cabeçalhos

View File

@@ -82,6 +82,8 @@ app_url=URL приложения
app_url_helper=Этот параметр влияет на URL для клонирования по HTTP/HTTPS и на адреса в электронной почте.
log_root_path=Путь к журналу
log_root_path_helper=Каталог для записи файлов журнала.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Расширенные настройки
email_title=Настройки службы электронной почты
@@ -256,6 +258,7 @@ ssh_keys=SSH ключи
social=Учетные записи в соцсетях
applications=Приложения
orgs=Организации
repos=Repositories
delete=Удалить аккаунт
uid=UID
@@ -344,6 +347,11 @@ orgs.none=Вы не состоите ни в одной организации.
orgs.leave_title=Покинуть организацию
orgs.leave_desc=Вы потеряете доступ ко всем репозиториям и командам, как только покинете организацию. Вы хотите продолжить?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Удалить свой аккаунт
delete_prompt=Этим действием вы удалите свою учетную запись навсегда и <strong>НЕ СМОЖЕТЕ</strong> ее вернуть!
confirm_delete_account=Подтвердите удаление
@@ -414,7 +422,7 @@ quick_guide=Краткое руководство
clone_this_repo=Клонировать репозиторий
create_new_repo_command=Создать новый репозиторий из командной строки
push_exist_repo=Отправить существующий репозиторий из командной строки
repo_is_empty=Этот репозиторий пуст, пожалуйста, возвращайтесь позже!
bare_message=This repository does not have any content yet.
files=Файлы
branch=Ветка
@@ -427,7 +435,7 @@ pulls=Запросы на слияние
labels=Метки
milestones=Этапы
commits=Коммиты
git_branches=Branches
git_branches=Ветки
releases=Релизы
file_raw=Исходник
file_history=История
@@ -436,10 +444,10 @@ file_permalink=Постоянная ссылка
file_too_large=Этот файл слишком большой, поэтому он не может быть отображен
video_not_supported_in_browser=Ваш браузер не поддерживает HTML5 видео тэг.
branches.overview=Overview
branches.active_branches=Active Branches
branches.stale_branches=Stale Branches
branches.all=All Branches
branches.overview=Обзор
branches.active_branches=Активные ветки
branches.stale_branches=Устаревшие ветки
branches.all=Все ветки
branches.updated_by=Updated %[1]s by %[2]s
branches.change_default_branch=Change Default Branch
@@ -650,6 +658,7 @@ settings.collaboration.write=Запись
settings.collaboration.read=Просмотр
settings.collaboration.undefined=Не определено
settings.branches=Ветки
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Ветка по умолчанию
settings.default_branch_desc=Ветка по-умолчанию считается основной для коммитов, запросов на слияние и онлайн-редактирования.
settings.update=Обновить
@@ -664,7 +673,7 @@ settings.protect_this_branch_desc=Выключить принудительны
settings.protect_require_pull_request=Требовать запрос на слияние вместо прямого push
settings.protect_require_pull_request_desc=Включите этот параметр для запрета прямого push в это ветку. Коммит должен быть запушен в незащищенную ветку и слит в эту ветку через запрос на слияние.
settings.protect_whitelist_committers=Белый список тех, кто может делать push в эту ветку
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch. Users in whitelist will bypass require pull request check.
settings.protect_whitelist_committers_desc=Добавьте людей или команды в белый список для прямого доступа к этой ветке. Пользователи из белого списка будут обходить проверку pull request.
settings.protect_whitelist_users=Пользователи которые могут делать push в эту ветку
settings.protect_whitelist_search_users=Поиск пользователей
settings.protect_whitelist_teams=Команды, члены которых могут делать push в эту ветку
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Это изменение повлияет на
settings.advanced_settings=Расширенные настройки
settings.wiki_desc=Включить систему Wiki
settings.use_internal_wiki=Использовать встроенную wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Использовать внешнюю Wiki
settings.external_wiki_url=URL-адрес внешней Вики
settings.external_wiki_url_desc=Посетители будут перенаправлены на URL-адрес, когда они кликнут по вкладке.
settings.issues_desc=Включить систему отслеживания ошибок
settings.use_internal_issue_tracker=Использовать встроенную легковесную систему отслеживания ошибок
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Использовать внешнюю систему отслеживания ошибок
settings.external_tracker_url=URL внешней системы отслеживания ошибок
settings.external_tracker_url_desc=Посетители будут перенаправлены на URL когда они нажмут на вкладку.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Веб-хук успешно удален!
settings.webhook.test_delivery=Проверить доставку
settings.webhook.test_delivery_desc=Отправить push для тестирования настройки веб-хуков
settings.webhook.test_delivery_success=Тест веб-хука была добавлен в очередь доставки. Это может занять несколько секунд, прежде чем он отобразится в истории доставки.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Запрос
settings.webhook.response=Ответ
settings.webhook.headers=Заголовки
@@ -764,20 +777,20 @@ settings.event_send_everything=Мне нужно <strong>все</strong>.
settings.event_choose=Позвольте мне выбрать то, что нужно.
settings.event_create=Создать
settings.event_create_desc=Ветка или тэг созданы
settings.event_delete=Delete
settings.event_delete_desc=Branch or tag deleted
settings.event_fork=Fork
settings.event_delete=Удалить
settings.event_delete_desc=Ветка или метка удалена
settings.event_fork=Ответвить
settings.event_fork_desc=Repository forked
settings.event_push=Push
settings.event_push_desc=Push в репозиторий
settings.event_issues=Issues
settings.event_issues=Вопросы
settings.event_issues_desc=Issue opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, or demilestoned.
settings.event_issue_comment=Issue Comment
settings.event_issue_comment_desc=Issue comment created, edited, or deleted.
settings.event_pull_request=Запросы на слияние
settings.event_pull_request_desc=Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, demilestoned, or synchronized.
settings.event_release=Release
settings.event_release_desc=Release published in a repository.
settings.event_release=Релиз
settings.event_release_desc=Релиз опубликован в репозитории.
settings.active=Активен
settings.active_helper=Подробности о событии, вызвавшем срабатывание хука, также будут предоставлены.
settings.add_hook_success=Был добавлен новый webhook.
@@ -1037,7 +1050,7 @@ repos.private=Приватный
repos.watches=Следят
repos.stars=В избранном
repos.issues=Задачи
repos.size=Size
repos.size=Размер
auths.auth_manage_panel=Панель управления аутнентификациями
auths.new=Добавить новый источник
@@ -1195,8 +1208,8 @@ config.git_pull_timeout=Время Ожидания Операции Извле
config.git_gc_timeout=Время Ожидания Операции Сборки Мусора
config.log_config=Конфигурация журнала
config.log_mode=Mode
config.log_options=Options
config.log_mode=Режим
config.log_options=Опции
monitor.cron=Задачи cron
monitor.name=Имя

View File

@@ -82,6 +82,8 @@ app_url=URL адреса апликације
app_url_helper=Ова поставка утиче на URL за клонирање преко HTTP/HTTPS протокола и на адресама е-поште.
log_root_path=Пут до журнала
log_root_path_helper=Директоријум где ће бити снимане датотеке журнала.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Напредна подешавања
email_title=Подешавања сервиса е-поште
@@ -256,6 +258,7 @@ ssh_keys=SSH Кључеви
social=Налози на друштвеним мрежама
applications=Апликације
orgs=Организације
repos=Repositories
delete=Уклоните налог
uid=Uid
@@ -341,9 +344,14 @@ access_token_deletion_desc=Уклоњење овог токена ће онем
delete_token_success=Лични токен је успешно избришен! Не заборавите да ажурирате апликацију.
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_title=Leave organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Уклоните ваш налог
delete_prompt=Операција ће трајно избрисати ваш налог, што се <strong>НЕ може</strong> поввратити!
confirm_delete_account=Потврдите брисање
@@ -414,7 +422,7 @@ quick_guide=Кратак водич
clone_this_repo=Клонирај спремиште
create_new_repo_command=Направите ново спремиште са командне линије
push_exist_repo=Push постојећe спремиште са командне линије
repo_is_empty=Овo спремиште je празнo, молимо вас, вратите се касније!
bare_message=This repository does not have any content yet.
files=Files
branch=Грана
@@ -650,6 +658,7 @@ settings.collaboration.write=За писање
settings.collaboration.read=Читање
settings.collaboration.undefined=Није дефинисано
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Ова промена ће утицати на
settings.advanced_settings=Напредна подешавања
settings.wiki_desc=Омогући систем вики
settings.use_internal_wiki=Користи уграђен вики
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Користи спољни Вики
settings.external_wiki_url=URL адреса спољног Вики
settings.external_wiki_url_desc=Посетиоци ће бити преусмерени URL адреси након што кликну на картицу.
settings.issues_desc=Омогући систем праћења грешака
settings.use_internal_issue_tracker=Користи уграђен систем праћења грешака
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Користи спољни систем праћења грешака
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook успешно избрисан!
settings.webhook.test_delivery=Провери испоруку
settings.webhook.test_delivery_desc=Пошаљи push за тестирање подешавања webhook
settings.webhook.test_delivery_success=Тест webhook је додат у месту испоруке. Процес може да потраје неколико секунди пре него што ће показати у историји испоруке.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Захтев
settings.webhook.response=Одговор
settings.webhook.headers=Наслови

View File

@@ -82,6 +82,8 @@ app_url=Applikationsadressen
app_url_helper=Detta påverkar HTTP/HTTPS kloningsadressen och på platser i e-post.
log_root_path=Loggsökväg
log_root_path_helper=Katalog till vilken loggfiler skrivs.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=Övriga inställningar
email_title=E-post tjänstens inställningar
@@ -256,6 +258,7 @@ ssh_keys=SSH-nycklar
social=Sociala konton
applications=Applikationer
orgs=Organisationer
repos=Repositories
delete=Radera konto
uid=Uid
@@ -344,6 +347,11 @@ orgs.none=Du är inte en medlem i någon organisation.
orgs.leave_title=Lämna en organisation
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Radera ditt konto
delete_prompt=Åtgärden kommer at ta bort ditt konto permanent, och kan <strong>INTE</strong> ångras!
confirm_delete_account=Bekräfta Borttagelsen
@@ -414,7 +422,7 @@ quick_guide=Snabbguide
clone_this_repo=Klona detta repo
create_new_repo_command=Skapa ett nytt repo på kommandoraden
push_exist_repo=Knuffa ett existerande repo från kommandoraden
repo_is_empty=Detta repo är tomt, vänligen kom tillbaka senare!
bare_message=This repository does not have any content yet.
files=Filer
branch=Gren
@@ -650,6 +658,7 @@ settings.collaboration.write=Skriva
settings.collaboration.read=Läsa
settings.collaboration.undefined=Odefinierad
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Denna ändring kommer att påverka hur länkar r
settings.advanced_settings=Advancerade Inställningar
settings.wiki_desc=Aktivera wikisystem
settings.use_internal_wiki=Använd inbyggd wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Använd extern wiki
settings.external_wiki_url=Extern Wiki-URL
settings.external_wiki_url_desc=Besökare kommer att bli omdirigerade till denna URL när dom klickar på fliken.
settings.issues_desc=Aktivera ärendehantering
settings.use_internal_issue_tracker=Använd enkel inbyggd ärendehantering
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Använd extern ärendehanterare
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webbhook har tagits bort!
settings.webhook.test_delivery=Testa Leverans
settings.webhook.test_delivery_desc=Skicka en falsk pushhändelse för att testa dina webbhook-inställningar
settings.webhook.test_delivery_success=Testwebbhook har lagts till leveranskön. Det kan ta några sekunder innan den visas i leveranshistoriken.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=Begäran
settings.webhook.response=Svar
settings.webhook.headers=Huvuden

View File

@@ -82,6 +82,8 @@ app_url=Uygulama Bağlantısı
app_url_helper=Bu, HTTP/HTTPS klon bağlantılarını ve e-postadaki bazı kısımları etkiler.
log_root_path=Günlük Dosyaları Yolu
log_root_path_helper=Günlük dosyalarının yazılacağı dizin.
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=İsteğe Bağlı Ayarlar
email_title=E-Posta Servisi Ayarları
@@ -256,6 +258,7 @@ ssh_keys=SSH Anahtarları
social=Sosyal Medya Hesapları
applications=Uygulamalar
orgs=Organizasyonlar
repos=Repositories
delete=Hesabı Sil
uid=Tekil ID
@@ -341,9 +344,14 @@ access_token_deletion_desc=Bu kişisel erişim anahtarını silerseniz uygulaman
delete_token_success=Kişisel erişim anahtarı başarıyla kaldırıldı! Uygulamanızı güncellemeyi de unutmayın!
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_title=Leave organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=Hesabınızı Silin
delete_prompt=Bu işlem hesabınızı kalıcı olarak silecektir ve <strong>GERİ ALINAMAZ</strong>!
confirm_delete_account=Silmeyi Onayla
@@ -414,7 +422,7 @@ quick_guide=Hızlı Başlangıç Kılavuzu
clone_this_repo=Bu depoyu klonla
create_new_repo_command=Komut satırında yeni bir depo oluştur
push_exist_repo=Var olan bir depoyu komut satırında gönder
repo_is_empty=Bu depo boş. Lütfen daha sonra tekrar gelin!
bare_message=This repository does not have any content yet.
files=Files
branch=Dal
@@ -650,6 +658,7 @@ settings.collaboration.write=Yaz
settings.collaboration.read=Oku
settings.collaboration.undefined=Belirsiz
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Bu değişiklik, bağlantıların depoyla olan i
settings.advanced_settings=Gelişmiş Ayarlar
settings.wiki_desc=Viki sıstemini etkinleştir
settings.use_internal_wiki=Use builtin wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=Harici Wiki kullan
settings.external_wiki_url=Harici Wiki bağlantısı
settings.external_wiki_url_desc=Ziyaretçiler, sekmeye tıkladıklarında bağlantıya yönlendirilecektir.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Harici sorun takipçisi kullan
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Web isteği başarıyla silindi!
settings.webhook.test_delivery=Test Dağıtımı
settings.webhook.test_delivery_desc=Web isteği ayarlarınızı test etmek için sahte bir anlık olay gönderin
settings.webhook.test_delivery_success=Test web isteği, dağıtım kuyruğuna eklendi. Bunun dağıtım geçmişinde görünmesi birkaç saniye sürebilir.
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=İstekler
settings.webhook.response=Cevaplar
settings.webhook.headers=Başlıklar

View File

@@ -82,6 +82,8 @@ app_url=Адреса програми
app_url_helper=Це впливає на клонування через HTTP/HTTPS та десь у електроній пошті.
log_root_path=Шлях до лог файлу
log_root_path_helper=Каталог для файлів журналу.
enable_console_mode=Увімкнути консольний режим
enable_console_mode_popup=На додаток до файлового режиму писати логи також і до консолі.
optional_title=Додаткові налаштування
email_title=Параметри електронної пошти
@@ -256,6 +258,7 @@ ssh_keys=Ключі SSH
social=Соціальні акаунти
applications=Додатки
orgs=Організації
repos=Репозиторії
delete=Видалити обліковий запис
uid=Унікальний ідентифікатор користувача
@@ -344,6 +347,11 @@ orgs.none=Ви не є членом будь-якої організації.
orgs.leave_title=Залишити організацію
orgs.leave_desc=Ви втратите доступ до всіх репозиторіїв і команд після того, як ви покинете організацію. Ви хочете продовжити?
repos.leave=Покинути
repos.leave_title=Покинути репозиторій
repos.leave_desc=Ви можете втратити доступ до репозиторію після того як покинете його. Бажаєте продовжити?
repos.leave_success=Ви успішно покинули репозиторій '%s'!
delete_account=Видалити ваш обліковий запис
delete_prompt=Ця операція остаточно видалить обліковий запис, і її <strong>НЕМОЖЛИВО</strong> буде скасувати!
confirm_delete_account=Підтвердження видалення
@@ -414,7 +422,7 @@ quick_guide=Короткий посібник
clone_this_repo=Кнонувати цей репозиторій
create_new_repo_command=Створити новий репозиторій з командного рядка
push_exist_repo=Штовхнути існуючий репозиторій з командного рядка
repo_is_empty=Даний репозиторій пустий, будь ласка, повертайтесь пізніше!
bare_message=Цей репозиторій ще не має жодного вмісту.
files=Файли
branch=Гілка
@@ -650,6 +658,7 @@ settings.collaboration.write=Запис
settings.collaboration.read=Читання
settings.collaboration.undefined=Не визначено
settings.branches=Гілки
settings.branches_bare=Ви не можете керувати гілками у bare-репозиторії. Спочатку додайте у нього якогось вмісту, будь ласка.
settings.default_branch=Гілка за замовчуванням
settings.default_branch_desc=Гілка за замовчанням вважається базовою для комітів, запросів злиття та онлайн редагувань.
settings.update=Оновлення
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=Ця зміна вплине на відноше
settings.advanced_settings=Додаткові налаштування
settings.wiki_desc=Увімкнути wiki-систему
settings.use_internal_wiki=Використовувати вбудовану wiki
settings.allow_public_wiki_desc=Дозволити публічний доступ до wiki поки репозиторій залишається приватним
settings.use_external_wiki=Використовувати зовнішню wiki
settings.external_wiki_url=URL зовнішньої wiki
settings.external_wiki_url_desc=Відвідувачі будуть переспрямовані до URL коли вони клацнуть на вкладці.
settings.issues_desc=Увімкнути систему відстеження проблем
settings.use_internal_issue_tracker=Використовувати вбудовану легку систему відстеження помилок
settings.allow_public_issues_desc=Дозволити публічний доступ до проблем поки репозиторій залишається приватним
settings.use_external_issue_tracker=Використовувати зовнішній трекер задач
settings.external_tracker_url=URL зовнішньої системи відстеження проблем
settings.external_tracker_url_desc=Відвідувача буде перенаправлено до URL коли він натисне на вкладку.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Webhook успішно видалено!
settings.webhook.test_delivery=Перевірити поставку
settings.webhook.test_delivery_desc=Відправити тестовий push для перевірки налаштувань web-хуків
settings.webhook.test_delivery_success=Тестовий web-хук може бути доданий у чергу поставки. Поки він з'явиться у історії поставки, може пройти кілька секунд.
settings.webhook.redelivery=Зворотня доставка
settings.webhook.redelivery_success=Завдання хуку '%s' було передодано у чергу доставки. Оновлення статусу доставки в історії може зайняти якийсь час.
settings.webhook.request=Запит
settings.webhook.response=Відповідь
settings.webhook.headers=Заголовки

View File

@@ -1,4 +1,4 @@
app_desc=基于 Go 语言的自助 Git 服务
app_desc=一款极易搭建的自助 Git 服务
home=首页
dashboard=控制面板
@@ -82,6 +82,8 @@ app_url=应用 URL
app_url_helper=该设置影响 HTTP/HTTPS 克隆地址和一些邮箱中的链接。
log_root_path=日志路径
log_root_path_helper=存放日志文件的目录
enable_console_mode=启用控制台模式
enable_console_mode_popup=除了使用文件模式外,还将日志输出到控制台
optional_title=可选设置
email_title=邮件服务设置
@@ -256,6 +258,7 @@ ssh_keys=管理 SSH 密钥
social=社交帐号绑定
applications=管理授权应用
orgs=管理组织
repos=管理仓库
delete=删除帐户
uid=用户 ID
@@ -344,6 +347,11 @@ orgs.none=您现在还不是任何组织的成员。
orgs.leave_title=离开组织
orgs.leave_desc=离开组织后,组织相关的所有仓库和团队权限将被收回。是否继续?
repos.leave=离开仓库
repos.leave_title=退出仓库协作
repos.leave_desc=离开仓库后,相关权限将被收回。是否继续?
repos.leave_success=您已经成功退出 '%s' 的仓库协作!
delete_account=删除当前帐户
delete_prompt=删除操作会永久清除您的帐户信息,并且 <strong>不可恢复</strong>
confirm_delete_account=确认删除帐户
@@ -414,7 +422,7 @@ quick_guide=快速帮助
clone_this_repo=克隆当前仓库
create_new_repo_command=从命令行创建一个新的仓库
push_exist_repo=从命令行推送已经创建的仓库
repo_is_empty=该仓库不包含任何内容,请稍后再进行访问!
bare_message=这个家伙很懒,什么都没有推送。
files=文件
branch=分支
@@ -647,9 +655,10 @@ settings.options=基本设置
settings.collaboration=管理协作者
settings.collaboration.admin=管理权限
settings.collaboration.write=可写权限
settings.collaboration.read=读权限
settings.collaboration.read=读权限
settings.collaboration.undefined=未定义
settings.branches=管理分支
settings.branches_bare=您无法对空仓库进行分支管理,请先推送一些内容到仓库。
settings.default_branch=默认分支
settings.default_branch_desc=默认分支是被用于代码提交、合并请求和在线编辑的基准分支。
settings.update=更新
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=该操作将会影响到所有与该仓库有关
settings.advanced_settings=高级设置
settings.wiki_desc=启用 Wiki 系统
settings.use_internal_wiki=使用内置 Wiki 系统
settings.allow_public_wiki_desc=当仓库为私有时,允许 Wiki 的公开访问
settings.use_external_wiki=使用外部 Wiki
settings.external_wiki_url=外部 Wiki 链接
settings.external_wiki_url_desc=当访问者单击分页标签时,将会被重定向到该链接。
settings.issues_desc=启用工单管理系统
settings.use_internal_issue_tracker=使用内置的轻量级工单管理系统
settings.allow_public_issues_desc=当仓库为私有时,允许工单的公开访问
settings.use_external_issue_tracker=使用外部的工单管理系统
settings.external_tracker_url=外部工单管理系统 URL
settings.external_tracker_url_desc=当访问者单击分页标签时,将会被重定向到该链接。
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Web 钩子删除成功!
settings.webhook.test_delivery=测试推送
settings.webhook.test_delivery_desc=生成并推送一个模拟的 Push 事件
settings.webhook.test_delivery_success=测试推送已经加入到队列,请耐心等待数秒再刷新推送记录。
settings.webhook.redelivery=重新推送
settings.webhook.redelivery_success=任务 '%s' 已经被重新加入到推送队列,请耐心等待数秒再刷新推送记录。
settings.webhook.request=请求内容
settings.webhook.response=响应内容
settings.webhook.headers=头信息
@@ -1246,7 +1259,7 @@ delete_tag=删除了 <a href="%[1]s">%[3]s</a> 的标签 <code>%[2]s</code>
[tool]
ago=之前
from_now=之后
now=现在
now=刚刚
1s=1 秒%s
1m=1 分钟%s
1h=1 小时%s

View File

@@ -82,6 +82,8 @@ app_url=應用程式網址
app_url_helper=該設置影響 HTTP/HTTPS 複製地址和一些郵箱中的連結。
log_root_path=日誌路徑
log_root_path_helper=寫入日誌檔目錄
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=可選設置
email_title=電子郵件服務設定
@@ -256,6 +258,7 @@ ssh_keys=管理 SSH 密鑰
social=社交帳號綁定
applications=管理授權應用
orgs=管理組織
repos=Repositories
delete=刪除帳戶
uid=用戶 ID
@@ -341,9 +344,14 @@ access_token_deletion_desc=刪除此連接token將會刪除與相關應用程式
delete_token_success=您的連接token已成功刪除。請記得更新您的應用程式。
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_title=Leave organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=刪除當前帳戶
delete_prompt=刪除操作會永久清除您的帳戶信息,並且 <strong>不可恢復</strong>
confirm_delete_account=確認刪除帳戶
@@ -414,7 +422,7 @@ quick_guide=快速幫助
clone_this_repo=複製當前倉庫
create_new_repo_command=從命令行創建一個新的倉庫
push_exist_repo=從命令行推送已經創建的倉庫
repo_is_empty=這倉庫不包含任何內容,請稍後再訪問!
bare_message=This repository does not have any content yet.
files=Files
branch=分支
@@ -650,6 +658,7 @@ settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.branches=Branches
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=該操作將會影響到所有與該倉庫有關
settings.advanced_settings=高級設置
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=使用外部 wiki
settings.external_wiki_url=外部 Wiki 連結
settings.external_wiki_url_desc=當分頁上按一下,訪客將會重新導到 URL。
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=使用外部的問題管理系統
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Web 鉤子刪除成功!
settings.webhook.test_delivery=測試推送
settings.webhook.test_delivery_desc=生成並推送一個模擬的 Push 事件
settings.webhook.test_delivery_success=測試推送已經加入到隊列,請耐心等待數秒再刷新推送記錄。
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=請求內容
settings.webhook.response=響應內容
settings.webhook.headers=標題

View File

@@ -82,6 +82,8 @@ app_url=應用程式網址
app_url_helper=該設置影響 HTTP/HTTPS 複製地址和一些郵箱中的連結。
log_root_path=日誌路徑
log_root_path_helper=寫入日誌檔目錄
enable_console_mode=Enable Console Mode
enable_console_mode_popup=In addition to file mode, also print logs to console.
optional_title=可選設置
email_title=電子郵件服務設定
@@ -256,6 +258,7 @@ ssh_keys=管理 SSH 密鑰
social=社交帳號綁定
applications=管理授權應用
orgs=管理組織
repos=Repositories
delete=刪除帳戶
uid=用戶 ID
@@ -344,6 +347,11 @@ orgs.none=您現在還不是任何組織的成員。
orgs.leave_title=離開組織
orgs.leave_desc=離開組織後,所有與組織相關的倉庫和團隊權限將被取消。是否繼續?
repos.leave=Leave
repos.leave_title=Leave repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
delete_account=刪除當前帳戶
delete_prompt=刪除操作會永久清除您的帳戶信息,並且 <strong>不可恢復</strong>
confirm_delete_account=確認刪除帳戶
@@ -414,7 +422,7 @@ quick_guide=快速幫助
clone_this_repo=複製當前倉庫
create_new_repo_command=從命令行創建一個新的倉庫
push_exist_repo=從命令行推送已經創建的倉庫
repo_is_empty=這倉庫不包含任何內容,請稍後再訪問!
bare_message=This repository does not have any content yet.
files=檔案
branch=分支
@@ -650,6 +658,7 @@ settings.collaboration.write=可寫權限
settings.collaboration.read=可讀權限
settings.collaboration.undefined=未定義
settings.branches=分支列表
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=預設分支
settings.default_branch_desc=預設分支是程式碼 commit、pull requests 及線上編輯的基準分支。
settings.update=更新
@@ -682,11 +691,13 @@ settings.change_reponame_prompt=該操作將會影響到所有與該倉庫有關
settings.advanced_settings=高級設置
settings.wiki_desc=啓用 Wiki 系統
settings.use_internal_wiki=使用內建 wiki
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.use_external_wiki=使用外部 wiki
settings.external_wiki_url=外部 Wiki 連結
settings.external_wiki_url_desc=當分頁上按一下,訪客將會重新導到 URL。
settings.issues_desc=啟用問題追蹤
settings.use_internal_issue_tracker=使用內建輕量級問題追蹤
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=使用外部的問題管理系統
settings.external_tracker_url=外部Issue Tracker網址
settings.external_tracker_url_desc=當訪客在分頁上按一下,他們將會重新導向到 URL。
@@ -740,6 +751,8 @@ settings.webhook_deletion_success=Web 鉤子刪除成功!
settings.webhook.test_delivery=測試推送
settings.webhook.test_delivery_desc=生成並推送一個模擬的 Push 事件
settings.webhook.test_delivery_success=測試推送已經加入到隊列,請耐心等待數秒再刷新推送記錄。
settings.webhook.redelivery=Redelivery
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.request=請求內容
settings.webhook.response=響應內容
settings.webhook.headers=標題

View File

@@ -73,7 +73,7 @@ Most of settings are obvious and easy to understand, but there are some settings
Full documentation of application settings can be found [here](https://gogs.io/docs/advanced/configuration_cheat_sheet.html).
### Container Options
### Container Options
This container have some options available via environment variables, these options are opt-in features that can help the administration of this container:

View File

@@ -16,7 +16,6 @@ ln -s /app/gogs/build ${GOPATH}/src/github.com/gogits/gogs
cd ${GOPATH}/src/github.com/gogits/gogs
# Needed since git 2.9.3 or 2.9.4
git config --global http.https://gopkg.in.followRedirects true
go get -v -tags "sqlite cert pam" ./...
make build TAGS="sqlite cert pam"
# Cleanup GOPATH

View File

@@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.10.18.0313"
const APP_VER = "0.11.0.0403"
func init() {
setting.AppVer = APP_VER

View File

@@ -8,6 +8,8 @@ import (
"fmt"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/models/errors"
)
type AccessMode int
@@ -109,7 +111,7 @@ func (u *User) GetRepositoryAccesses() (map[*Repository]AccessMode, error) {
for _, access := range accesses {
repo, err := GetRepositoryByID(access.RepoID)
if err != nil {
if IsErrRepoNotExist(err) {
if errors.IsRepoNotExist(err) {
log.Error(4, "GetRepositoryByID: %v", err)
continue
}

View File

@@ -20,6 +20,7 @@ import (
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/setting"
)
@@ -250,20 +251,30 @@ func NewPushCommits() *PushCommits {
}
}
func (pc *PushCommits) ToApiPayloadCommits(repoLink string) []*api.PayloadCommit {
func (pc *PushCommits) ToApiPayloadCommits(repoPath, repoLink string) ([]*api.PayloadCommit, error) {
commits := make([]*api.PayloadCommit, len(pc.Commits))
for i, commit := range pc.Commits {
authorUsername := ""
author, err := GetUserByEmail(commit.AuthorEmail)
if err == nil {
authorUsername = author.Name
} else if !errors.IsUserNotExist(err) {
return nil, fmt.Errorf("GetUserByEmail: %v", err)
}
committerUsername := ""
committer, err := GetUserByEmail(commit.CommitterEmail)
if err == nil {
// TODO: check errors other than email not found.
committerUsername = committer.Name
} else if !errors.IsUserNotExist(err) {
return nil, fmt.Errorf("GetUserByEmail: %v", err)
}
fileStatus, err := git.GetCommitFileStatus(repoPath, commit.Sha1)
if err != nil {
return nil, fmt.Errorf("FileStatus [commit_sha1: %s]: %v", commit.Sha1, err)
}
commits[i] = &api.PayloadCommit{
ID: commit.Sha1,
Message: commit.Message,
@@ -278,10 +289,13 @@ func (pc *PushCommits) ToApiPayloadCommits(repoLink string) []*api.PayloadCommit
Email: commit.CommitterEmail,
UserName: committerUsername,
},
Added: fileStatus.Added,
Removed: fileStatus.Removed,
Modified: fileStatus.Modified,
Timestamp: commit.Timestamp,
}
}
return commits
return commits, nil
}
// AvatarLink tries to match user in database with e-mail
@@ -292,7 +306,7 @@ func (push *PushCommits) AvatarLink(email string) string {
u, err := GetUserByEmail(email)
if err != nil {
push.avatars[email] = base.AvatarLink(email)
if !IsErrUserNotExist(err) {
if !errors.IsUserNotExist(err) {
log.Error(4, "GetUserByEmail: %v", err)
}
} else {
@@ -329,7 +343,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
issue, err := GetIssueByRef(ref)
if err != nil {
if IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
continue
}
return err
@@ -372,7 +386,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
issue, err := GetIssueByRef(ref)
if err != nil {
if IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
continue
}
return err
@@ -412,7 +426,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
issue, err := GetIssueByRef(ref)
if err != nil {
if IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
continue
}
return err
@@ -545,12 +559,17 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
}
}
commits, err := opts.Commits.ToApiPayloadCommits(repo.RepoPath(), repo.HTMLURL())
if err != nil {
return fmt.Errorf("ToApiPayloadCommits: %v", err)
}
if err = PrepareWebhooks(repo, HOOK_EVENT_PUSH, &api.PushPayload{
Ref: opts.RefFullName,
Before: opts.OldCommitID,
After: opts.NewCommitID,
CompareURL: compareURL,
Commits: opts.Commits.ToApiPayloadCommits(repo.HTMLURL()),
Commits: commits,
Repo: apiRepo,
Pusher: apiPusher,
Sender: apiPusher,
@@ -652,9 +671,12 @@ func MergePullRequestAction(actUser *User, repo *Repository, pull *Issue) error
// GetFeeds returns action list of given user in given context.
// actorID is the user who's requesting, ctxUserID is the user/org that is requested.
// actorID can be -1 when isProfile is true or to skip the permission check.
func GetFeeds(ctxUser *User, actorID, offset int64, isProfile bool) ([]*Action, error) {
actions := make([]*Action, 0, 20)
sess := x.Limit(20, int(offset)).Desc("id").Where("user_id = ?", ctxUser.ID)
func GetFeeds(ctxUser *User, actorID, afterID int64, isProfile bool) ([]*Action, error) {
actions := make([]*Action, 0, setting.UI.User.NewsFeedPagingNum)
sess := x.Limit(setting.UI.User.NewsFeedPagingNum).Where("user_id = ?", ctxUser.ID).Desc("id")
if afterID > 0 {
sess.And("id < ?", afterID)
}
if isProfile {
sess.And("is_private = ?", false).And("act_user_id = ?", ctxUser.ID)
} else if actorID != -1 && ctxUser.IsOrganization() {

View File

@@ -15,7 +15,8 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/markup"
)
// CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
@@ -95,7 +96,7 @@ func (c *Comment) loadAttributes(e Engine) (err error) {
if c.Poster == nil {
c.Poster, err = GetUserByID(c.PosterID)
if err != nil {
if IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
c.PosterID = -1
c.Poster = NewGhostUser()
} else {
@@ -167,7 +168,7 @@ func (c *Comment) EventTag() string {
// mailParticipants sends new comment emails to repository watchers
// and mentioned people.
func (cmt *Comment) mailParticipants(e Engine, opType ActionType, issue *Issue) (err error) {
mentions := markdown.FindAllMentions(cmt.Content)
mentions := markup.FindAllMentions(cmt.Content)
if err = updateIssueMentions(e, cmt.IssueID, mentions); err != nil {
return fmt.Errorf("UpdateIssueMentions [%d]: %v", cmt.IssueID, err)
}

View File

@@ -54,20 +54,6 @@ func (err ErrUserAlreadyExist) Error() string {
return fmt.Sprintf("user already exists [name: %s]", err.Name)
}
type ErrUserNotExist struct {
UID int64
Name string
}
func IsErrUserNotExist(err error) bool {
_, ok := err.(ErrUserNotExist)
return ok
}
func (err ErrUserNotExist) Error() string {
return fmt.Sprintf("user does not exist [uid: %d, name: %s]", err.UID, err.Name)
}
type ErrEmailAlreadyUsed struct {
Email string
}
@@ -319,21 +305,6 @@ func (err ErrLastOrgOwner) Error() string {
// |____|_ /\___ > __/ \____/____ >__||__| \____/|__| / ____|
// \/ \/|__| \/ \/
type ErrRepoNotExist struct {
ID int64
UID int64
Name string
}
func IsErrRepoNotExist(err error) bool {
_, ok := err.(ErrRepoNotExist)
return ok
}
func (err ErrRepoNotExist) Error() string {
return fmt.Sprintf("repository does not exist [id: %d, uid: %d, name: %s]", err.ID, err.UID, err.Name)
}
type ErrRepoAlreadyExist struct {
Uname string
Name string
@@ -450,48 +421,6 @@ func (err ErrBranchNotExist) Error() string {
return fmt.Sprintf("branch does not exist [name: %s]", err.Name)
}
// __ __ ___. .__ __
// / \ / \ ____\_ |__ | |__ ____ ____ | | __
// \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ /
// \ /\ ___/| \_\ \ Y ( <_> | <_> ) <
// \__/\ / \___ >___ /___| /\____/ \____/|__|_ \
// \/ \/ \/ \/ \/
type ErrWebhookNotExist struct {
ID int64
}
func IsErrWebhookNotExist(err error) bool {
_, ok := err.(ErrWebhookNotExist)
return ok
}
func (err ErrWebhookNotExist) Error() string {
return fmt.Sprintf("webhook does not exist [id: %d]", err.ID)
}
// .___
// | | ______ ________ __ ____
// | |/ ___// ___/ | \_/ __ \
// | |\___ \ \___ \| | /\ ___/
// |___/____ >____ >____/ \___ >
// \/ \/ \/
type ErrIssueNotExist struct {
ID int64
RepoID int64
Index int64
}
func IsErrIssueNotExist(err error) bool {
_, ok := err.(ErrIssueNotExist)
return ok
}
func (err ErrIssueNotExist) Error() string {
return fmt.Sprintf("issue does not exist [id: %d, repo_id: %d, index: %d]", err.ID, err.RepoID, err.Index)
}
// __________ .__ .__ __________ __
// \______ \__ __| | | |\______ \ ____ ________ __ ____ _______/ |_
// | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\

View File

@@ -6,6 +6,21 @@ package errors
import "fmt"
type IssueNotExist struct {
ID int64
RepoID int64
Index int64
}
func IsIssueNotExist(err error) bool {
_, ok := err.(IssueNotExist)
return ok
}
func (err IssueNotExist) Error() string {
return fmt.Sprintf("issue does not exist [id: %d, repo_id: %d, index: %d]", err.ID, err.RepoID, err.Index)
}
type InvalidIssueReference struct {
Ref string
}

View File

@@ -6,6 +6,21 @@ package errors
import "fmt"
type RepoNotExist struct {
ID int64
UserID int64
Name string
}
func IsRepoNotExist(err error) bool {
_, ok := err.(RepoNotExist)
return ok
}
func (err RepoNotExist) Error() string {
return fmt.Sprintf("repository does not exist [id: %d, user_id: %d, name: %s]", err.ID, err.UserID, err.Name)
}
type InvalidRepoReference struct {
Ref string
}

View File

@@ -17,6 +17,20 @@ func (err EmptyName) Error() string {
return "empty name"
}
type UserNotExist struct {
UserID int64
Name string
}
func IsUserNotExist(err error) bool {
_, ok := err.(UserNotExist)
return ok
}
func (err UserNotExist) Error() string {
return fmt.Sprintf("user does not exist [user_id: %d, name: %s]", err.UserID, err.Name)
}
type UserNotKeyOwner struct {
KeyID int64
}

34
models/errors/webhook.go Normal file
View File

@@ -0,0 +1,34 @@
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package errors
import "fmt"
type WebhookNotExist struct {
ID int64
}
func IsWebhookNotExist(err error) bool {
_, ok := err.(WebhookNotExist)
return ok
}
func (err WebhookNotExist) Error() string {
return fmt.Sprintf("webhook does not exist [id: %d]", err.ID)
}
type HookTaskNotExist struct {
HookID int64
UUID string
}
func IsHookTaskNotExist(err error) bool {
_, ok := err.(HookTaskNotExist)
return ok
}
func (err HookTaskNotExist) Error() string {
return fmt.Sprintf("hook task does not exist [hook_id: %d, uuid: %s]", err.HookID, err.UUID)
}

View File

@@ -90,7 +90,7 @@ func (issue *Issue) loadAttributes(e Engine) (err error) {
if issue.Poster == nil {
issue.Poster, err = getUserByID(e, issue.PosterID)
if err != nil {
if IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
issue.PosterID = -1
issue.Poster = NewGhostUser()
} else {
@@ -390,7 +390,7 @@ func (i *Issue) GetAssignee() (err error) {
}
i.Assignee, err = GetUserByID(i.AssigneeID)
if IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
return nil
}
return err
@@ -595,7 +595,7 @@ func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
}
issue.Assignee, err = GetUserByID(issue.AssigneeID)
if err != nil && !IsErrUserNotExist(err) {
if err != nil && !errors.IsUserNotExist(err) {
log.Error(4, "GetUserByID [assignee_id: %v]: %v", issue.AssigneeID, err)
return nil
}
@@ -668,7 +668,7 @@ func newIssue(e *xorm.Session, opts NewIssueOptions) (err error) {
if opts.Issue.AssigneeID > 0 {
assignee, err := getUserByID(e, opts.Issue.AssigneeID)
if err != nil && !IsErrUserNotExist(err) {
if err != nil && !errors.IsUserNotExist(err) {
return fmt.Errorf("getUserByID: %v", err)
}
@@ -827,7 +827,7 @@ func GetRawIssueByIndex(repoID, index int64) (*Issue, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrIssueNotExist{0, repoID, index}
return nil, errors.IssueNotExist{0, repoID, index}
}
return issue, nil
}
@@ -847,7 +847,7 @@ func getRawIssueByID(e Engine, id int64) (*Issue, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrIssueNotExist{id, 0, 0}
return nil, errors.IssueNotExist{id, 0, 0}
}
return issue, nil
}
@@ -895,7 +895,7 @@ func buildIssuesQuery(opts *IssuesOptions) *xorm.Session {
if len(opts.RepoIDs) == 0 {
return nil
}
sess.In("issue.repo_id", base.Int64sToStrings(opts.RepoIDs)).And("issue.is_closed=?", opts.IsClosed)
sess.In("issue.repo_id", opts.RepoIDs).And("issue.is_closed=?", opts.IsClosed)
} else {
sess.Where("issue.is_closed=?", opts.IsClosed)
}
@@ -930,7 +930,7 @@ func buildIssuesQuery(opts *IssuesOptions) *xorm.Session {
}
if len(opts.Labels) > 0 && opts.Labels != "0" {
labelIDs := base.StringsToInt64s(strings.Split(opts.Labels, ","))
labelIDs := strings.Split(opts.Labels, ",")
if len(labelIDs) > 0 {
sess.Join("INNER", "issue_label", "issue.id = issue_label.issue_id").In("issue_label.label_id", labelIDs)
}

View File

@@ -11,7 +11,7 @@ import (
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/mailer"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/markup"
"github.com/gogits/gogs/modules/setting"
)
@@ -162,7 +162,7 @@ func mailIssueCommentToParticipants(issue *Issue, doer *User, mentions []string)
// MailParticipants sends new issue thread created emails to repository watchers
// and mentioned people.
func (issue *Issue) MailParticipants() (err error) {
mentions := markdown.FindAllMentions(issue.Content)
mentions := markup.FindAllMentions(issue.Content)
if err = updateIssueMentions(x, issue.ID, mentions); err != nil {
return fmt.Errorf("UpdateIssueMentions [%d]: %v", issue.ID, err)
}

View File

@@ -296,7 +296,7 @@ func LoginViaLDAP(user *User, login, password string, source *LoginSource, autoR
username, fn, sn, mail, isAdmin, succeed := source.Cfg.(*LDAPConfig).SearchEntry(login, password, source.Type == LOGIN_DLDAP)
if !succeed {
// User not in LDAP, do nothing
return nil, ErrUserNotExist{0, login}
return nil, errors.UserNotExist{0, login}
}
if !autoRegister {
@@ -404,9 +404,9 @@ func LoginViaSMTP(user *User, login, password string, sourceID int64, cfg *SMTPC
if len(cfg.AllowedDomains) > 0 {
idx := strings.Index(login, "@")
if idx == -1 {
return nil, ErrUserNotExist{0, login}
return nil, errors.UserNotExist{0, login}
} else if !com.IsSliceContainsStr(strings.Split(cfg.AllowedDomains, ","), login[idx+1:]) {
return nil, ErrUserNotExist{0, login}
return nil, errors.UserNotExist{0, login}
}
}
@@ -425,7 +425,7 @@ func LoginViaSMTP(user *User, login, password string, sourceID int64, cfg *SMTPC
tperr, ok := err.(*textproto.Error)
if (ok && tperr.Code == 535) ||
strings.Contains(err.Error(), "Username and Password not accepted") {
return nil, ErrUserNotExist{0, login}
return nil, errors.UserNotExist{0, login}
}
return nil, err
}
@@ -465,7 +465,7 @@ func LoginViaSMTP(user *User, login, password string, sourceID int64, cfg *SMTPC
func LoginViaPAM(user *User, login, password string, sourceID int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
if err := pam.PAMAuth(cfg.ServiceName, login, password); err != nil {
if strings.Contains(err.Error(), "Authentication failure") {
return nil, ErrUserNotExist{0, login}
return nil, errors.UserNotExist{0, login}
}
return nil, err
}
@@ -525,7 +525,7 @@ func UserSignIn(username, password string) (*User, error) {
return user, nil
}
return nil, ErrUserNotExist{user.ID, user.Name}
return nil, errors.UserNotExist{user.ID, user.Name}
default:
var source LoginSource
@@ -554,5 +554,5 @@ func UserSignIn(username, password string) (*User, error) {
log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err)
}
return nil, ErrUserNotExist{user.ID, user.Name}
return nil, errors.UserNotExist{user.ID, user.Name}
}

View File

@@ -62,6 +62,8 @@ var migrations = []Migration{
NewMigration("generate and migrate Git hooks", generateAndMigrateGitHooks),
// v15 -> v16:v0.10.16
NewMigration("update repository sizes", updateRepositorySizes),
// v16 -> v17:v0.10.31
NewMigration("remove invalid protect branch whitelist", removeInvalidProtectBranchWhitelist),
}
// Migrate database to current version

22
models/migrations/v17.go Normal file
View File

@@ -0,0 +1,22 @@
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package migrations
import (
"fmt"
"github.com/go-xorm/xorm"
)
func removeInvalidProtectBranchWhitelist(x *xorm.Engine) error {
exist, err := x.IsTableExist("protect_branch_whitelist")
if err != nil {
return fmt.Errorf("IsTableExist: %v", err)
} else if !exist {
return nil
}
_, err = x.Exec("DELETE FROM protect_branch_whitelist WHERE protect_branch_id = 0")
return err
}

View File

@@ -103,6 +103,15 @@ func (m *Milestone) APIFormat() *api.Milestone {
return apiMilestone
}
func (m *Milestone) CountIssues(isClosed, includePulls bool) int64 {
sess := x.Where("milestone_id = ?", m.ID).And("is_closed = ?", isClosed)
if !includePulls {
sess.And("is_pull = ?", false)
}
count, _ := sess.Count(new(Issue))
return count
}
// NewMilestone creates new milestone of repository.
func NewMilestone(m *Milestone) (err error) {
sess := x.NewSession()

View File

@@ -60,7 +60,7 @@ func (m *Mirror) AfterSet(colName string, _ xorm.Cell) {
}
case "updated_unix":
m.Updated = time.Unix(m.UpdatedUnix, 0).Local()
case "next_updated_unix":
case "next_update_unix":
m.NextUpdate = time.Unix(m.NextUpdateUnix, 0).Local()
}
}
@@ -164,6 +164,11 @@ func (m *Mirror) runSync() bool {
}
return false
}
if err := m.Repo.UpdateSize(); err != nil {
log.Error(2, "UpdateSize [repo_id: %d]: %v", m.Repo.ID, err)
}
if m.Repo.HasWiki() {
if _, stderr, err := process.ExecDir(
timeout, wikiPath, fmt.Sprintf("Mirror.runSync: %s", wikiPath),

View File

@@ -21,6 +21,7 @@ import (
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"
_ "github.com/lib/pq"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/models/migrations"
"github.com/gogits/gogs/modules/setting"
@@ -192,18 +193,22 @@ func SetEngine() (err error) {
// WARNING: for serv command, MUST remove the output to os.stdout,
// so use log file to instead print to stdout.
logPath := path.Join(setting.LogRootPath, "xorm.log")
os.MkdirAll(path.Dir(logPath), os.ModePerm)
f, err := os.Create(logPath)
sec := setting.Cfg.Section("log.xorm")
logger, err := log.NewFileWriter(path.Join(setting.LogRootPath, "xorm.log"),
log.FileRotationConfig{
Rotate: sec.Key("ROTATE").MustBool(true),
Daily: sec.Key("ROTATE_DAILY").MustBool(true),
MaxSize: sec.Key("MAX_SIZE").MustInt64(100) * 1024 * 1024,
MaxDays: sec.Key("MAX_DAYS").MustInt64(3),
})
if err != nil {
return fmt.Errorf("Fail to create xorm.log: %v", err)
return fmt.Errorf("Fail to create 'xorm.log': %v", err)
}
if setting.ProdMode {
x.SetLogger(xorm.NewSimpleLogger3(f, xorm.DEFAULT_LOG_PREFIX, xorm.DEFAULT_LOG_FLAG, core.LOG_WARNING))
x.SetLogger(xorm.NewSimpleLogger3(logger, xorm.DEFAULT_LOG_PREFIX, xorm.DEFAULT_LOG_FLAG, core.LOG_WARNING))
} else {
x.SetLogger(xorm.NewSimpleLogger(f))
x.SetLogger(xorm.NewSimpleLogger(logger))
}
x.ShowSQL(true)
return nil

View File

@@ -31,7 +31,7 @@ type Team struct {
func (t *Team) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "num_repos":
// LEGACY [0.11]: this is backward compatibility bug fix for https://github.com/gogits/gogs/issues/3671
// LEGACY [1.0]: this is backward compatibility bug fix for https://github.com/gogits/gogs/issues/3671
if t.NumRepos < 0 {
t.NumRepos = 0
}
@@ -424,7 +424,7 @@ func IsTeamMember(orgID, teamID, uid int64) bool {
func getTeamMembers(e Engine, teamID int64) (_ []*User, err error) {
teamUsers := make([]*TeamUser, 0, 10)
if err = e.Sql("SELECT `id`, `org_id`, `team_id`, `uid` FROM `team_user` WHERE team_id=?", teamID).
if err = e.Sql("SELECT `id`, `org_id`, `team_id`, `uid` FROM `team_user` WHERE team_id = ?", teamID).
Find(&teamUsers); err != nil {
return nil, fmt.Errorf("get team-users: %v", err)
}

View File

@@ -18,6 +18,7 @@ import (
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/process"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
@@ -87,7 +88,7 @@ func (pr *PullRequest) AfterSet(colName string, _ xorm.Cell) {
func (pr *PullRequest) loadAttributes(e Engine) (err error) {
if pr.HeadRepo == nil {
pr.HeadRepo, err = getRepositoryByID(e, pr.HeadRepoID)
if err != nil && !IsErrRepoNotExist(err) {
if err != nil && !errors.IsRepoNotExist(err) {
return fmt.Errorf("getRepositoryByID.(HeadRepo) [%d]: %v", pr.HeadRepoID, err)
}
}
@@ -101,7 +102,7 @@ func (pr *PullRequest) loadAttributes(e Engine) (err error) {
if pr.HasMerged && pr.Merger == nil {
pr.Merger, err = getUserByID(e, pr.MergerID)
if IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
pr.MergerID = -1
pr.Merger = NewGhostUser()
} else if err != nil {
@@ -277,12 +278,12 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
}
if err = MergePullRequestAction(doer, pr.Issue.Repo, pr.Issue); err != nil {
log.Error(4, "MergePullRequestAction [%d]: %v", pr.ID, err)
log.Error(2, "MergePullRequestAction [%d]: %v", pr.ID, err)
}
// Reload pull request information.
if err = pr.LoadAttributes(); err != nil {
log.Error(4, "LoadAttributes: %v", err)
log.Error(2, "LoadAttributes: %v", err)
return nil
}
if err = PrepareWebhooks(pr.Issue.Repo, HOOK_EVENT_PULL_REQUEST, &api.PullRequestPayload{
@@ -292,13 +293,13 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
Repository: pr.Issue.Repo.APIFormat(nil),
Sender: doer.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks: %v", err)
log.Error(2, "PrepareWebhooks: %v", err)
return nil
}
l, err := headGitRepo.CommitsBetweenIDs(pr.MergedCommitID, pr.MergeBase)
if err != nil {
log.Error(4, "CommitsBetweenIDs: %v", err)
log.Error(2, "CommitsBetweenIDs: %v", err)
return nil
}
@@ -308,23 +309,30 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
// to avoid strange diff commits produced.
mergeCommit, err := baseGitRepo.GetBranchCommit(pr.BaseBranch)
if err != nil {
log.Error(4, "GetBranchCommit: %v", err)
log.Error(2, "GetBranchCommit: %v", err)
return nil
}
l.PushFront(mergeCommit)
commits, err := ListToPushCommits(l).ToApiPayloadCommits(pr.BaseRepo.RepoPath(), pr.BaseRepo.HTMLURL())
if err != nil {
log.Error(2, "ToApiPayloadCommits: %v", err)
return nil
}
p := &api.PushPayload{
Ref: git.BRANCH_PREFIX + pr.BaseBranch,
Before: pr.MergeBase,
After: pr.MergedCommitID,
CompareURL: setting.AppUrl + pr.BaseRepo.ComposeCompareURL(pr.MergeBase, pr.MergedCommitID),
Commits: ListToPushCommits(l).ToApiPayloadCommits(pr.BaseRepo.HTMLURL()),
Commits: commits,
Repo: pr.BaseRepo.APIFormat(nil),
Pusher: pr.HeadRepo.MustOwner().APIFormat(),
Sender: doer.APIFormat(),
}
if err = PrepareWebhooks(pr.BaseRepo, HOOK_EVENT_PUSH, p); err != nil {
return fmt.Errorf("PrepareWebhooks: %v", err)
log.Error(2, "PrepareWebhooks: %v", err)
return nil
}
return nil
}
@@ -599,7 +607,7 @@ func (pr *PullRequest) AddToTaskQueue() {
go PullRequestQueue.AddFunc(pr.ID, func() {
pr.Status = PULL_REQUEST_STATUS_CHECKING
if err := pr.UpdateCols("status"); err != nil {
log.Error(5, "AddToTaskQueue.UpdateCols[%d].(add to queue): %v", pr.ID, err)
log.Error(3, "AddToTaskQueue.UpdateCols[%d].(add to queue): %v", pr.ID, err)
}
})
}
@@ -612,16 +620,18 @@ func (prs PullRequestList) loadAttributes(e Engine) (err error) {
}
// Load issues
issueIDs := make([]int64, 0, len(prs))
set := make(map[int64]*Issue)
for i := range prs {
issueIDs = append(issueIDs, prs[i].IssueID)
set[prs[i].IssueID] = nil
}
issueIDs := make([]int64, 0, len(prs))
for issueID := range set {
issueIDs = append(issueIDs, issueID)
}
issues := make([]*Issue, 0, len(issueIDs))
if err = e.Where("id > 0").In("id", issueIDs).Find(&issues); err != nil {
return fmt.Errorf("find issues: %v", err)
}
set := make(map[int64]*Issue)
for i := range issues {
set[issues[i].ID] = issues[i]
}
@@ -664,20 +674,20 @@ func AddTestPullRequestTask(doer *User, repoID int64, branch string, isSync bool
log.Trace("AddTestPullRequestTask [head_repo_id: %d, head_branch: %s]: finding pull requests", repoID, branch)
prs, err := GetUnmergedPullRequestsByHeadInfo(repoID, branch)
if err != nil {
log.Error(4, "Find pull requests [head_repo_id: %d, head_branch: %s]: %v", repoID, branch, err)
log.Error(2, "Find pull requests [head_repo_id: %d, head_branch: %s]: %v", repoID, branch, err)
return
}
if isSync {
if err = PullRequestList(prs).LoadAttributes(); err != nil {
log.Error(4, "PullRequestList.LoadAttributes: %v", err)
log.Error(2, "PullRequestList.LoadAttributes: %v", err)
}
if err == nil {
for _, pr := range prs {
pr.Issue.PullRequest = pr
if err = pr.Issue.LoadAttributes(); err != nil {
log.Error(4, "LoadAttributes: %v", err)
log.Error(2, "LoadAttributes: %v", err)
continue
}
if err = PrepareWebhooks(pr.Issue.Repo, HOOK_EVENT_PULL_REQUEST, &api.PullRequestPayload{
@@ -687,10 +697,9 @@ func AddTestPullRequestTask(doer *User, repoID int64, branch string, isSync bool
Repository: pr.Issue.Repo.APIFormat(nil),
Sender: doer.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks [pull_id: %v]: %v", pr.ID, err)
log.Error(2, "PrepareWebhooks [pull_id: %v]: %v", pr.ID, err)
continue
}
go HookQueue.Add(pr.Issue.Repo.ID)
}
}
}
@@ -700,7 +709,7 @@ func AddTestPullRequestTask(doer *User, repoID int64, branch string, isSync bool
log.Trace("AddTestPullRequestTask [base_repo_id: %d, base_branch: %s]: finding pull requests", repoID, branch)
prs, err = GetUnmergedPullRequestsByBaseInfo(repoID, branch)
if err != nil {
log.Error(4, "Find pull requests [base_repo_id: %d, base_branch: %s]: %v", repoID, branch, err)
log.Error(2, "Find pull requests [base_repo_id: %d, base_branch: %s]: %v", repoID, branch, err)
return
}
for _, pr := range prs {

View File

@@ -16,6 +16,7 @@ import (
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/process"
)
@@ -67,7 +68,7 @@ func (r *Release) loadAttributes(e Engine) (err error) {
if r.Publisher == nil {
r.Publisher, err = getUserByID(e, r.PublisherID)
if err != nil {
if IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
r.PublisherID = -1
r.Publisher = NewGhostUser()
} else {

View File

@@ -7,13 +7,11 @@ package models
import (
"bytes"
"fmt"
"html/template"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"sort"
"strings"
"time"
@@ -30,7 +28,7 @@ import (
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/bindata"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/markup"
"github.com/gogits/gogs/modules/process"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
@@ -115,6 +113,7 @@ func NewRepoContext() {
}
git.HookDir = "custom_hooks"
git.HookSampleDir = "hooks"
git.DefaultCommitsPageSize = setting.UI.User.CommitsPagingNum
// Git requires setting user.name and user.email in order to commit changes.
for configKey, defaultValue := range map[string]string{"user.name": "Gogs", "user.email": "gogs@fake.local"} {
@@ -174,9 +173,11 @@ type Repository struct {
// Advanced settings
EnableWiki bool `xorm:"NOT NULL DEFAULT true"`
AllowPublicWiki bool
EnableExternalWiki bool
ExternalWikiURL string
EnableIssues bool `xorm:"NOT NULL DEFAULT true"`
AllowPublicIssues bool
EnableExternalTracker bool
ExternalTrackerURL string
ExternalTrackerFormat string
@@ -218,7 +219,7 @@ func (repo *Repository) AfterSet(colName string, _ xorm.Cell) {
repo.NumOpenMilestones = repo.NumMilestones - repo.NumClosedMilestones
case "external_tracker_style":
if len(repo.ExternalTrackerStyle) == 0 {
repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_NUMERIC
repo.ExternalTrackerStyle = markup.ISSUE_NAME_STYLE_NUMERIC
}
case "created_unix":
repo.Created = time.Unix(repo.CreatedUnix, 0).Local()
@@ -227,10 +228,48 @@ func (repo *Repository) AfterSet(colName string, _ xorm.Cell) {
}
}
// MustOwner always returns a valid *User object to avoid
// conceptually impossible error handling.
// It creates a fake object that contains error deftail
// when error occurs.
func (repo *Repository) loadAttributes(e Engine) (err error) {
if repo.Owner == nil {
repo.Owner, err = getUserByID(e, repo.OwnerID)
if err != nil {
return fmt.Errorf("getUserByID [%d]: %v", repo.OwnerID, err)
}
}
if repo.IsFork && repo.BaseRepo == nil {
repo.BaseRepo, err = getRepositoryByID(e, repo.ForkID)
if err != nil {
if errors.IsRepoNotExist(err) {
repo.IsFork = false
repo.ForkID = 0
} else {
return fmt.Errorf("getRepositoryByID [%d]: %v", repo.ForkID, err)
}
}
}
return nil
}
func (repo *Repository) LoadAttributes() error {
return repo.loadAttributes(x)
}
// IsPartialPublic returns true if repository is public or allow public access to wiki or issues.
func (repo *Repository) IsPartialPublic() bool {
return !repo.IsPrivate || repo.AllowPublicWiki || repo.AllowPublicIssues
}
func (repo *Repository) CanGuestViewWiki() bool {
return repo.EnableWiki && !repo.EnableExternalWiki && repo.AllowPublicWiki
}
func (repo *Repository) CanGuestViewIssues() bool {
return repo.EnableIssues && !repo.EnableExternalTracker && repo.AllowPublicIssues
}
// MustOwner always returns a valid *User object to avoid conceptually impossible error handling.
// It creates a fake object that contains error deftail when error occurs.
func (repo *Repository) MustOwner() *User {
return repo.mustOwner(x)
}
@@ -317,10 +356,10 @@ func (repo *Repository) ComposeMetas() map[string]string {
"repo": repo.Name,
}
switch repo.ExternalTrackerStyle {
case markdown.ISSUE_NAME_STYLE_ALPHANUMERIC:
repo.ExternalMetas["style"] = markdown.ISSUE_NAME_STYLE_ALPHANUMERIC
case markup.ISSUE_NAME_STYLE_ALPHANUMERIC:
repo.ExternalMetas["style"] = markup.ISSUE_NAME_STYLE_ALPHANUMERIC
default:
repo.ExternalMetas["style"] = markdown.ISSUE_NAME_STYLE_NUMERIC
repo.ExternalMetas["style"] = markup.ISSUE_NAME_STYLE_NUMERIC
}
}
@@ -402,15 +441,6 @@ func (repo *Repository) GetMirror() (err error) {
return err
}
func (repo *Repository) GetBaseRepo() (err error) {
if !repo.IsFork {
return nil
}
repo.BaseRepo, err = GetRepositoryByID(repo.ForkID)
return err
}
func (repo *Repository) repoPath(e Engine) string {
return RepoPath(repo.mustOwner(e).Name, repo.Name)
}
@@ -451,7 +481,7 @@ func (repo *Repository) CanBeForked() bool {
// CanEnablePulls returns true if repository meets the requirements of accepting pulls.
func (repo *Repository) CanEnablePulls() bool {
return !repo.IsMirror
return !repo.IsMirror && !repo.IsBare
}
// AllowPulls returns true if repository meets the requirements of accepting pulls and has them enabled.
@@ -474,18 +504,6 @@ func (repo *Repository) NextIssueIndex() int64 {
return int64(repo.NumIssues+repo.NumPulls) + 1
}
var (
DescPattern = regexp.MustCompile(`https?://\S+`)
)
// DescriptionHtml does special handles to description and return HTML string.
func (repo *Repository) DescriptionHtml() template.HTML {
sanitize := func(s string) string {
return fmt.Sprintf(`<a href="%[1]s" target="_blank">%[1]s</a>`, s)
}
return template.HTML(DescPattern.ReplaceAllStringFunc(markdown.Sanitizer.Sanitize(repo.Description), sanitize))
}
func (repo *Repository) LocalCopyPath() string {
return path.Join(setting.AppDataPath, "tmp/local-repo", com.ToStr(repo.ID))
}
@@ -705,6 +723,10 @@ func MigrateRepository(doer, owner *User, opts MigrateRepoOptions) (*Repository,
if headBranch != nil {
repo.DefaultBranch = headBranch.Name
}
if err = repo.UpdateSize(); err != nil {
log.Error(2, "UpdateSize [repo_id: %d]: %v", repo.ID, err)
}
}
if opts.IsMirror {
@@ -1365,7 +1387,7 @@ func DeleteRepository(uid, repoID int64) error {
if err != nil {
return err
} else if !has {
return ErrRepoNotExist{repoID, uid, ""}
return errors.RepoNotExist{repoID, uid, ""}
}
// In case is a organization.
@@ -1502,9 +1524,9 @@ func GetRepositoryByName(ownerID int64, name string) (*Repository, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrRepoNotExist{0, ownerID, name}
return nil, errors.RepoNotExist{0, ownerID, name}
}
return repo, err
return repo, repo.LoadAttributes()
}
func getRepositoryByID(e Engine, id int64) (*Repository, error) {
@@ -1513,9 +1535,9 @@ func getRepositoryByID(e Engine, id int64) (*Repository, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrRepoNotExist{id, 0, ""}
return nil, errors.RepoNotExist{id, 0, ""}
}
return repo, nil
return repo, repo.loadAttributes(e)
}
// GetRepositoryByID returns the repository by given id if exists.
@@ -1558,6 +1580,24 @@ func GetRecentUpdatedRepositories(page, pageSize int) (repos []*Repository, err
Where("is_private=?", false).Limit(pageSize).Desc("updated_unix").Find(&repos)
}
// GetUserAndCollaborativeRepositories returns list of repositories the user owns and collaborates.
func GetUserAndCollaborativeRepositories(userID int64) ([]*Repository, error) {
repos := make([]*Repository, 0, 10)
if err := x.Alias("repo").
Join("INNER", "collaboration", "collaboration.repo_id = repo.id").
Where("collaboration.user_id = ?", userID).
Find(&repos); err != nil {
return nil, fmt.Errorf("select collaborative repositories: %v", err)
}
ownRepos := make([]*Repository, 0, 10)
if err := x.Where("owner_id = ?", userID).Find(&ownRepos); err != nil {
return nil, fmt.Errorf("select own repositories: %v", err)
}
return append(repos, ownRepos...), nil
}
func getRepositoryCount(e Engine, u *User) (int64, error) {
return x.Count(&Repository{OwnerID: u.ID})
}
@@ -1580,11 +1620,6 @@ type SearchRepoOptions struct {
// SearchRepositoryByName takes keyword and part of repository name to search,
// it returns results in given range and number of total results.
func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int64, _ error) {
if len(opts.Keyword) == 0 {
return repos, 0, nil
}
opts.Keyword = strings.ToLower(opts.Keyword)
if opts.Page <= 0 {
opts.Page = 1
}
@@ -1595,15 +1630,16 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int
// this does not include other people's private repositories even if opts.UserID is an admin.
if !opts.Private && opts.UserID > 0 {
sess.Join("LEFT", "access", "access.repo_id = repo.id").
Where("repo.lower_name LIKE ? AND (repo.owner_id = ? OR access.user_id = ? OR repo.is_private = ?)",
"%"+opts.Keyword+"%", opts.UserID, opts.UserID, false)
Where("(repo.owner_id = ? OR access.user_id = ? OR repo.is_private = ?)", opts.UserID, opts.UserID, false)
} else {
sess.Where("repo.lower_name LIKE ?", "%"+opts.Keyword+"%")
// Only return public repositories if opts.Private is not set
if !opts.Private {
sess.And("repo.is_private = ?", false)
}
}
if len(opts.Keyword) > 0 {
sess.And("repo.lower_name LIKE ?", "%"+strings.ToLower(opts.Keyword)+"%")
}
if opts.OwnerID > 0 {
sess.And("repo.owner_id = ?", opts.OwnerID)
}
@@ -1618,7 +1654,7 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int
if len(opts.OrderBy) > 0 {
sess.OrderBy("repo." + opts.OrderBy)
}
return repos, count, sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize).Find(&repos)
return repos, count, sess.Distinct("repo.*").Limit(opts.PageSize, (opts.Page-1)*opts.PageSize).Find(&repos)
}
func DeleteOldRepositoryArchives() {
@@ -1948,7 +1984,7 @@ func (repos RepositoryList) loadAttributes(e Engine) error {
return nil
}
// Load owners.
// Load owners
set := make(map[int64]*User)
for i := range repos {
set[repos[i].OwnerID] = nil
@@ -2214,6 +2250,8 @@ func ForkRepository(doer, owner *User, baseRepo *Repository, name, desc string)
}
repoPath := repo.repoPath(sess)
RemoveAllWithNotice("Repository path erase before creation", repoPath)
_, stderr, err := process.ExecTimeout(10*time.Minute,
fmt.Sprintf("ForkRepository 'git clone': %s/%s", owner.Name, repo.Name),
"git", "clone", "--bare", baseRepo.RepoPath(), repoPath)
@@ -2230,15 +2268,23 @@ func ForkRepository(doer, owner *User, baseRepo *Repository, name, desc string)
if err = createDelegateHooks(repoPath); err != nil {
return nil, fmt.Errorf("createDelegateHooks: %v", err)
} else if err = prepareWebhooks(sess, baseRepo, HOOK_EVENT_FORK, &api.ForkPayload{
}
if err = sess.Commit(); err != nil {
return nil, fmt.Errorf("Commit: %v", err)
}
if err = repo.UpdateSize(); err != nil {
log.Error(2, "UpdateSize [repo_id: %d]: %v", repo.ID, err)
}
if err = PrepareWebhooks(baseRepo, HOOK_EVENT_FORK, &api.ForkPayload{
Forkee: repo.APIFormat(nil),
Repo: baseRepo.APIFormat(nil),
Sender: doer.APIFormat(),
}); err != nil {
return nil, fmt.Errorf("prepareWebhooks: %v", err)
log.Error(2, "PrepareWebhooks [repo_id: %d]: %v", baseRepo.ID, err)
}
return repo, sess.Commit()
return repo, nil
}
func (repo *Repository) GetForks() ([]*Repository, error) {

View File

@@ -187,6 +187,13 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit
protectBranch.WhitelistTeamIDs = strings.Join(base.Int64sToStrings(validTeamIDs), ",")
}
// Make sure protectBranch.ID is not 0 for whitelists
if protectBranch.ID == 0 {
if _, err = x.Insert(protectBranch); err != nil {
return fmt.Errorf("Insert: %v", err)
}
}
// Merge users and members of teams
var whitelists []*ProtectBranchWhitelist
if hasUsersChanged || hasTeamsChanged {
@@ -226,12 +233,6 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit
return err
}
if protectBranch.ID == 0 {
if _, err = sess.Insert(protectBranch); err != nil {
return fmt.Errorf("Insert: %v", err)
}
}
if _, err = sess.Id(protectBranch.ID).AllCols().Update(protectBranch); err != nil {
return fmt.Errorf("Update: %v", err)
}

View File

@@ -7,6 +7,8 @@ package models
import (
"fmt"
log "gopkg.in/clog.v1"
api "github.com/gogits/go-gogs-client"
)
@@ -31,14 +33,22 @@ func (c *Collaboration) ModeI18nKey() string {
}
}
//IsCollaborator returns true if the user is a collaborator
func (repo *Repository) IsCollaborator(uid int64) (bool, error) {
// IsCollaborator returns true if the user is a collaborator of the repository.
func IsCollaborator(repoID, userID int64) bool {
collaboration := &Collaboration{
RepoID: repo.ID,
UserID: uid,
RepoID: repoID,
UserID: userID,
}
has, err := x.Get(collaboration)
if err != nil {
log.Error(2, "get collaboration [repo_id: %d, user_id: %d]: %v", repoID, userID, err)
return false
}
return has
}
return x.Get(collaboration)
func (repo *Repository) IsCollaborator(userID int64) bool {
return IsCollaborator(repo.ID, userID)
}
// AddCollaborator adds new collaboration to a repository with default access mode.
@@ -186,10 +196,14 @@ func (repo *Repository) ChangeCollaborationAccessMode(userID int64, mode AccessM
}
// DeleteCollaboration removes collaboration relation between the user and repository.
func (repo *Repository) DeleteCollaboration(uid int64) (err error) {
func DeleteCollaboration(repo *Repository, userID int64) (err error) {
if !IsCollaborator(repo.ID, userID) {
return nil
}
collaboration := &Collaboration{
RepoID: repo.ID,
UserID: uid,
UserID: userID,
}
sess := x.NewSession()
@@ -206,3 +220,7 @@ func (repo *Repository) DeleteCollaboration(uid int64) (err error) {
return sess.Commit()
}
func (repo *Repository) DeleteCollaboration(userID int64) error {
return DeleteCollaboration(repo, userID)
}

View File

@@ -135,12 +135,12 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
gitRepo, err := git.OpenRepository(repo.RepoPath())
if err != nil {
log.Error(4, "OpenRepository: %v", err)
log.Error(2, "OpenRepository: %v", err)
return nil
}
commit, err := gitRepo.GetBranchCommit(opts.NewBranch)
if err != nil {
log.Error(4, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
log.Error(2, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
return nil
}
@@ -162,10 +162,11 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
NewCommitID: commit.ID.String(),
Commits: pushCommits,
}); err != nil {
log.Error(4, "CommitRepoAction: %v", err)
log.Error(2, "CommitRepoAction: %v", err)
return nil
}
go AddTestPullRequestTask(doer, repo.ID, opts.NewBranch, true)
return nil
}
@@ -265,12 +266,12 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (
gitRepo, err := git.OpenRepository(repo.RepoPath())
if err != nil {
log.Error(4, "OpenRepository: %v", err)
log.Error(2, "OpenRepository: %v", err)
return nil
}
commit, err := gitRepo.GetBranchCommit(opts.NewBranch)
if err != nil {
log.Error(4, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
log.Error(2, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
return nil
}
@@ -288,10 +289,11 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (
NewCommitID: commit.ID.String(),
Commits: pushCommits,
}); err != nil {
log.Error(4, "CommitRepoAction: %v", err)
log.Error(2, "CommitRepoAction: %v", err)
return nil
}
go AddTestPullRequestTask(doer, repo.ID, opts.NewBranch, true)
return nil
}
@@ -489,12 +491,12 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
gitRepo, err := git.OpenRepository(repo.RepoPath())
if err != nil {
log.Error(4, "OpenRepository: %v", err)
log.Error(2, "OpenRepository: %v", err)
return nil
}
commit, err := gitRepo.GetBranchCommit(opts.NewBranch)
if err != nil {
log.Error(4, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
log.Error(2, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
return nil
}
@@ -512,9 +514,10 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
NewCommitID: commit.ID.String(),
Commits: pushCommits,
}); err != nil {
log.Error(4, "CommitRepoAction: %v", err)
log.Error(2, "CommitRepoAction: %v", err)
return nil
}
go AddTestPullRequestTask(doer, repo.ID, opts.NewBranch, true)
return DeleteUploads(uploads...)
}

View File

@@ -1,11 +1,12 @@
package models_test
import (
. "github.com/gogits/gogs/models"
. "github.com/smartystreets/goconvey/convey"
"testing"
"github.com/gogits/gogs/modules/markdown"
. "github.com/smartystreets/goconvey/convey"
. "github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/markup"
)
func TestRepo(t *testing.T) {
@@ -24,7 +25,7 @@ func TestRepo(t *testing.T) {
Convey("It should be nil even if other settings are present", func() {
repo.EnableExternalTracker = false
repo.ExternalTrackerFormat = "http://someurl.com/{user}/{repo}/{issue}"
repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_NUMERIC
repo.ExternalTrackerStyle = markup.ISSUE_NAME_STYLE_NUMERIC
So(repo.ComposeMetas(), ShouldEqual, map[string]string(nil))
})
})
@@ -33,17 +34,17 @@ func TestRepo(t *testing.T) {
repo.EnableExternalTracker = true
Convey("It should default to numeric issue style", func() {
metas := repo.ComposeMetas()
So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_NUMERIC)
So(metas["style"], ShouldEqual, markup.ISSUE_NAME_STYLE_NUMERIC)
})
Convey("It should pass through numeric issue style setting", func() {
repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_NUMERIC
repo.ExternalTrackerStyle = markup.ISSUE_NAME_STYLE_NUMERIC
metas := repo.ComposeMetas()
So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_NUMERIC)
So(metas["style"], ShouldEqual, markup.ISSUE_NAME_STYLE_NUMERIC)
})
Convey("It should pass through alphanumeric issue style setting", func() {
repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_ALPHANUMERIC
repo.ExternalTrackerStyle = markup.ISSUE_NAME_STYLE_ALPHANUMERIC
metas := repo.ComposeMetas()
So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_ALPHANUMERIC)
So(metas["style"], ShouldEqual, markup.ISSUE_NAME_STYLE_ALPHANUMERIC)
})
Convey("It should contain the user name", func() {
metas := repo.ComposeMetas()

View File

@@ -32,7 +32,6 @@ import (
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/avatar"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/setting"
)
@@ -114,8 +113,6 @@ func (u *User) BeforeUpdate() {
func (u *User) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "full_name":
u.FullName = markdown.Sanitizer.Sanitize(u.FullName)
case "created_unix":
u.Created = time.Unix(u.CreatedUnix, 0).Local()
case "updated_unix":
@@ -707,7 +704,6 @@ func updateUser(e Engine, u *User) error {
u.Website = base.TruncateString(u.Website, 255)
u.Description = base.TruncateString(u.Description, 255)
u.FullName = markdown.Sanitizer.Sanitize(u.FullName)
_, err := e.Id(u.ID).AllCols().Update(u)
return err
}
@@ -896,7 +892,7 @@ func getUserByID(e Engine, id int64) (*User, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrUserNotExist{id, ""}
return nil, errors.UserNotExist{id, ""}
}
return u, nil
}
@@ -912,7 +908,7 @@ func GetAssigneeByID(repo *Repository, userID int64) (*User, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrUserNotExist{userID, ""}
return nil, errors.UserNotExist{userID, ""}
}
return GetUserByID(userID)
}
@@ -920,14 +916,14 @@ func GetAssigneeByID(repo *Repository, userID int64) (*User, error) {
// GetUserByName returns user by given name.
func GetUserByName(name string) (*User, error) {
if len(name) == 0 {
return nil, ErrUserNotExist{0, name}
return nil, errors.UserNotExist{0, name}
}
u := &User{LowerName: strings.ToLower(name)}
has, err := x.Get(u)
if err != nil {
return nil, err
} else if !has {
return nil, ErrUserNotExist{0, name}
return nil, errors.UserNotExist{0, name}
}
return u, nil
}
@@ -1005,7 +1001,7 @@ func ValidateCommitsWithEmails(oldCommits *list.List) *list.List {
// GetUserByEmail returns the user object by given e-mail if exists.
func GetUserByEmail(email string) (*User, error) {
if len(email) == 0 {
return nil, ErrUserNotExist{0, "email"}
return nil, errors.UserNotExist{0, "email"}
}
email = strings.ToLower(email)
@@ -1029,7 +1025,7 @@ func GetUserByEmail(email string) (*User, error) {
return GetUserByID(emailAddress.UID)
}
return nil, ErrUserNotExist{0, email}
return nil, errors.UserNotExist{0, email}
}
type SearchUserOptions struct {

View File

@@ -177,7 +177,7 @@ func MakeEmailPrimary(email *EmailAddress) error {
if err != nil {
return err
} else if !has {
return ErrUserNotExist{email.UID, ""}
return errors.UserNotExist{email.UID, ""}
}
// Make sure the former primary email doesn't disappear.

View File

@@ -21,6 +21,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/httplib"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
@@ -241,7 +242,7 @@ func getWebhook(bean *Webhook) (*Webhook, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrWebhookNotExist{bean.ID}
return nil, errors.WebhookNotExist{bean.ID}
}
return bean, nil
}
@@ -494,6 +495,21 @@ func createHookTask(e Engine, t *HookTask) error {
return err
}
// GetHookTaskOfWebhookByUUID returns hook task of given webhook by UUID.
func GetHookTaskOfWebhookByUUID(webhookID int64, uuid string) (*HookTask, error) {
hookTask := &HookTask{
HookID: webhookID,
UUID: uuid,
}
has, err := x.Get(hookTask)
if err != nil {
return nil, err
} else if !has {
return nil, errors.HookTaskNotExist{webhookID, uuid}
}
return hookTask, nil
}
// UpdateHookTask updates information of hook task.
func UpdateHookTask(t *HookTask) error {
_, err := x.Id(t.ID).AllCols().Update(t)
@@ -586,8 +602,8 @@ func prepareHookTasks(e Engine, repo *Repository, event HookEventType, p api.Pay
}
// It's safe to fail when the whole function is called during hook execution
// because resource released after exit.
// FIXME: need a more safe way to not call this function if it's during hook execution.
// because resource released after exit. Also, there is no process started to
// consume this input during hook execution.
go HookQueue.Add(repo.ID)
return nil
}
@@ -704,7 +720,7 @@ func (t *HookTask) deliver() {
// TODO: shoot more hooks at same time.
func DeliverHooks() {
tasks := make([]*HookTask, 0, 10)
x.Where("is_delivered=?", false).Iterate(new(HookTask),
x.Where("is_delivered = ?", false).Iterate(new(HookTask),
func(idx int, bean interface{}) error {
t := bean.(*HookTask)
t.deliver()
@@ -725,7 +741,7 @@ func DeliverHooks() {
HookQueue.Remove(repoID)
tasks = make([]*HookTask, 0, 5)
if err := x.Where("repo_id=? AND is_delivered=?", repoID, false).Find(&tasks); err != nil {
if err := x.Where("repo_id = ?", repoID).And("is_delivered = ?", false).Find(&tasks); err != nil {
log.Error(4, "Get repository [%s] hook tasks: %v", repoID, err)
continue
}

View File

@@ -14,6 +14,7 @@ import (
"gopkg.in/macaron.v1"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/setting"
)
@@ -65,8 +66,8 @@ func SignedInID(ctx *macaron.Context, sess session.Store) int64 {
}
if id, ok := uid.(int64); ok {
if _, err := models.GetUserByID(id); err != nil {
if !models.IsErrUserNotExist(err) {
log.Error(2, "GetUserById: %v", err)
if !errors.IsUserNotExist(err) {
log.Error(2, "GetUserByID: %v", err)
}
return 0
}
@@ -90,7 +91,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
if len(webAuthUser) > 0 {
u, err := models.GetUserByName(webAuthUser)
if err != nil {
if !models.IsErrUserNotExist(err) {
if !errors.IsUserNotExist(err) {
log.Error(4, "GetUserByName: %v", err)
return nil, false
}
@@ -125,7 +126,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
u, err := models.UserSignIn(uname, passwd)
if err != nil {
if !models.IsErrUserNotExist(err) {
if !errors.IsUserNotExist(err) {
log.Error(4, "UserSignIn: %v", err)
}
return nil, false

77
modules/base/file.go Normal file
View File

@@ -0,0 +1,77 @@
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package base
import (
"fmt"
"math"
"net/http"
"strings"
)
// IsTextFile returns true if file content format is plain text or empty.
func IsTextFile(data []byte) bool {
if len(data) == 0 {
return true
}
return strings.Contains(http.DetectContentType(data), "text/")
}
func IsImageFile(data []byte) bool {
return strings.Contains(http.DetectContentType(data), "image/")
}
func IsPDFFile(data []byte) bool {
return strings.Contains(http.DetectContentType(data), "application/pdf")
}
func IsVideoFile(data []byte) bool {
return strings.Contains(http.DetectContentType(data), "video/")
}
const (
Byte = 1
KByte = Byte * 1024
MByte = KByte * 1024
GByte = MByte * 1024
TByte = GByte * 1024
PByte = TByte * 1024
EByte = PByte * 1024
)
var bytesSizeTable = map[string]uint64{
"b": Byte,
"kb": KByte,
"mb": MByte,
"gb": GByte,
"tb": TByte,
"pb": PByte,
"eb": EByte,
}
func logn(n, b float64) float64 {
return math.Log(n) / math.Log(b)
}
func humanateBytes(s uint64, base float64, sizes []string) string {
if s < 10 {
return fmt.Sprintf("%d B", s)
}
e := math.Floor(logn(float64(s), base))
suffix := sizes[int(e)]
val := float64(s) / math.Pow(base, math.Floor(e))
f := "%.0f"
if val < 10 {
f = "%.1f"
}
return fmt.Sprintf(f+" %s", val, suffix)
}
// FileSize calculates the file size and generate user-friendly string.
func FileSize(s int64) string {
sizes := []string{"B", "KB", "MB", "GB", "TB", "PB", "EB"}
return humanateBytes(uint64(s), 1024, sizes)
}

View File

@@ -12,9 +12,7 @@ import (
"encoding/hex"
"fmt"
"html/template"
"math"
"math/big"
"net/http"
"strings"
"time"
"unicode"
@@ -346,51 +344,6 @@ func TimeSince(t time.Time, lang string) template.HTML {
return template.HTML(fmt.Sprintf(`<span class="time-since" title="%s">%s</span>`, t.Format(setting.TimeFormat), timeSince(t, lang)))
}
const (
Byte = 1
KByte = Byte * 1024
MByte = KByte * 1024
GByte = MByte * 1024
TByte = GByte * 1024
PByte = TByte * 1024
EByte = PByte * 1024
)
var bytesSizeTable = map[string]uint64{
"b": Byte,
"kb": KByte,
"mb": MByte,
"gb": GByte,
"tb": TByte,
"pb": PByte,
"eb": EByte,
}
func logn(n, b float64) float64 {
return math.Log(n) / math.Log(b)
}
func humanateBytes(s uint64, base float64, sizes []string) string {
if s < 10 {
return fmt.Sprintf("%d B", s)
}
e := math.Floor(logn(float64(s), base))
suffix := sizes[int(e)]
val := float64(s) / math.Pow(base, math.Floor(e))
f := "%.0f"
if val < 10 {
f = "%.1f"
}
return fmt.Sprintf(f+" %s", val, suffix)
}
// FileSize calculates the file size and generate user-friendly string.
func FileSize(s int64) string {
sizes := []string{"B", "KB", "MB", "GB", "TB", "PB", "EB"}
return humanateBytes(uint64(s), 1024, sizes)
}
// Subtract deals with subtraction of all types of number.
func Subtract(left interface{}, right interface{}) interface{} {
var rleft, rright int64
@@ -491,23 +444,3 @@ func Int64sToMap(ints []int64) map[int64]bool {
func IsLetter(ch rune) bool {
return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch)
}
// IsTextFile returns true if file content format is plain text or empty.
func IsTextFile(data []byte) bool {
if len(data) == 0 {
return true
}
return strings.Index(http.DetectContentType(data), "text/") != -1
}
func IsImageFile(data []byte) bool {
return strings.Index(http.DetectContentType(data), "image/") != -1
}
func IsPDFFile(data []byte) bool {
return strings.Index(http.DetectContentType(data), "application/pdf") != -1
}
func IsVideoFile(data []byte) bool {
return strings.Index(http.DetectContentType(data), "video/") != -1
}

File diff suppressed because one or more lines are too long

View File

@@ -42,6 +42,13 @@ type Context struct {
Org *Organization
}
func (ctx *Context) UserID() int64 {
if !ctx.IsSigned {
return 0
}
return ctx.User.ID
}
// HasError returns true if error occurs in form validation.
func (ctx *Context) HasApiError() bool {
hasErr, ok := ctx.Data["HasError"]
@@ -72,12 +79,17 @@ func (ctx *Context) HasValue(name string) bool {
return ok
}
// HTML calls Context.HTML and converts template name to string.
// HTML responses template with given status.
func (ctx *Context) HTML(status int, name base.TplName) {
log.Trace("Template: %s", name)
ctx.Context.HTML(status, string(name))
}
// Success responses template with status 200.
func (c *Context) Success(name base.TplName) {
c.HTML(200, name)
}
// RenderWithErr used for page has form validation but need to prompt error to users.
func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, f interface{}) {
if f != nil {

View File

@@ -10,6 +10,7 @@ import (
"gopkg.in/macaron.v1"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/setting"
)
@@ -49,11 +50,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
var err error
ctx.Org.Organization, err = models.GetUserByName(orgName)
if err != nil {
if models.IsErrUserNotExist(err) {
ctx.Handle(404, "GetUserByName", err)
} else {
ctx.Handle(500, "GetUserByName", err)
}
ctx.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
return
}
org := ctx.Org.Organization

View File

@@ -11,13 +11,13 @@ import (
"strings"
"github.com/Unknwon/com"
log "gopkg.in/clog.v1"
"gopkg.in/editorconfig/editorconfig-core-go.v1"
"gopkg.in/macaron.v1"
"github.com/gogits/git-module"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/setting"
)
@@ -108,22 +108,6 @@ func (r *Repository) PullRequestURL(baseBranch, headBranch string) string {
return fmt.Sprintf("%s/compare/%s...%s:%s", repoLink, baseBranch, r.Owner.Name, headBranch)
}
func RetrieveBaseRepo(ctx *Context, repo *models.Repository) {
// Non-fork repository will not return error in this method.
if err := repo.GetBaseRepo(); err != nil {
if models.IsErrRepoNotExist(err) {
repo.IsFork = false
repo.ForkID = 0
return
}
ctx.Handle(500, "GetBaseRepo", err)
return
} else if err = repo.BaseRepo.GetOwner(); err != nil {
ctx.Handle(500, "BaseRepo.GetOwner", err)
return
}
}
// composeGoGetImport returns go-get-import meta content.
func composeGoGetImport(owner, repo string) string {
return path.Join(setting.Domain, setting.AppSubUrl, owner, repo)
@@ -142,19 +126,22 @@ func earlyResponseForGoGetMeta(ctx *Context) {
})))
}
func RepoAssignment(args ...bool) macaron.Handler {
// [0]: issues, [1]: wiki
func RepoAssignment(pages ...bool) macaron.Handler {
return func(ctx *Context) {
var (
displayBare bool // To display bare page if it is a bare repo.
owner *models.User
err error
isIssuesPage bool
isWikiPage bool
)
if len(args) >= 1 {
displayBare = args[0]
}
var (
owner *models.User
err error
)
if len(pages) > 0 {
isIssuesPage = pages[0]
}
if len(pages) > 1 {
isWikiPage = pages[1]
}
ownerName := ctx.Params(":username")
repoName := strings.TrimSuffix(ctx.Params(":reponame"), ".git")
@@ -169,7 +156,7 @@ func RepoAssignment(args ...bool) macaron.Handler {
} else {
owner, err = models.GetUserByName(ownerName)
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
if ctx.Query("go-get") == "1" {
earlyResponseForGoGetMeta(ctx)
return
@@ -187,7 +174,7 @@ func RepoAssignment(args ...bool) macaron.Handler {
// Get repository.
repo, err := models.GetRepositoryByName(owner.ID, repoName)
if err != nil {
if models.IsErrRepoNotExist(err) {
if errors.IsRepoNotExist(err) {
if ctx.Query("go-get") == "1" {
earlyResponseForGoGetMeta(ctx)
return
@@ -197,20 +184,20 @@ func RepoAssignment(args ...bool) macaron.Handler {
ctx.Handle(500, "GetRepositoryByName", err)
}
return
} else if err = repo.GetOwner(); err != nil {
ctx.Handle(500, "GetOwner", err)
return
}
ctx.Repo.Repository = repo
ctx.Data["RepoName"] = ctx.Repo.Repository.Name
ctx.Data["IsBareRepo"] = ctx.Repo.Repository.IsBare
ctx.Repo.RepoLink = repo.Link()
ctx.Data["RepoLink"] = ctx.Repo.RepoLink
ctx.Data["RepoRelPath"] = ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name
// Admin has super access.
if ctx.IsSigned && ctx.User.IsAdmin {
ctx.Repo.AccessMode = models.ACCESS_MODE_OWNER
} else {
var userID int64
if ctx.IsSigned {
userID = ctx.User.ID
}
mode, err := models.AccessLevel(userID, repo)
mode, err := models.AccessLevel(ctx.UserID(), repo)
if err != nil {
ctx.Handle(500, "AccessLevel", err)
return
@@ -218,16 +205,40 @@ func RepoAssignment(args ...bool) macaron.Handler {
ctx.Repo.AccessMode = mode
}
// Check access.
// Check access
if ctx.Repo.AccessMode == models.ACCESS_MODE_NONE {
if ctx.Query("go-get") == "1" {
earlyResponseForGoGetMeta(ctx)
return
}
ctx.NotFound()
return
// Redirect to any accessible page if not yet on it
if repo.IsPartialPublic() &&
(!(isIssuesPage || isWikiPage) ||
(isIssuesPage && !repo.CanGuestViewIssues()) ||
(isWikiPage && !repo.CanGuestViewWiki())) {
switch {
case repo.CanGuestViewIssues():
ctx.Redirect(repo.Link() + "/issues")
case repo.CanGuestViewWiki():
ctx.Redirect(repo.Link() + "/wiki")
default:
ctx.NotFound()
}
return
}
// Response 404 if user is on completely private repository or possible accessible page but owner doesn't enabled
if !repo.IsPartialPublic() ||
(isIssuesPage && !repo.CanGuestViewIssues()) ||
(isWikiPage && !repo.CanGuestViewWiki()) {
ctx.NotFound()
return
}
ctx.Repo.Repository.EnableIssues = repo.CanGuestViewIssues()
ctx.Repo.Repository.EnableWiki = repo.CanGuestViewWiki()
}
ctx.Data["HasAccess"] = true
if repo.IsMirror {
ctx.Repo.Mirror, err = models.GetMirrorByRepoID(repo.ID)
@@ -240,19 +251,12 @@ func RepoAssignment(args ...bool) macaron.Handler {
ctx.Data["Mirror"] = ctx.Repo.Mirror
}
ctx.Repo.Repository = repo
ctx.Data["RepoName"] = ctx.Repo.Repository.Name
ctx.Data["IsBareRepo"] = ctx.Repo.Repository.IsBare
gitRepo, err := git.OpenRepository(models.RepoPath(ownerName, repoName))
if err != nil {
ctx.Handle(500, "RepoAssignment Invalid repo "+models.RepoPath(ownerName, repoName), err)
return
}
ctx.Repo.GitRepo = gitRepo
ctx.Repo.RepoLink = repo.Link()
ctx.Data["RepoLink"] = ctx.Repo.RepoLink
ctx.Data["RepoRelPath"] = ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name
tags, err := ctx.Repo.GitRepo.GetTags()
if err != nil {
@@ -281,15 +285,6 @@ func RepoAssignment(args ...bool) macaron.Handler {
// repo is bare and display enable
if ctx.Repo.Repository.IsBare {
log.Trace("Bare repository: %s", ctx.Repo.RepoLink)
// NOTE: to prevent templating error
ctx.Data["BranchName"] = ""
if displayBare {
if !ctx.Repo.IsAdmin() {
ctx.Flash.Info(ctx.Tr("repo.repo_is_empty"), true)
}
ctx.HTML(200, "repo/bare")
}
return
}
@@ -320,6 +315,8 @@ func RepoAssignment(args ...bool) macaron.Handler {
ctx.Data["GoDocDirectory"] = prefix + "{/dir}"
ctx.Data["GoDocFile"] = prefix + "{/dir}/{file}#L{line}"
}
ctx.Data["IsGuest"] = !ctx.Repo.HasAccess()
}
}
@@ -426,23 +423,24 @@ func RepoRef() macaron.Handler {
ctx.Data["IsViewTag"] = ctx.Repo.IsViewTag
ctx.Data["IsViewCommit"] = ctx.Repo.IsViewCommit
if ctx.Repo.Repository.IsFork {
RetrieveBaseRepo(ctx, ctx.Repo.Repository)
if ctx.Written() {
return
}
}
// People who have push access or have fored repository can propose a new pull request.
if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
// Pull request is allowed if this is a fork repository
// and base repository accepts pull requests.
if ctx.Repo.Repository.BaseRepo != nil {
if ctx.Repo.Repository.BaseRepo.AllowsPulls() {
ctx.Data["BaseRepo"] = ctx.Repo.Repository.BaseRepo
ctx.Repo.PullRequest.BaseRepo = ctx.Repo.Repository.BaseRepo
ctx.Repo.PullRequest.Allowed = true
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
// In-repository pull requests has higher priority than cross-repository if user is viewing
// base repository and 1) has write access to it 2) has forked it.
if ctx.Repo.IsWriter() {
ctx.Data["BaseRepo"] = ctx.Repo.Repository.BaseRepo
ctx.Repo.PullRequest.BaseRepo = ctx.Repo.Repository.BaseRepo
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
} else {
ctx.Data["BaseRepo"] = ctx.Repo.Repository
ctx.Repo.PullRequest.BaseRepo = ctx.Repo.Repository
ctx.Repo.PullRequest.HeadInfo = ctx.User.Name + ":" + ctx.Repo.BranchName
}
}
} else {
// Or, this is repository accepts pull requests between branches.

View File

@@ -92,9 +92,11 @@ type RepoSetting struct {
// Advanced settings
EnableWiki bool
AllowPublicWiki bool
EnableExternalWiki bool
ExternalWikiURL string
EnableIssues bool
AllowPublicIssues bool
EnableExternalTracker bool
ExternalTrackerURL string
TrackerURLFormat string

View File

@@ -29,6 +29,7 @@ type Install struct {
HTTPPort string `binding:"Required"`
AppUrl string `binding:"Required"`
LogRootPath string `binding:"Required"`
EnableConsoleMode bool
SMTPHost string
SMTPFrom string

View File

@@ -13,7 +13,7 @@ import (
"gopkg.in/macaron.v1"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/markup"
"github.com/gogits/gogs/modules/setting"
)
@@ -174,7 +174,7 @@ func composeTplData(subject, body, link string) map[string]interface{} {
func composeIssueMessage(issue Issue, repo Repository, doer User, tplName base.TplName, tos []string, info string) *Message {
subject := issue.MailSubject()
body := string(markdown.RenderSpecialLink([]byte(issue.Content()), repo.HTMLURL(), repo.ComposeMetas()))
body := string(markup.RenderSpecialLink([]byte(issue.Content()), repo.HTMLURL(), repo.ComposeMetas()))
data := composeTplData(subject, body, issue.HTMLURL())
data["Doer"] = doer
content, err := mailRender.HTMLString(string(tplName), data)

167
modules/markup/markdown.go Normal file
View File

@@ -0,0 +1,167 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup
import (
"bytes"
"fmt"
"path"
"path/filepath"
"regexp"
"strings"
"github.com/russross/blackfriday"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/setting"
)
// IsMarkdownFile reports whether name looks like a Markdown file based on its extension.
func IsMarkdownFile(name string) bool {
extension := strings.ToLower(filepath.Ext(name))
for _, ext := range setting.Markdown.FileExtensions {
if strings.ToLower(ext) == extension {
return true
}
}
return false
}
// MarkdownRenderer is a extended version of underlying Markdown render object.
type MarkdownRenderer struct {
blackfriday.Renderer
urlPrefix string
}
var validLinksPattern = regexp.MustCompile(`^[a-z][\w-]+://|^mailto:`)
// isLink reports whether link fits valid format.
func isLink(link []byte) bool {
return validLinksPattern.Match(link)
}
// Link defines how formal links should be processed to produce corresponding HTML elements.
func (r *MarkdownRenderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) {
if len(link) > 0 && !isLink(link) {
if link[0] != '#' {
link = []byte(path.Join(r.urlPrefix, string(link)))
}
}
r.Renderer.Link(out, link, title, content)
}
// AutoLink defines how auto-detected links should be processed to produce corresponding HTML elements.
// Reference for kind: https://github.com/russross/blackfriday/blob/master/markdown.go#L69-L76
func (r *MarkdownRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) {
if kind != blackfriday.LINK_TYPE_NORMAL {
r.Renderer.AutoLink(out, link, kind)
return
}
// Since this method could only possibly serve one link at a time,
// we do not need to find all.
if bytes.HasPrefix(link, []byte(setting.AppUrl)) {
m := CommitPattern.Find(link)
if m != nil {
m = bytes.TrimSpace(m)
i := strings.Index(string(m), "commit/")
j := strings.Index(string(m), "#")
if j == -1 {
j = len(m)
}
out.WriteString(fmt.Sprintf(` <code><a href="%s">%s</a></code>`, m, base.ShortSha(string(m[i+7:j]))))
return
}
m = IssueFullPattern.Find(link)
if m != nil {
m = bytes.TrimSpace(m)
i := strings.Index(string(m), "issues/")
j := strings.Index(string(m), "#")
if j == -1 {
j = len(m)
}
index := string(m[i+7 : j])
fullRepoURL := setting.AppUrl + strings.TrimPrefix(r.urlPrefix, "/")
var link string
if strings.HasPrefix(string(m), fullRepoURL) {
// Use a short issue reference if the URL refers to this repository
link = fmt.Sprintf(`<a href="%s">#%s</a>`, m, index)
} else {
// Use a cross-repository issue reference if the URL refers to a different repository
repo := string(m[len(setting.AppUrl) : i-1])
link = fmt.Sprintf(`<a href="%s">%s#%s</a>`, m, repo, index)
}
out.WriteString(link)
return
}
}
r.Renderer.AutoLink(out, link, kind)
}
// ListItem defines how list items should be processed to produce corresponding HTML elements.
func (options *MarkdownRenderer) ListItem(out *bytes.Buffer, text []byte, flags int) {
// Detect procedures to draw checkboxes.
switch {
case bytes.HasPrefix(text, []byte("[ ] ")):
text = append([]byte(`<input type="checkbox" disabled="" />`), text[3:]...)
case bytes.HasPrefix(text, []byte("[x] ")):
text = append([]byte(`<input type="checkbox" disabled="" checked="" />`), text[3:]...)
}
options.Renderer.ListItem(out, text, flags)
}
// RawMarkdown renders Markdown to HTML without handling special links.
func RawMarkdown(body []byte, urlPrefix string) []byte {
htmlFlags := 0
htmlFlags |= blackfriday.HTML_SKIP_STYLE
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
if setting.Smartypants.Enabled {
htmlFlags |= blackfriday.HTML_USE_SMARTYPANTS
if setting.Smartypants.Fractions {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_FRACTIONS
}
if setting.Smartypants.Dashes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_DASHES
}
if setting.Smartypants.LatexDashes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_LATEX_DASHES
}
if setting.Smartypants.AngledQuotes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_ANGLED_QUOTES
}
}
renderer := &MarkdownRenderer{
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
urlPrefix: urlPrefix,
}
// set up the parser
extensions := 0
extensions |= blackfriday.EXTENSION_NO_INTRA_EMPHASIS
extensions |= blackfriday.EXTENSION_TABLES
extensions |= blackfriday.EXTENSION_FENCED_CODE
extensions |= blackfriday.EXTENSION_AUTOLINK
extensions |= blackfriday.EXTENSION_STRIKETHROUGH
extensions |= blackfriday.EXTENSION_SPACE_HEADERS
extensions |= blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK
if setting.Markdown.EnableHardLineBreak {
extensions |= blackfriday.EXTENSION_HARD_LINE_BREAK
}
body = blackfriday.Markdown(body, renderer, extensions)
return body
}
// Markdown takes a string or []byte and renders to HTML in Markdown syntax with special links.
func Markdown(input interface{}, urlPrefix string, metas map[string]string) []byte {
return Render(MARKDOWN, input, urlPrefix, metas)
}

View File

@@ -0,0 +1,111 @@
// Copyright 2016 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup_test
import (
"bytes"
"strings"
"testing"
"github.com/russross/blackfriday"
. "github.com/smartystreets/goconvey/convey"
. "github.com/gogits/gogs/modules/markup"
"github.com/gogits/gogs/modules/setting"
)
func Test_IsMarkdownFile(t *testing.T) {
setting.Markdown.FileExtensions = strings.Split(".md,.markdown,.mdown,.mkd", ",")
Convey("Detect Markdown file extension", t, func() {
testCases := []struct {
ext string
match bool
}{
{".md", true},
{".markdown", true},
{".mdown", true},
{".mkd", true},
{".org", false},
{".rst", false},
{".asciidoc", false},
}
for _, tc := range testCases {
So(IsMarkdownFile(tc.ext), ShouldEqual, tc.match)
}
})
}
func Test_Markdown(t *testing.T) {
Convey("Rendering an issue URL", t, func() {
setting.AppUrl = "http://localhost:3000/"
htmlFlags := 0
htmlFlags |= blackfriday.HTML_SKIP_STYLE
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
renderer := &MarkdownRenderer{
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
}
buffer := new(bytes.Buffer)
Convey("To the internal issue tracker", func() {
Convey("It should render valid issue URLs", func() {
testCases := []string{
"http://localhost:3000/user/repo/issues/3333", "<a href=\"http://localhost:3000/user/repo/issues/3333\">#3333</a>",
}
for i := 0; i < len(testCases); i += 2 {
renderer.AutoLink(buffer, []byte(testCases[i]), blackfriday.LINK_TYPE_NORMAL)
line, _ := buffer.ReadString(0)
So(line, ShouldEqual, testCases[i+1])
}
})
Convey("It should render but not change non-issue URLs", func() {
testCases := []string{
"http://1111/2222/ssss-issues/3333?param=blah&blahh=333", "<a href=\"http://1111/2222/ssss-issues/3333?param=blah&amp;blahh=333\">http://1111/2222/ssss-issues/3333?param=blah&amp;blahh=333</a>",
"http://test.com/issues/33333", "<a href=\"http://test.com/issues/33333\">http://test.com/issues/33333</a>",
"http://test.com/issues/3", "<a href=\"http://test.com/issues/3\">http://test.com/issues/3</a>",
"http://issues/333", "<a href=\"http://issues/333\">http://issues/333</a>",
"https://issues/333", "<a href=\"https://issues/333\">https://issues/333</a>",
"http://tissues/0", "<a href=\"http://tissues/0\">http://tissues/0</a>",
}
for i := 0; i < len(testCases); i += 2 {
renderer.AutoLink(buffer, []byte(testCases[i]), blackfriday.LINK_TYPE_NORMAL)
line, _ := buffer.ReadString(0)
So(line, ShouldEqual, testCases[i+1])
}
})
})
})
Convey("Rendering a commit URL", t, func() {
setting.AppUrl = "http://localhost:3000/"
htmlFlags := 0
htmlFlags |= blackfriday.HTML_SKIP_STYLE
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
renderer := &MarkdownRenderer{
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
}
buffer := new(bytes.Buffer)
Convey("To the internal issue tracker", func() {
Convey("It should correctly convert URLs", func() {
testCases := []string{
"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae", " <code><a href=\"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae\">d8a994ef24</a></code>",
"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2", " <code><a href=\"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2\">d8a994ef24</a></code>",
"https://external-link.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2", "<a href=\"https://external-link.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2\">https://external-link.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2</a>",
"https://commit/d8a994ef243349f321568f9e36d5c3f444b99cae", "<a href=\"https://commit/d8a994ef243349f321568f9e36d5c3f444b99cae\">https://commit/d8a994ef243349f321568f9e36d5c3f444b99cae</a>",
}
for i := 0; i < len(testCases); i += 2 {
renderer.AutoLink(buffer, []byte(testCases[i]), blackfriday.LINK_TYPE_NORMAL)
line, _ := buffer.ReadString(0)
So(line, ShouldEqual, testCases[i+1])
}
})
})
})
}

View File

@@ -1,79 +1,33 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markdown
package markup
import (
"bytes"
"fmt"
"io"
"path"
"path/filepath"
"regexp"
"strings"
"github.com/Unknwon/com"
"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday"
"golang.org/x/net/html"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/setting"
)
// IsReadmeFile reports whether name looks like a README file based on its extension.
func IsReadmeFile(name string) bool {
return strings.HasPrefix(strings.ToLower(name), "readme")
}
const (
ISSUE_NAME_STYLE_NUMERIC = "numeric"
ISSUE_NAME_STYLE_ALPHANUMERIC = "alphanumeric"
)
var Sanitizer = bluemonday.UGCPolicy()
// BuildSanitizer initializes sanitizer with allowed attributes based on settings.
// This function should only be called once during entire application lifecycle.
func BuildSanitizer() {
// Normal markdown-stuff
Sanitizer.AllowAttrs("class").Matching(regexp.MustCompile(`[\p{L}\p{N}\s\-_',:\[\]!\./\\\(\)&]*`)).OnElements("code")
// Checkboxes
Sanitizer.AllowAttrs("type").Matching(regexp.MustCompile(`^checkbox$`)).OnElements("input")
Sanitizer.AllowAttrs("checked", "disabled").OnElements("input")
// Custom URL-Schemes
Sanitizer.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
}
var validLinksPattern = regexp.MustCompile(`^[a-z][\w-]+://|^mailto:`)
// isLink reports whether link fits valid format.
func isLink(link []byte) bool {
return validLinksPattern.Match(link)
}
// IsMarkdownFile reports whether name looks like a Markdown file
// based on its extension.
func IsMarkdownFile(name string) bool {
extension := strings.ToLower(filepath.Ext(name))
for _, ext := range setting.Markdown.FileExtensions {
if strings.ToLower(ext) == extension {
return true
}
}
return false
}
// IsReadmeFile reports whether name looks like a README file
// based on its extension.
func IsReadmeFile(name string) bool {
name = strings.ToLower(name)
if len(name) < 6 {
return false
} else if len(name) == 6 {
return name == "readme"
}
return name[:7] == "readme."
}
var (
// MentionPattern matches string that mentions someone, e.g. @Unknwon
MentionPattern = regexp.MustCompile(`(\s|^|\W)@[0-9a-zA-Z-_\.]+`)
@@ -109,94 +63,6 @@ func FindAllMentions(content string) []string {
return mentions
}
// Renderer is a extended version of underlying render object.
type Renderer struct {
blackfriday.Renderer
urlPrefix string
}
// Link defines how formal links should be processed to produce corresponding HTML elements.
func (r *Renderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) {
if len(link) > 0 && !isLink(link) {
if link[0] != '#' {
link = []byte(path.Join(r.urlPrefix, string(link)))
}
}
r.Renderer.Link(out, link, title, content)
}
// AutoLink defines how auto-detected links should be processed to produce corresponding HTML elements.
// Reference for kind: https://github.com/russross/blackfriday/blob/master/markdown.go#L69-L76
func (r *Renderer) AutoLink(out *bytes.Buffer, link []byte, kind int) {
if kind != blackfriday.LINK_TYPE_NORMAL {
r.Renderer.AutoLink(out, link, kind)
return
}
// Since this method could only possibly serve one link at a time,
// we do not need to find all.
if bytes.HasPrefix(link, []byte(setting.AppUrl)) {
m := CommitPattern.Find(link)
if m != nil {
m = bytes.TrimSpace(m)
i := strings.Index(string(m), "commit/")
j := strings.Index(string(m), "#")
if j == -1 {
j = len(m)
}
out.WriteString(fmt.Sprintf(` <code><a href="%s">%s</a></code>`, m, base.ShortSha(string(m[i+7:j]))))
return
}
m = IssueFullPattern.Find(link)
if m != nil {
m = bytes.TrimSpace(m)
i := strings.Index(string(m), "issues/")
j := strings.Index(string(m), "#")
if j == -1 {
j = len(m)
}
index := string(m[i+7 : j])
fullRepoURL := setting.AppUrl + strings.TrimPrefix(r.urlPrefix, "/")
var link string
if strings.HasPrefix(string(m), fullRepoURL) {
// Use a short issue reference if the URL refers to this repository
link = fmt.Sprintf(`<a href="%s">#%s</a>`, m, index)
} else {
// Use a cross-repository issue reference if the URL refers to a different repository
repo := string(m[len(setting.AppUrl) : i-1])
link = fmt.Sprintf(`<a href="%s">%s#%s</a>`, m, repo, index)
}
out.WriteString(link)
return
}
}
r.Renderer.AutoLink(out, link, kind)
}
// ListItem defines how list items should be processed to produce corresponding HTML elements.
func (options *Renderer) ListItem(out *bytes.Buffer, text []byte, flags int) {
// Detect procedures to draw checkboxes.
switch {
case bytes.HasPrefix(text, []byte("[ ] ")):
text = append([]byte(`<input type="checkbox" disabled="" />`), text[3:]...)
case bytes.HasPrefix(text, []byte("[x] ")):
text = append([]byte(`<input type="checkbox" disabled="" checked="" />`), text[3:]...)
}
options.Renderer.ListItem(out, text, flags)
}
// Note: this section is for purpose of increase performance and
// reduce memory allocation at runtime since they are constant literals.
var (
pound = []byte("#")
space = " "
spaceEncoded = "%20"
)
// cutoutVerbosePrefix cutouts URL prefix including sub-path to
// return a clean unified string of request URL path.
func cutoutVerbosePrefix(prefix string) string {
@@ -246,6 +112,10 @@ func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string, metas map[string
return rawBytes
}
// Note: this section is for purpose of increase performance and
// reduce memory allocation at runtime since they are constant literals.
var pound = []byte("#")
// RenderCrossReferenceIssueIndexPattern renders issue indexes from other repositories to corresponding links.
func RenderCrossReferenceIssueIndexPattern(rawBytes []byte, urlPrefix string, metas map[string]string) []byte {
ms := CrossReferenceIssueNumericPattern.FindAll(rawBytes, -1)
@@ -289,51 +159,6 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string, metas map[string]strin
return rawBytes
}
// RenderRaw renders Markdown to HTML without handling special links.
func RenderRaw(body []byte, urlPrefix string) []byte {
htmlFlags := 0
htmlFlags |= blackfriday.HTML_SKIP_STYLE
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
if setting.Smartypants.Enabled {
htmlFlags |= blackfriday.HTML_USE_SMARTYPANTS
if setting.Smartypants.Fractions {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_FRACTIONS
}
if setting.Smartypants.Dashes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_DASHES
}
if setting.Smartypants.LatexDashes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_LATEX_DASHES
}
if setting.Smartypants.AngledQuotes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_ANGLED_QUOTES
}
}
renderer := &Renderer{
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
urlPrefix: urlPrefix,
}
// set up the parser
extensions := 0
extensions |= blackfriday.EXTENSION_NO_INTRA_EMPHASIS
extensions |= blackfriday.EXTENSION_TABLES
extensions |= blackfriday.EXTENSION_FENCED_CODE
extensions |= blackfriday.EXTENSION_AUTOLINK
extensions |= blackfriday.EXTENSION_STRIKETHROUGH
extensions |= blackfriday.EXTENSION_SPACE_HEADERS
extensions |= blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK
if setting.Markdown.EnableHardLineBreak {
extensions |= blackfriday.EXTENSION_HARD_LINE_BREAK
}
body = blackfriday.Markdown(body, renderer, extensions)
return body
}
var (
leftAngleBracket = []byte("</")
rightAngleBracket = []byte(">")
@@ -343,8 +168,8 @@ var noEndTags = []string{"input", "br", "hr", "img"}
// wrapImgWithLink warps link to standalone <img> tags.
func wrapImgWithLink(urlPrefix string, buf *bytes.Buffer, token html.Token) {
var src, alt string
// Extract "src" and "alt" attributes
var src, alt string
for i := range token.Attr {
switch token.Attr[i].Key {
case "src":
@@ -399,9 +224,9 @@ func wrapImgWithLink(urlPrefix string, buf *bytes.Buffer, token html.Token) {
buf.WriteString(`</a>`)
}
// PostProcess treats different types of HTML differently,
// postProcessHTML treats different types of HTML differently,
// and only renders special links for plain text blocks.
func PostProcess(rawHTML []byte, urlPrefix string, metas map[string]string) []byte {
func postProcessHTML(rawHTML []byte, urlPrefix string, metas map[string]string) []byte {
startTags := make([]string, 0, 5)
buf := bytes.NewBuffer(nil)
tokenizer := html.NewTokenizer(bytes.NewReader(rawHTML))
@@ -475,16 +300,36 @@ OUTER_LOOP:
return rawHTML
}
// Render renders Markdown to HTML with special links.
func Render(rawBytes []byte, urlPrefix string, metas map[string]string) []byte {
urlPrefix = strings.Replace(urlPrefix, space, spaceEncoded, -1)
result := RenderRaw(rawBytes, urlPrefix)
result = PostProcess(result, urlPrefix, metas)
result = Sanitizer.SanitizeBytes(result)
return result
}
type Type string
// RenderString renders Markdown to HTML with special links and returns string type.
func RenderString(raw, urlPrefix string, metas map[string]string) string {
return string(Render([]byte(raw), urlPrefix, metas))
const (
UNRECOGNIZED Type = "unrecognized"
MARKDOWN Type = "markdown"
ORG_MODE Type = "orgmode"
)
// Render takes a string or []byte and renders to HTML in given type of syntax with special links.
func Render(typ Type, input interface{}, urlPrefix string, metas map[string]string) []byte {
var rawBytes []byte
switch v := input.(type) {
case []byte:
rawBytes = v
case string:
rawBytes = []byte(v)
default:
panic(fmt.Sprintf("unrecognized input content type: %T", input))
}
urlPrefix = strings.Replace(urlPrefix, " ", "%20", -1)
var rawHTML []byte
switch typ {
case MARKDOWN:
rawHTML = RawMarkdown(rawBytes, urlPrefix)
case ORG_MODE:
default:
return rawBytes // Do nothing if syntax type is not recognized
}
rawHTML = postProcessHTML(rawHTML, urlPrefix, metas)
return SanitizeBytes(rawHTML)
}

View File

@@ -1,17 +1,63 @@
package markdown_test
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup_test
import (
. "github.com/gogits/gogs/modules/markdown"
. "github.com/smartystreets/goconvey/convey"
"strings"
"testing"
"bytes"
. "github.com/smartystreets/goconvey/convey"
. "github.com/gogits/gogs/modules/markup"
"github.com/gogits/gogs/modules/setting"
"github.com/russross/blackfriday"
)
func TestMarkdown(t *testing.T) {
Convey("Rendering an issue mention", t, func() {
func Test_IsReadmeFile(t *testing.T) {
Convey("Detect README file extension", t, func() {
testCases := []struct {
ext string
match bool
}{
{"readme", true},
{"README", true},
{"readme.md", true},
{"readme.markdown", true},
{"readme.mdown", true},
{"readme.mkd", true},
{"readme.org", true},
{"readme.rst", true},
{"readme.asciidoc", true},
{"readme_ZH", true},
}
for _, tc := range testCases {
So(IsReadmeFile(tc.ext), ShouldEqual, tc.match)
}
})
}
func Test_FindAllMentions(t *testing.T) {
Convey("Find all mention patterns", t, func() {
testCases := []struct {
content string
matches string
}{
{"@Unknwon, what do you think?", "Unknwon"},
{"@Unknwon what do you think?", "Unknwon"},
{"Hi @Unknwon, sounds good to me", "Unknwon"},
{"cc/ @Unknwon @User", "Unknwon,User"},
}
for _, tc := range testCases {
So(strings.Join(FindAllMentions(tc.content), ","), ShouldEqual, tc.matches)
}
})
}
func Test_RenderIssueIndexPattern(t *testing.T) {
Convey("Rendering an issue reference", t, func() {
var (
urlPrefix = "/prefix"
metas map[string]string = nil
@@ -235,74 +281,4 @@ func TestMarkdown(t *testing.T) {
})
})
})
Convey("Rendering an issue URL", t, func() {
setting.AppUrl = "http://localhost:3000/"
htmlFlags := 0
htmlFlags |= blackfriday.HTML_SKIP_STYLE
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
renderer := &Renderer{
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
}
buffer := new(bytes.Buffer)
Convey("To the internal issue tracker", func() {
Convey("It should render valid issue URLs", func() {
testCases := []string{
"http://localhost:3000/user/repo/issues/3333", "<a href=\"http://localhost:3000/user/repo/issues/3333\">#3333</a>",
}
for i := 0; i < len(testCases); i += 2 {
renderer.AutoLink(buffer, []byte(testCases[i]), blackfriday.LINK_TYPE_NORMAL)
line, _ := buffer.ReadString(0)
So(line, ShouldEqual, testCases[i+1])
}
})
Convey("It should render but not change non-issue URLs", func() {
testCases := []string{
"http://1111/2222/ssss-issues/3333?param=blah&blahh=333", "<a href=\"http://1111/2222/ssss-issues/3333?param=blah&amp;blahh=333\">http://1111/2222/ssss-issues/3333?param=blah&amp;blahh=333</a>",
"http://test.com/issues/33333", "<a href=\"http://test.com/issues/33333\">http://test.com/issues/33333</a>",
"http://test.com/issues/3", "<a href=\"http://test.com/issues/3\">http://test.com/issues/3</a>",
"http://issues/333", "<a href=\"http://issues/333\">http://issues/333</a>",
"https://issues/333", "<a href=\"https://issues/333\">https://issues/333</a>",
"http://tissues/0", "<a href=\"http://tissues/0\">http://tissues/0</a>",
}
for i := 0; i < len(testCases); i += 2 {
renderer.AutoLink(buffer, []byte(testCases[i]), blackfriday.LINK_TYPE_NORMAL)
line, _ := buffer.ReadString(0)
So(line, ShouldEqual, testCases[i+1])
}
})
})
})
Convey("Rendering a commit URL", t, func() {
setting.AppUrl = "http://localhost:3000/"
htmlFlags := 0
htmlFlags |= blackfriday.HTML_SKIP_STYLE
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
renderer := &Renderer{
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
}
buffer := new(bytes.Buffer)
Convey("To the internal issue tracker", func() {
Convey("It should correctly convert URLs", func() {
testCases := []string{
"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae", " <code><a href=\"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae\">d8a994ef24</a></code>",
"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2", " <code><a href=\"http://localhost:3000/user/project/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2\">d8a994ef24</a></code>",
"https://external-link.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2", "<a href=\"https://external-link.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2\">https://external-link.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2</a>",
"https://commit/d8a994ef243349f321568f9e36d5c3f444b99cae", "<a href=\"https://commit/d8a994ef243349f321568f9e36d5c3f444b99cae\">https://commit/d8a994ef243349f321568f9e36d5c3f444b99cae</a>",
}
for i := 0; i < len(testCases); i += 2 {
renderer.AutoLink(buffer, []byte(testCases[i]), blackfriday.LINK_TYPE_NORMAL)
line, _ := buffer.ReadString(0)
So(line, ShouldEqual, testCases[i+1])
}
})
})
})
}

View File

@@ -0,0 +1,51 @@
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup
import (
"regexp"
"sync"
"github.com/microcosm-cc/bluemonday"
"github.com/gogits/gogs/modules/setting"
)
// Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow
// any modification to the underlying policies once it's been created.
type Sanitizer struct {
policy *bluemonday.Policy
init sync.Once
}
var sanitizer = &Sanitizer{}
// NewSanitizer initializes sanitizer with allowed attributes based on settings.
// Multiple calls to this function will only create one instance of Sanitizer during
// entire application lifecycle.
func NewSanitizer() {
sanitizer.init.Do(func() {
sanitizer.policy = bluemonday.UGCPolicy()
// We only want to allow HighlightJS specific classes for code blocks
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^language-\w+$`)).OnElements("code")
// Checkboxes
sanitizer.policy.AllowAttrs("type").Matching(regexp.MustCompile(`^checkbox$`)).OnElements("input")
sanitizer.policy.AllowAttrs("checked", "disabled").OnElements("input")
// Custom URL-Schemes
sanitizer.policy.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
})
}
// Sanitize takes a string that contains a HTML fragment or document and applies policy whitelist.
func Sanitize(s string) string {
return sanitizer.policy.Sanitize(s)
}
// SanitizeBytes takes a []byte slice that contains a HTML fragment or document and applies policy whitelist.
func SanitizeBytes(b []byte) []byte {
return sanitizer.policy.SanitizeBytes(b)
}

View File

@@ -0,0 +1,38 @@
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup_test
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
. "github.com/gogits/gogs/modules/markup"
)
func Test_Sanitizer(t *testing.T) {
NewSanitizer()
Convey("Sanitize HTML string and bytes", t, func() {
testCases := []string{
// Regular
`<a onblur="alert(secret)" href="http://www.google.com">Google</a>`, `<a href="http://www.google.com" rel="nofollow">Google</a>`,
// Code highlighting class
`<code class="random string"></code>`, `<code></code>`,
`<code class="language-random ui tab active menu attached animating sidebar following bar center"></code>`, `<code></code>`,
`<code class="language-go"></code>`, `<code class="language-go"></code>`,
// Input checkbox
`<input type="hidden">`, ``,
`<input type="checkbox">`, `<input type="checkbox">`,
`<input checked disabled autofocus>`, `<input checked="" disabled="">`,
}
for i := 0; i < len(testCases); i += 2 {
So(Sanitize(testCases[i]), ShouldEqual, testCases[i+1])
So(string(SanitizeBytes([]byte(testCases[i]))), ShouldEqual, testCases[i+1])
}
})
}

View File

@@ -93,13 +93,15 @@ var (
}
// Security settings
InstallLock bool
SecretKey string
LogInRememberDays int
CookieUserName string
CookieRememberName string
CookieSecure bool
ReverseProxyAuthUser string
InstallLock bool
SecretKey string
LoginRememberDays int
CookieUserName string
CookieRememberName string
CookieSecure bool
ReverseProxyAuthUser string
EnableLoginStatusCookie bool
LoginStatusCookieName string
// Database settings
UseSQLite3 bool
@@ -118,6 +120,7 @@ var (
DisableHTTPGit bool `ini:"DISABLE_HTTP_GIT"`
EnableLocalPathMigration bool
CommitsFetchConcurrency int
EnableRawFileRenderMode bool
// Repository editor settings
Editor struct {
@@ -278,7 +281,9 @@ var (
OrgPagingNum int
} `ini:"ui.admin"`
User struct {
RepoPagingNum int
RepoPagingNum int
NewsFeedPagingNum int
CommitsPagingNum int
} `ini:"ui.user"`
}
@@ -490,11 +495,13 @@ func NewContext() {
sec = Cfg.Section("security")
InstallLock = sec.Key("INSTALL_LOCK").MustBool()
SecretKey = sec.Key("SECRET_KEY").String()
LogInRememberDays = sec.Key("LOGIN_REMEMBER_DAYS").MustInt()
LoginRememberDays = sec.Key("LOGIN_REMEMBER_DAYS").MustInt()
CookieUserName = sec.Key("COOKIE_USERNAME").String()
CookieRememberName = sec.Key("COOKIE_REMEMBER_NAME").String()
CookieSecure = sec.Key("COOKIE_SECURE").MustBool(false)
ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER")
EnableLoginStatusCookie = sec.Key("ENABLE_LOGIN_STATUS_COOKIE").MustBool(false)
LoginStatusCookieName = sec.Key("LOGIN_STATUS_COOKIE_NAME").MustString("login_status")
sec = Cfg.Section("attachment")
AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments"))
@@ -766,7 +773,7 @@ func newSessionService() {
SessionConfig.CookieName = Cfg.Section("session").Key("COOKIE_NAME").MustString("i_like_gogits")
SessionConfig.CookiePath = AppSubUrl
SessionConfig.Secure = Cfg.Section("session").Key("COOKIE_SECURE").MustBool()
SessionConfig.Gclifetime = Cfg.Section("session").Key("GC_INTERVAL_TIME").MustInt64(86400)
SessionConfig.Gclifetime = Cfg.Section("session").Key("GC_INTERVAL_TIME").MustInt64(3600)
SessionConfig.Maxlifetime = Cfg.Section("session").Key("SESSION_LIFE_TIME").MustInt64(86400)
CSRFCookieName = Cfg.Section("session").Key("CSRF_COOKIE_NAME").MustString("_csrf")

View File

@@ -23,7 +23,7 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/markup"
"github.com/gogits/gogs/modules/setting"
)
@@ -125,7 +125,7 @@ func Safe(raw string) template.HTML {
}
func Str2html(raw string) template.HTML {
return template.HTML(markdown.Sanitizer.Sanitize(raw))
return template.HTML(markup.Sanitize(raw))
}
func List(l *list.List) chan interface{} {
@@ -201,7 +201,7 @@ func ReplaceLeft(s, old, new string) string {
// RenderCommitMessage renders commit message with XSS-safe and special links.
func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]string) template.HTML {
cleanMsg := template.HTMLEscapeString(msg)
fullMessage := string(markdown.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix, metas))
fullMessage := string(markup.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix, metas))
msgLines := strings.Split(strings.TrimSpace(fullMessage), "\n")
numLines := len(msgLines)
if numLines == 0 {

View File

@@ -1,6 +1,6 @@
{
"CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
"creatorBuild": "19127",
"creatorBuild": "19115",
"files": {
"\/css\/github.min.css": {
"fileType": 16,
@@ -66,7 +66,7 @@
"fileType": 32768,
"ignore": 0,
"ignoreWasSetByUser": 0,
"initialSize": 514087,
"initialSize": 4048,
"inputAbbreviatedPath": "\/img\/avatar_default.png",
"outputAbbreviatedPath": "\/img\/avatar_default.png",
"outputPathIsOutsideProject": 0,

View File

@@ -5,10 +5,20 @@
background-size: contain;
}
body {
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
background-color: #fff;
overflow-y: scroll;
}
h1,
h2,
h3,
h4,
h5,
.ui.header,
.ui.input input,
.ui.button {
font-family: "PingFang SC", 'Hiragino Sans GB', "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
}
img {
border-radius: 3px;
}
@@ -888,7 +898,7 @@ footer .ui.language .menu {
width: 320px !important;
}
.install form input {
width: 35% !important;
width: 300px !important;
}
.install form .field {
text-align: left;
@@ -897,17 +907,16 @@ footer .ui.language .menu {
margin-left: 335px !important;
}
.install form .field.optional .title {
margin-left: 38%;
margin-left: 320px !important;
}
.install .ui .checkbox {
margin-left: 40% !important;
.install .ui.checkbox {
margin-left: 335px !important;
}
.install .ui .checkbox label {
.install .ui.checkbox label {
width: auto !important;
}
.install #use-builtin-ssh-server {
.install .inline.checkbox {
margin-top: -1em;
margin-left: -15px !important;
margin-bottom: 2em;
}
.form .help {
@@ -1182,6 +1191,7 @@ footer .ui.language .menu {
float: left;
margin-left: -5px;
margin-right: -7px;
width: 16px;
}
.repository .filter.menu .menu {
max-height: 300px;
@@ -1442,7 +1452,8 @@ footer .ui.language .menu {
}
.repository.file.list #file-content .plain-text {
font-size: 14px;
padding: 10px 15px;
padding: 15px 15px 10px 15px;
font-family: Consolas;
}
.repository.file.list #file-content .code-view * {
font-size: 12px;
@@ -2321,6 +2332,9 @@ footer .ui.language .menu {
.repository.wiki.view > .markdown h6:first-of-type {
margin-top: 0;
}
.repository.settings.options .box.field {
padding-left: 27px;
}
.repository.settings.collaboration .collaborator.list {
padding: 0;
}
@@ -2376,6 +2390,15 @@ footer .ui.language .menu {
margin-left: 26px;
padding-top: 0;
}
.webhook .hook.history.list .right.menu .redelivery.button {
font-size: 12px;
margin-top: 6px;
height: 30px;
}
.webhook .hook.history.list .right.menu .redelivery.button .octicon {
font: normal normal normal 13px/1 Octicons;
width: 12px;
}
.user-cards .list {
padding: 0;
}
@@ -2832,16 +2855,29 @@ footer .ui.language .menu {
.user.settings .email.list .item:not(:first-child) .button {
margin-top: -10px;
}
.user.settings .orgs.non-empty {
.user.settings.organizations .orgs.non-empty {
padding: 0;
}
.user.settings .orgs .item {
.user.settings.organizations .orgs .item {
padding: 10px;
}
.user.settings .orgs .item .button {
.user.settings.organizations .orgs .item .button {
margin-top: 5px;
margin-right: 8px;
}
.user.settings.repositories .repos {
padding: 0;
}
.user.settings.repositories .repos .item {
padding: 15px;
height: 46px;
}
.user.settings.repositories .repos .item .button {
margin-top: -5px;
}
.user.profile .ui.card .header {
word-break: break-all;
}
.user.profile .ui.card .username {
display: block;
}

View File

@@ -108,16 +108,21 @@ function initCommentForm() {
});
}
// Add &nbsp; to each unselected label to keep UI looks good.
// This should be added directly to HTML but somehow just get empty <span> on this page.
$labelMenu.find('.item:not(.no-select) .octicon:not(.octicon-check)').each(function () {
$(this).html('&nbsp;');
})
$labelMenu.find('.item:not(.no-select)').click(function () {
if ($(this).hasClass('checked')) {
$(this).removeClass('checked');
$(this).find('.octicon').removeClass('octicon-check');
$(this).find('.octicon').removeClass('octicon-check').html('&nbsp;');
if (hasLabelUpdateAction) {
updateIssueMeta($labelMenu.data('update-url'), "detach", $(this).data('id'));
}
} else {
$(this).addClass('checked');
$(this).find('.octicon').addClass('octicon-check');
$(this).find('.octicon').addClass('octicon-check').html('');
if (hasLabelUpdateAction) {
updateIssueMeta($labelMenu.data('update-url'), "attach", $(this).data('id'));
}
@@ -147,7 +152,7 @@ function initCommentForm() {
$(this).parent().find('.item').each(function () {
$(this).removeClass('checked');
$(this).find('.octicon').removeClass('octicon-check');
$(this).find('.octicon').removeClass('octicon-check').html('&nbsp;');
});
$list.find('.item').each(function () {
@@ -204,76 +209,6 @@ function initCommentForm() {
selectItem('.select-assignee', '#assignee_id');
}
function initInstall() {
if ($('.install').length == 0) {
return;
}
// Database type change detection.
$("#db_type").change(function () {
var sqliteDefault = 'data/gogs.db';
var dbType = $(this).val();
if (dbType === "SQLite3") {
$('#sql_settings').hide();
$('#pgsql_settings').hide();
$('#sqlite_settings').show();
if (dbType === "SQLite3") {
$('#db_path').val(sqliteDefault);
}
return;
}
var dbDefaults = {
"MySQL": "127.0.0.1:3306",
"PostgreSQL": "127.0.0.1:5432",
"MSSQL": "127.0.0.1, 1433"
};
$('#sqlite_settings').hide();
$('#sql_settings').show();
$('#pgsql_settings').toggle(dbType === "PostgreSQL");
$.each(dbDefaults, function(type, defaultHost) {
if ($('#db_host').val() == defaultHost) {
$('#db_host').val(dbDefaults[dbType]);
return false;
}
});
});
// TODO: better handling of exclusive relations.
$('#offline-mode input').change(function () {
if ($(this).is(':checked')) {
$('#disable-gravatar').checkbox('check');
$('#federated-avatar-lookup').checkbox('uncheck');
}
});
$('#disable-gravatar input').change(function () {
if ($(this).is(':checked')) {
$('#federated-avatar-lookup').checkbox('uncheck');
} else {
$('#offline-mode').checkbox('uncheck');
}
});
$('#federated-avatar-lookup input').change(function () {
if ($(this).is(':checked')) {
$('#disable-gravatar').checkbox('uncheck');
$('#offline-mode').checkbox('uncheck');
}
});
$('#disable-registration input').change(function () {
if ($(this).is(':checked')) {
$('#enable-captcha').checkbox('uncheck');
}
});
$('#enable-captcha input').change(function () {
if ($(this).is(':checked')) {
$('#disable-registration').checkbox('uncheck');
}
});
}
function initRepository() {
if ($('.repository').length == 0) {
return;
@@ -330,11 +265,8 @@ function initRepository() {
}
});
$('.enable-system-radio').change(function () {
if (this.value == 'false') {
$($(this).data('target')).addClass('disabled');
} else if (this.value == 'true') {
$($(this).data('target')).removeClass('disabled');
}
$($(this).data('enable')).removeClass('disabled');
$($(this).data('disable')).addClass('disabled');
});
}
@@ -409,7 +341,7 @@ function initRepository() {
if ($('.repository.view.issue').length > 0) {
// Edit issue title
var $issueTitle = $('#issue-title');
var $editInput = $('#edit-title-input input');
var $editInput = $('#edit-title-input').find('input');
var editTitleToggle = function () {
$issueTitle.toggle();
$('.not-in-edit').toggle();
@@ -583,20 +515,6 @@ function initRepository() {
}
}
function initRepositoryCollaboration() {
console.log('initRepositoryCollaboration');
// Change collaborator access mode
$('.access-mode.menu .item').click(function () {
var $menu = $(this).parent();
$.post($menu.data('url'), {
"_csrf": csrf,
"uid": $menu.data('uid'),
"mode": $(this).data('value')
})
});
}
function initWikiForm() {
var $editArea = $('.repository.wiki textarea#edit_area');
if ($editArea.length > 0) {
@@ -898,61 +816,6 @@ function initOrganization() {
}
}
function initUserSettings() {
console.log('initUserSettings');
// Options
if ($('.user.settings.profile').length > 0) {
$('#username').keyup(function () {
var $prompt = $('#name-change-prompt');
if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) {
$prompt.show();
} else {
$prompt.hide();
}
});
}
}
function initWebhook() {
if ($('.new.webhook').length == 0) {
return;
}
$('.events.checkbox input').change(function () {
if ($(this).is(':checked')) {
$('.events.fields').show();
}
});
$('.non-events.checkbox input').change(function () {
if ($(this).is(':checked')) {
$('.events.fields').hide();
}
});
// Highlight payload on first click
$('.hook.history.list .toggle.button').click(function () {
$($(this).data('target') + ' .nohighlight').each(function () {
var $this = $(this);
$this.removeClass('nohighlight');
setTimeout(function(){ hljs.highlightBlock($this[0]) }, 500);
})
})
// Test delivery
$('#test-delivery').click(function () {
var $this = $(this);
$this.addClass('loading disabled');
$.post($this.data('link'), {
"_csrf": csrf
}).done(
setTimeout(function () {
window.location.href = $this.data('redirect');
}, 5000)
)
});
}
function initAdmin() {
if ($('.admin').length == 0) {
return;
@@ -1222,6 +1085,71 @@ function initCodeView() {
}
}
function initUserSettings() {
console.log('initUserSettings');
// Options
if ($('.user.settings.profile').length > 0) {
$('#username').keyup(function () {
var $prompt = $('#name-change-prompt');
if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) {
$prompt.show();
} else {
$prompt.hide();
}
});
}
}
function initRepositoryCollaboration() {
console.log('initRepositoryCollaboration');
// Change collaborator access mode
$('.access-mode.menu .item').click(function () {
var $menu = $(this).parent();
$.post($menu.data('url'), {
"_csrf": csrf,
"uid": $menu.data('uid'),
"mode": $(this).data('value')
})
});
}
function initWebhookSettings() {
$('.events.checkbox input').change(function () {
if ($(this).is(':checked')) {
$('.events.fields').show();
}
});
$('.non-events.checkbox input').change(function () {
if ($(this).is(':checked')) {
$('.events.fields').hide();
}
});
// Highlight payload on first click
$('.hook.history.list .toggle.button').click(function () {
$($(this).data('target') + ' .nohighlight').each(function () {
var $this = $(this);
$this.removeClass('nohighlight');
setTimeout(function(){ hljs.highlightBlock($this[0]) }, 500);
})
})
// Trigger delivery
$('.delivery.button, .redelivery.button').click(function () {
var $this = $(this);
$this.addClass('loading disabled');
$.post($this.data('link'), {
"_csrf": csrf
}).done(
setTimeout(function () {
window.location.href = $this.data('redirect');
}, 5000)
);
});
}
$(document).ready(function () {
csrf = $('meta[name=_csrf]').attr("content");
suburl = $('meta[name=_suburl]').attr("content");
@@ -1236,7 +1164,7 @@ $(document).ready(function () {
forceSelection: false
});
$('.jump.dropdown').dropdown({
action: 'hide',
action: 'select',
onShow: function () {
$('.poping.up').popup('hide');
}
@@ -1339,6 +1267,30 @@ $(document).ready(function () {
e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'))
});
// AJAX load buttons
$('.ajax-load-button').click(function () {
var $this = $(this);
$this.addClass('disabled');
$.ajax({
url: $this.data('url'),
headers: {
'X-AJAX': "true"
}
}).success(function (data, status, request) {
$(data).insertBefore($this);
// Update new URL or remove self if no more feeds
var url = request.getResponseHeader('X-AJAX-URL');
if (url) {
$this.data('url', url);
$this.removeClass('disabled');
} else {
$this.remove();
}
});
});
// Helpers.
$('.delete-button').click(function () {
var $this = $(this);
@@ -1353,7 +1305,7 @@ $(document).ready(function () {
$.post($this.data('url'), {
"_csrf": csrf,
"id": $this.data("id")
}).done(function (data) {
}).success(function (data) {
window.location.href = data.redirect;
});
}
@@ -1400,13 +1352,11 @@ $(document).ready(function () {
searchRepositories();
initCommentForm();
initInstall();
initRepository();
initWikiForm();
initEditForm();
initEditor();
initOrganization();
initWebhook();
initAdmin();
initCodeView();
@@ -1426,7 +1376,8 @@ $(document).ready(function () {
var routes = {
'div.user.settings': initUserSettings,
'div.repository.settings.collaboration': initRepositoryCollaboration
'div.repository.settings.collaboration': initRepositoryCollaboration,
'div.webhook.settings': initWebhookSettings
};
var selector;

View File

@@ -1,10 +1,16 @@
@footer-margin: 40px;
body {
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
background-color: #fff;
overflow-y: scroll;
}
h1, h2, h3, h4, h5,
.ui.header,
.ui.input input,
.ui.button {
font-family: "PingFang SC", 'Hiragino Sans GB', "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
}
img {
border-radius: 3px;
}

View File

@@ -1,14 +1,15 @@
.install {
@input-padding: 320px !important;
padding-top: 45px;
padding-bottom: @footer-margin * 2;
form {
@input-padding: 320px !important;
label {
text-align: right;
width: @input-padding;
}
input {
width: 35% !important;
width: 300px !important;
}
.field {
text-align: left;
@@ -16,21 +17,18 @@
margin-left: @input-padding+15px;
}
&.optional .title {
margin-left: 38%;
margin-left: @input-padding;
}
}
}
.ui {
.checkbox {
margin-left: 40% !important;
label {
width: auto !important;
}
.ui.checkbox {
margin-left: @input-padding+15px;
label {
width: auto !important;
}
}
#use-builtin-ssh-server {
.inline.checkbox {
margin-top: -1em;
margin-left: -15px !important;
margin-bottom: 2em;
}
}

View File

@@ -97,6 +97,7 @@
float: left;
margin-left: -5px;
margin-right: -7px;
width: 16px;
}
.menu {
max-height: 300px;
@@ -402,7 +403,8 @@
.plain-text {
font-size: 14px;
padding: 10px 15px;
padding: 15px 15px 10px 15px;
font-family: Consolas;
}
.code-view {
* {
@@ -1324,6 +1326,12 @@
}
&.settings {
&.options {
.box.field {
padding-left: 27px;
}
}
&.collaboration {
.collaborator.list {
padding: 0;
@@ -1411,6 +1419,21 @@
}
// End of .repository
// Should apply organization webhooks page
.webhook .hook.history.list {
.right.menu {
.redelivery.button {
font-size: 12px;
margin-top: 6px;
height: 30px;
.octicon {
font: normal normal normal 13px/1 Octicons;
width: 12px;
}
}
}
}
&.user-cards {
.list {
padding: 0;

View File

@@ -19,7 +19,7 @@
}
}
}
.orgs {
&.organizations .orgs {
&.non-empty {
padding: 0;
}
@@ -31,10 +31,23 @@
}
}
}
&.repositories .repos {
padding: 0;
.item {
padding: 15px;
height: 46px;
.button {
margin-top: -5px;
}
}
}
}
&.profile {
.ui.card {
.header {
word-break: break-all;
}
.username {
display: block;
}

View File

@@ -5,13 +5,13 @@
package admin
import (
"github.com/Unknwon/paginater"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/routers"
)
const (
@@ -23,14 +23,49 @@ func Repos(ctx *context.Context) {
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminRepositories"] = true
routers.RenderRepoSearch(ctx, &routers.RepoSearchOptions{
Counter: models.CountRepositories,
Ranger: models.Repositories,
Private: true,
PageSize: setting.UI.Admin.RepoPagingNum,
OrderBy: "id ASC",
TplName: REPOS,
})
page := ctx.QueryInt("page")
if page <= 0 {
page = 1
}
var (
repos []*models.Repository
count int64
err error
)
keyword := ctx.Query("q")
if len(keyword) == 0 {
repos, err = models.Repositories(page, setting.UI.Admin.RepoPagingNum)
if err != nil {
ctx.Handle(500, "Repositories", err)
return
}
count = models.CountRepositories(true)
} else {
repos, count, err = models.SearchRepositoryByName(&models.SearchRepoOptions{
Keyword: keyword,
OrderBy: "id ASC",
Private: true,
Page: page,
PageSize: setting.UI.Admin.RepoPagingNum,
})
if err != nil {
ctx.Handle(500, "SearchRepositoryByName", err)
return
}
}
ctx.Data["Keyword"] = keyword
ctx.Data["Total"] = count
ctx.Data["Page"] = paginater.New(int(count), setting.UI.Admin.RepoPagingNum, page, 5)
if err = models.RepositoryList(repos).LoadAttributes(); err != nil {
ctx.Handle(500, "LoadAttributes", err)
return
}
ctx.Data["Repos"] = repos
ctx.HTML(200, REPOS)
}
func DeleteRepo(ctx *context.Context) {

View File

@@ -6,13 +6,14 @@ package admin
import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
)
func GetRepositoryByParams(ctx *context.APIContext) *models.Repository {
repo, err := models.GetRepositoryByName(ctx.Org.Team.OrgID, ctx.Params(":reponame"))
if err != nil {
if models.IsErrRepoNotExist(err) {
if errors.IsRepoNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetRepositoryByName", err)

View File

@@ -13,6 +13,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/form"
"github.com/gogits/gogs/routers/api/v1/admin"
@@ -38,7 +39,7 @@ func repoAssignment() macaron.Handler {
} else {
owner, err = models.GetUserByName(userName)
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetUserByName", err)
@@ -51,7 +52,7 @@ func repoAssignment() macaron.Handler {
// Get repository.
repo, err := models.GetRepositoryByName(owner.ID, repoName)
if err != nil {
if models.IsErrRepoNotExist(err) {
if errors.IsRepoNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetRepositoryByName", err)
@@ -137,7 +138,7 @@ func orgAssignment(args ...bool) macaron.Handler {
if assignOrg {
ctx.Org.Organization, err = models.GetUserByName(ctx.Params(":orgname"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetUserByName", err)
@@ -149,7 +150,7 @@ func orgAssignment(args ...bool) macaron.Handler {
if assignTeam {
ctx.Org.Team, err = models.GetTeamByID(ctx.ParamsInt64(":teamid"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetTeamById", err)
@@ -241,7 +242,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/repos", func() {
m.Post("/migrate", bind(form.MigrateRepo{}), repo.Migrate)
m.Combo("/:username/:reponame").Get(repo.Get).
m.Combo("/:username/:reponame", repoAssignment()).Get(repo.Get).
Delete(repo.Delete)
m.Group("/:username/:reponame", func() {
@@ -307,6 +308,7 @@ func RegisterRoutes(m *macaron.Macaron) {
Patch(reqRepoWriter(), bind(api.EditMilestoneOption{}), repo.EditMilestone).
Delete(reqRepoWriter(), repo.DeleteMilestone)
})
m.Post("/mirror-sync", repo.MirrorSync)
m.Get("/editorconfig/:filename", context.RepoRef(), repo.GetEditorconfig)
}, repoAssignment())
}, reqToken())

View File

@@ -8,7 +8,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/markup"
)
// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
@@ -25,9 +25,9 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) {
switch form.Mode {
case "gfm":
ctx.Write(markdown.Render([]byte(form.Text), form.Context, nil))
ctx.Write(markup.Markdown([]byte(form.Text), form.Context, nil))
default:
ctx.Write(markdown.RenderRaw([]byte(form.Text), ""))
ctx.Write(markup.RawMarkdown([]byte(form.Text), ""))
}
}
@@ -38,5 +38,5 @@ func MarkdownRaw(ctx *context.APIContext) {
ctx.Error(422, "", err)
return
}
ctx.Write(markdown.RenderRaw(body, ""))
ctx.Write(markup.RawMarkdown(body, ""))
}

View File

@@ -8,13 +8,14 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
)
func ListCollaborators(ctx *context.APIContext) {
collaborators, err := ctx.Repo.Repository.GetCollaborators()
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", err)
} else {
ctx.Error(500, "GetCollaborators", err)
@@ -32,7 +33,7 @@ func ListCollaborators(ctx *context.APIContext) {
func AddCollaborator(ctx *context.APIContext, form api.AddCollaboratorOption) {
collaborator, err := models.GetUserByName(ctx.Params(":collaborator"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", err)
} else {
ctx.Error(500, "GetUserByName", err)
@@ -58,7 +59,7 @@ func AddCollaborator(ctx *context.APIContext, form api.AddCollaboratorOption) {
func IsCollaborator(ctx *context.APIContext) {
collaborator, err := models.GetUserByName(ctx.Params(":collaborator"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", err)
} else {
ctx.Error(500, "GetUserByName", err)
@@ -66,13 +67,7 @@ func IsCollaborator(ctx *context.APIContext) {
return
}
is, err := ctx.Repo.Repository.IsCollaborator(collaborator.ID)
if err != nil {
ctx.Error(500, "IsCollaboration", err)
return
}
if !is {
if !ctx.Repo.Repository.IsCollaborator(collaborator.ID) {
ctx.Status(404)
} else {
ctx.Status(204)
@@ -82,7 +77,7 @@ func IsCollaborator(ctx *context.APIContext) {
func DeleteCollaborator(ctx *context.APIContext) {
collaborator, err := models.GetUserByName(ctx.Params(":collaborator"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", err)
} else {
ctx.Error(500, "GetUserByName", err)

View File

@@ -12,6 +12,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/routers/api/v1/convert"
)
@@ -106,7 +107,7 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
func EditHook(ctx *context.APIContext, form api.EditHookOption) {
w, err := models.GetWebhookOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrWebhookNotExist(err) {
if errors.IsWebhookNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetWebhookOfRepoByID", err)

View File

@@ -11,6 +11,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/setting"
)
@@ -63,7 +64,7 @@ func ListIssues(ctx *context.APIContext) {
func GetIssue(ctx *context.APIContext) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetIssueByIndex", err)
@@ -86,7 +87,7 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) {
if len(form.Assignee) > 0 {
assignee, err := models.GetUserByName(form.Assignee)
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", fmt.Sprintf("Assignee does not exist: [name: %s]", form.Assignee))
} else {
ctx.Error(500, "GetUserByName", err)
@@ -125,7 +126,7 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) {
func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetIssueByIndex", err)
@@ -152,7 +153,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
} else {
assignee, err := models.GetUserByName(*form.Assignee)
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", fmt.Sprintf("assignee does not exist: [name: %s]", *form.Assignee))
} else {
ctx.Error(500, "GetUserByName", err)

View File

@@ -8,13 +8,14 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
)
func ListIssueLabels(ctx *context.APIContext) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetIssueByIndex", err)
@@ -37,7 +38,7 @@ func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetIssueByIndex", err)
@@ -77,7 +78,7 @@ func DeleteIssueLabel(ctx *context.APIContext) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetIssueByIndex", err)
@@ -111,7 +112,7 @@ func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetIssueByIndex", err)
@@ -151,7 +152,7 @@ func ClearIssueLabels(ctx *context.APIContext) {
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrIssueNotExist(err) {
if errors.IsIssueNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetIssueByIndex", err)

View File

@@ -12,6 +12,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/form"
"github.com/gogits/gogs/modules/setting"
@@ -80,7 +81,7 @@ func Search(ctx *context.APIContext) {
func listUserRepositories(ctx *context.APIContext, username string) {
user, err := models.GetUserByName(username)
if err != nil {
ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
ctx.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
return
}
@@ -190,7 +191,7 @@ func Create(ctx *context.APIContext, opt api.CreateRepoOption) {
func CreateOrgRepo(ctx *context.APIContext, opt api.CreateRepoOption) {
org, err := models.GetOrgByName(ctx.Params(":org"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", err)
} else {
ctx.Error(500, "GetOrgByName", err)
@@ -213,7 +214,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
if f.Uid != ctxUser.ID {
org, err := models.GetUserByID(f.Uid)
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", err)
} else {
ctx.Error(500, "GetUserByID", err)
@@ -280,7 +281,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
func parseOwnerAndRepo(ctx *context.APIContext) (*models.User, *models.Repository) {
owner, err := models.GetUserByName(ctx.Params(":username"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Error(422, "", err)
} else {
ctx.Error(500, "GetUserByName", err)
@@ -290,7 +291,7 @@ func parseOwnerAndRepo(ctx *context.APIContext) (*models.User, *models.Repositor
repo, err := models.GetRepositoryByName(owner.ID, ctx.Params(":reponame"))
if err != nil {
if models.IsErrRepoNotExist(err) {
if errors.IsRepoNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetRepositoryByName", err)
@@ -308,7 +309,11 @@ func Get(ctx *context.APIContext) {
return
}
ctx.JSON(200, repo.APIFormat(&api.Permission{true, true, true}))
ctx.JSON(200, repo.APIFormat(&api.Permission{
Admin: ctx.Repo.IsAdmin(),
Push: ctx.Repo.IsWriter(),
Pull: true,
}))
}
// https://github.com/gogits/go-gogs-client/wiki/Repositories#delete
@@ -354,3 +359,16 @@ func ListForks(ctx *context.APIContext) {
ctx.JSON(200, &apiForks)
}
func MirrorSync(ctx *context.APIContext) {
_, repo := parseOwnerAndRepo(ctx)
if ctx.Written() {
return
} else if !repo.IsMirror {
ctx.Status(404)
return
}
go models.MirrorQueue.Add(repo.ID)
ctx.Status(202)
}

View File

@@ -8,6 +8,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/routers/api/v1/convert"
@@ -17,7 +18,7 @@ import (
func GetUserByParamsName(ctx *context.APIContext, name string) *models.User {
user, err := models.GetUserByName(ctx.Params(name))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetUserByName", err)

View File

@@ -10,6 +10,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/context"
)
@@ -54,7 +55,7 @@ func Search(ctx *context.APIContext) {
func GetInfo(ctx *context.APIContext) {
u, err := models.GetUserByName(ctx.Params(":username"))
if err != nil {
if models.IsErrUserNotExist(err) {
if errors.IsUserNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetUserByName", err)

Some files were not shown because too many files have changed in this diff Show More