mirror of
https://github.com/gogs/gogs.git
synced 2026-03-01 09:40:55 +01:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3757e424f | ||
|
|
2381fe72cb | ||
|
|
e28bc7023f | ||
|
|
aff8fb28bd | ||
|
|
6a543c8066 | ||
|
|
4d90527a6e | ||
|
|
c64b842df9 | ||
|
|
27c4252548 | ||
|
|
10b93efc4a | ||
|
|
0696d430c9 | ||
|
|
68b231bd89 | ||
|
|
6ec859f2b0 | ||
|
|
452551fa23 | ||
|
|
ec05c64ead | ||
|
|
cd15a17970 | ||
|
|
6072e9a52c | ||
|
|
b78e03934d | ||
|
|
3c0d162961 | ||
|
|
48cf9edcf5 | ||
|
|
0c8c1ee96f | ||
|
|
7d80c5a722 | ||
|
|
5ec21d56ef | ||
|
|
266c8f5a85 | ||
|
|
162504e90c | ||
|
|
5ea0592f61 | ||
|
|
054e97d614 | ||
|
|
28983c94ff | ||
|
|
0cfa489cf0 | ||
|
|
e0af5c280d | ||
|
|
d21dc0da78 | ||
|
|
60aca9ea18 | ||
|
|
6a8ad0b357 | ||
|
|
bd970b8b27 | ||
|
|
0f3155660e |
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -5,7 +5,7 @@ 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
|
||||
public/css/semantic-2.2.9.min.css linguist-vendored
|
||||
public/js/libs/* linguist-vendored
|
||||
public/js/jquery-1.11.3.min.js linguist-vendored
|
||||
public/js/semantic-2.2.7.min.js linguist-vendored
|
||||
public/js/semantic-2.2.9.min.js linguist-vendored
|
||||
@@ -20,7 +20,7 @@ github.com/go-xorm/xorm = commit:19f6dfc
|
||||
github.com/gogits/chardet = commit:2404f77
|
||||
github.com/gogits/cron = commit:2fc07a4
|
||||
github.com/gogits/git-module = commit:1b9552b
|
||||
github.com/gogits/go-gogs-client = commit:98046bb
|
||||
github.com/gogits/go-gogs-client = commit:264a3d5
|
||||
github.com/gogits/go-libravatar = commit:cd1abbd
|
||||
github.com/issue9/identicon = commit:d36b545
|
||||
github.com/jaytaylor/html2text = commit:d16d412
|
||||
|
||||
@@ -19,6 +19,8 @@ targets:
|
||||
centos-6: &el
|
||||
build_dependencies:
|
||||
- pam-devel
|
||||
# required for go buildpack
|
||||
- perl-Digest-SHA
|
||||
dependencies:
|
||||
- pam
|
||||
- git
|
||||
@@ -26,7 +28,7 @@ targets:
|
||||
<<: *el
|
||||
before:
|
||||
- mv packager/Procfile .
|
||||
- mv packager/.godir .
|
||||
after:
|
||||
- mv bin/main gogs
|
||||
- mv bin/gogs gogs
|
||||
after_install: ./packager/hooks/postinst
|
||||
buildpack: https://github.com/heroku/heroku-buildpack-go.git#v62
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
FROM hypriot/rpi-alpine-scratch:v3.2
|
||||
MAINTAINER jp@roemer.im, raxetul@gmail.com
|
||||
FROM armhf/alpine:3.5
|
||||
|
||||
# Install system utils & Gogs runtime dependencies
|
||||
ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-armhf /usr/sbin/gosu
|
||||
RUN chmod +x /usr/sbin/gosu \
|
||||
&& echo "http://dl-4.alpinelinux.org/alpine/v3.3/main/" | tee /etc/apk/repositories \
|
||||
&& echo "http://dl-4.alpinelinux.org/alpine/v3.3/community/" | tee -a /etc/apk/repositories \
|
||||
&& apk -U --no-progress upgrade && rm -f /var/cache/apk/APKINDEX.* \
|
||||
&& apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh socat tzdata
|
||||
|
||||
ENV GOGS_CUSTOM /data/gogs
|
||||
|
||||
COPY . /app/gogs/
|
||||
WORKDIR /app/gogs/
|
||||
RUN ./docker/build.sh
|
||||
COPY . /app/gogs/build
|
||||
WORKDIR /app/gogs/build
|
||||
|
||||
RUN ./docker/build-go.sh \
|
||||
&& ./docker/build.sh \
|
||||
&& ./docker/finalize.sh
|
||||
|
||||
# Configure LibC Name Service
|
||||
COPY docker/nsswitch.conf /etc/nsswitch.conf
|
||||
@@ -21,5 +20,5 @@ COPY docker/nsswitch.conf /etc/nsswitch.conf
|
||||
# Configure Docker Container
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 22 3000
|
||||
ENTRYPOINT ["docker/start.sh"]
|
||||
ENTRYPOINT ["/app/gogs/docker/start.sh"]
|
||||
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]
|
||||
|
||||
@@ -3,7 +3,7 @@ Gogs [](http
|
||||
|
||||

|
||||
|
||||
##### Current tip version: [`.VERSION`](templates/.VERSION) (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
|
||||
##### Current tip version: [`.VERSION`](templates/.VERSION) (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
|
||||
|
||||
| Web | UI | Preview |
|
||||
|:-------------:|:-------:|:-------:|
|
||||
@@ -98,7 +98,6 @@ There are 5 ways to install Gogs:
|
||||
- [OpenShift](https://github.com/tkisme/gogs-openshift)
|
||||
- [Cloudron](https://cloudron.io/appstore.html#io.gogs.cloudronapp)
|
||||
- [Scaleway](https://www.scaleway.com/imagehub/gogs/)
|
||||
- [Portal](https://portaldemo.xyz/cloud/)
|
||||
- [Sandstorm](https://github.com/cem/gogs-sandstorm)
|
||||
- [sloppy.io](https://github.com/sloppyio/quickstarters/tree/master/gogs)
|
||||
- [YunoHost](https://github.com/YunoHost-Apps/gogs_ynh)
|
||||
@@ -122,8 +121,6 @@ There are 5 ways to install Gogs:
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
- Router and middleware mechanism of [Macaron](https://github.com/go-macaron/macaron).
|
||||
- System Monitor Status is inspired by [GoBlog](https://github.com/fuxiaohei/goblog).
|
||||
- Thanks [Egon Elbre](https://twitter.com/egonelbre) for designing logo.
|
||||
- Thanks [Crowdin](https://crowdin.com/project/gogs) for providing open source translation plan.
|
||||
- Thanks [DigitalOcean](https://www.digitalocean.com) for hosting home and demo sites.
|
||||
@@ -131,8 +128,7 @@ There are 5 ways to install Gogs:
|
||||
|
||||
## Contributors
|
||||
|
||||
- Ex-team members [@lunny](https://github.com/lunny), [@fuxiaohei](https://github.com/fuxiaohei) and [@slene](https://github.com/slene).
|
||||
- See [contributors page](https://github.com/gogits/gogs/graphs/contributors) for full list of contributors.
|
||||
- See [contributors page](https://github.com/gogits/gogs/graphs/contributors) for top 100 contributors.
|
||||
- See [TRANSLATORS](conf/locale/TRANSLATORS) for public list of translators.
|
||||
|
||||
## License
|
||||
|
||||
@@ -67,7 +67,6 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
|
||||
- [OpenShift](https://github.com/tkisme/gogs-openshift)
|
||||
- [Cloudron](https://cloudron.io/appstore.html#io.gogs.cloudronapp)
|
||||
- [Scaleway](https://www.scaleway.com/imagehub/gogs/)
|
||||
- [Portal](https://portaldemo.xyz/cloud/)
|
||||
- [Sandstorm](https://github.com/cem/gogs-sandstorm)
|
||||
- [sloppy.io](https://github.com/sloppyio/quickstarters/tree/master/gogs)
|
||||
- [YunoHost](https://github.com/mbugeia/gogs_ynh)
|
||||
@@ -91,8 +90,6 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
|
||||
|
||||
## 特别鸣谢
|
||||
|
||||
- 基于 [Macaron](https://github.com/go-macaron/macaron) 的路由与中间件机制。
|
||||
- 基于 [GoBlog](https://github.com/fuxiaohei/goblog) 修改的系统监视状态。
|
||||
- 感谢 [Egon Elbre](https://twitter.com/egonelbre) 设计的 Logo。
|
||||
- 感谢 [Crowdin](https://crowdin.com/project/gogs) 提供免费的开源项目本地化支持。
|
||||
- 感谢 [DigitalOcean](https://www.digitalocean.com) 提供主站和体验站点的服务器赞助。
|
||||
@@ -100,8 +97,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
|
||||
|
||||
## 贡献成员
|
||||
|
||||
- 前团队成员 [@lunny](https://github.com/lunny)、[@fuxiaohei](https://github.com/fuxiaohei) 和 [@slene](https://github.com/slene)。
|
||||
- 您可以通过查看 [贡献者页面](https://github.com/gogits/gogs/graphs/contributors) 获取完整的贡献者列表。
|
||||
- 您可以通过查看 [贡献者页面](https://github.com/gogits/gogs/graphs/contributors) 获取 TOP 100 的贡献者列表。
|
||||
- 您可以通过查看 [TRANSLATORS](conf/locale/TRANSLATORS) 文件获取公开的翻译人员列表。
|
||||
|
||||
## 授权许可
|
||||
|
||||
@@ -100,6 +100,12 @@ func runHookPreReceive(c *cli.Context) error {
|
||||
continue
|
||||
}
|
||||
|
||||
// Check if whitelist is enabled
|
||||
userID := com.StrTo(os.Getenv(http.ENV_AUTH_USER_ID)).MustInt64()
|
||||
if protectBranch.EnableWhitelist && !models.IsUserInProtectBranchWhitelist(repoID, userID, branchName) {
|
||||
fail(fmt.Sprintf("Branch '%s' is protected and you are not in the push whitelist", branchName), "")
|
||||
}
|
||||
|
||||
// Check if branch allows direct push
|
||||
if protectBranch.RequirePullRequest {
|
||||
fail(fmt.Sprintf("Branch '%s' is protected and commits must be merged through pull request", branchName), "")
|
||||
|
||||
@@ -199,7 +199,7 @@ func runServ(c *cli.Context) error {
|
||||
fail("Internal error", "Fail to get user by key ID '%d': %v", key.ID, err)
|
||||
}
|
||||
|
||||
mode, err := models.AccessLevel(user, repo)
|
||||
mode, err := models.AccessLevel(user.ID, repo)
|
||||
if err != nil {
|
||||
fail("Internal error", "Fail to check access: %v", err)
|
||||
}
|
||||
|
||||
18
cmd/web.go
18
cmd/web.go
@@ -527,25 +527,9 @@ func runWeb(ctx *cli.Context) error {
|
||||
m.Get("/new", repo.NewRelease)
|
||||
m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
|
||||
m.Post("/delete", repo.DeleteRelease)
|
||||
}, reqRepoWriter, context.RepoRef())
|
||||
|
||||
m.Group("/releases", func() {
|
||||
m.Get("/edit/*", repo.EditRelease)
|
||||
m.Post("/edit/*", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
|
||||
}, reqRepoWriter, func(ctx *context.Context) {
|
||||
var err error
|
||||
ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetBranchCommit", err)
|
||||
return
|
||||
}
|
||||
ctx.Repo.CommitsCount, err = ctx.Repo.Commit.CommitsCount()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "CommitsCount", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
|
||||
})
|
||||
}, reqRepoWriter, context.RepoRef())
|
||||
|
||||
// FIXME: Should use ctx.Repo.PullRequest to unify template, currently we have inconsistent URL
|
||||
// for PR in same repository. After select branch on the page, the URL contains redundant head user name.
|
||||
|
||||
@@ -181,6 +181,8 @@ ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
|
||||
ENABLE_CAPTCHA = true
|
||||
|
||||
[webhook]
|
||||
; Types are enabled for users to use, can be "gogs", "slack", "discord"
|
||||
TYPES = gogs, slack, discord
|
||||
; Hook task queue length, increase if webhook shooting starts hanging
|
||||
QUEUE_LENGTH = 1000
|
||||
; Deliver timeout in seconds
|
||||
@@ -248,6 +250,8 @@ ENABLE_SET_COOKIE = true
|
||||
GC_INTERVAL_TIME = 86400
|
||||
; Session life time, default is 86400
|
||||
SESSION_LIFE_TIME = 86400
|
||||
; Cookie name for CSRF
|
||||
CSRF_COOKIE_NAME = _csrf
|
||||
|
||||
[picture]
|
||||
; Path to store user uploaded avatars
|
||||
@@ -407,7 +411,7 @@ REPO_PAGING_NUM = 15
|
||||
|
||||
[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,Suomalainen,Türkçe,čeština,Српски,Svenska,한국어,Galego,Українська
|
||||
|
||||
; Used for datetimepicker
|
||||
[i18n.datelang]
|
||||
|
||||
@@ -9,6 +9,7 @@ Aleksey Tarakin <hukendo AT yandex DOT ru>
|
||||
Alexander Steinhöfer <kontakt AT lx-s DOT de>
|
||||
Alexandre Espinosa Menor <aemenor DOT gmail DOT com>
|
||||
Alexandre Magno <alexandre DOT mbm AT gmail DOT com>
|
||||
Anders B. Hansen <anders AT birkoe DOT com>
|
||||
András Schenkerik <moviesharkteam AT gmail DOT com>
|
||||
Andrey Nering <andrey AT nering DOT com DOT br>
|
||||
Andrey Paskal <apaskal AT gmail DOT com>
|
||||
@@ -23,6 +24,7 @@ Cysioland
|
||||
Damaris Padieu <damizx AT hotmail DOT fr>
|
||||
Daniel Speichert <daniel AT speichert DOT pl>
|
||||
David Yzaguirre <dvdyzag AT gmail DOT com>
|
||||
Denys Khomenko
|
||||
Dmitriy Nogay <me AT catwhocode DOT ga>
|
||||
Enrico Testori hypertesto AT gmail DOT com
|
||||
Ezequiel Gonzalez Rial <gonrial AT gmail DOT com>
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Уеб-куки
|
||||
settings.githooks=Git куки
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Символен
|
||||
settings.tracker_url_format_desc=Можете да използвате текстови маркери <code>{user} {repo} {index}</code> за потребителско име, име на хранилище и индекс на задача съответно.
|
||||
settings.pulls_desc=Включва заявки за сливане за да може да се приемат външни доработки
|
||||
settings.danger_zone=Опасна зона
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Новият притежател вече има хранилище със същото име. Изберете друго име.
|
||||
settings.convert=Промени към редовно хранилище
|
||||
settings.convert_desc=Можете да промените това огледало към редовно хранилище. Конверсията не може да се отмени.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Този потребител няма да
|
||||
settings.remove_collaborator_success=Сътрудникът е премахнат.
|
||||
settings.search_user_placeholder=Име на потребител...
|
||||
settings.org_not_allowed_to_be_collaborator=Невъзможно добавяне на организация като сътрудник.
|
||||
settings.user_is_org_member=Потребителят вече участва в организацията и не може да бъде добавен като сътрудник.
|
||||
settings.add_webhook=Добави уеб-кука
|
||||
settings.hooks_desc=Уеб-куките много приличат на обикновен HTTP POST тригер. Когато нещо се случи в Gogs, ние ще изпратим уведомление до сървъра, който посочите. Научете повече в <a target="_blank" href="%s">Ръководство за уеб-куки</a>.
|
||||
settings.webhook_deletion=Изтрий уеб-кука
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs ще изпрати <code>POST</code> заявк
|
||||
settings.payload_url=URL адрес на изпращане
|
||||
settings.content_type=Тип на съдържанието
|
||||
settings.secret=Тайна
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Потребителско име
|
||||
settings.slack_icon_url=URL адрес на икона
|
||||
settings.slack_color=Цвят
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webové háčky
|
||||
settings.githooks=Háčky Gitu
|
||||
@@ -684,6 +688,7 @@ 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.danger_zone=Nebezpečná zóna
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
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.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Tento uživatel po tom, co bude smazán, ji
|
||||
settings.remove_collaborator_success=Spolupracovník byl smazán.
|
||||
settings.search_user_placeholder=Hledat uživatele...
|
||||
settings.org_not_allowed_to_be_collaborator=Není dovoleno přidat organizaci jako spolupracovníka.
|
||||
settings.user_is_org_member=Uživatel je již členem organizace, tudíž nemůže být přidán jako spolupracovník.
|
||||
settings.add_webhook=Přidat webový háček
|
||||
settings.hooks_desc=Webové háčky jsou podobné základním spouštím HTTP POST událostí. Kdykoliv se něco stane v Gogs, bude postaráno o oznámení specifikovanému cílovému serveru. Více se o daném dozvíte v <a target="_blank" href="%s">příručce webových háčků</a>.
|
||||
settings.webhook_deletion=Smazat webový háček
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs zašle požadavek typu <code>POST</code> na zadan
|
||||
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.slack_username=Uživatelské jméno
|
||||
settings.slack_icon_url=URL ikony uživatele
|
||||
settings.slack_color=Barva
|
||||
|
||||
@@ -48,7 +48,7 @@ cancel=Abbrechen
|
||||
install=Installation
|
||||
title=Installationsschritte für den ersten Start
|
||||
docker_helper=Wenn Gogs innerhalb von Docker läuft, lesen Sie sich bitte den <a target="_blank" href="%s">Leitfaden</a> genau durch, bevor Sie irgendwas auf dieser Seite ändern!
|
||||
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
|
||||
requite_db_desc=Gogs benötigt MySQL, PostgreSQL, SQLite3, MSSQL oder TiDB.
|
||||
db_title=Datenbankeinstellungen
|
||||
db_type=Datenbanktyp
|
||||
host=Host
|
||||
@@ -58,8 +58,8 @@ db_name=Datenbankname
|
||||
db_helper=Bitte verwenden Sie in MySQL die InnoDB-Engine mit dem Zeichensatz utf8_general_ci.
|
||||
ssl_mode=SSL-Modus
|
||||
path=Pfad
|
||||
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=Der Dateipfad zur SQLite3-Datenbank. <br>Bitte verwenden Sie einen absoluten Pfad, wenn Gogs als Service gestartet wird.
|
||||
err_empty_db_path=SQLite3 Datenbankpfad darf nicht leer sein.
|
||||
no_admin_and_disable_registration=Sie können die Registrierung nicht deaktivieren, ohne ein Administratorkonto zu erstellen.
|
||||
err_empty_admin_password=Das Administrator-Passwort darf nicht leer sein.
|
||||
|
||||
@@ -74,8 +74,8 @@ domain=Domain
|
||||
domain_helper=Dies hat Auswirkung auf die SSH Klon-URLs.
|
||||
ssh_port=SSH Port
|
||||
ssh_port_helper=Der Port Ihres SSH-Servers. Leer lassen um SSH zu deaktivieren.
|
||||
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=Eingebauten SSH-Server verwenden
|
||||
use_builtin_ssh_server_popup=Starte eingebauten SSH-Server für git-Aufgaben, um es vom System-SSH-Dämon zu trennen.
|
||||
http_port=HTTP Port
|
||||
http_port_helper=Auf dieser Port Nummer wird Gogs erreichbar sein.
|
||||
app_url=Anwendungs-URL
|
||||
@@ -117,7 +117,7 @@ sqlite3_not_available=Ihre Gogs-Version unterstützt SQLite3 nicht. Bitte laden
|
||||
invalid_db_setting=Datenbankeinstellungen sind nicht korrekt: %v
|
||||
invalid_repo_path=Repository Verzeichnis ist ungültig: %v
|
||||
run_user_not_match=Der ausführende Benutzer ist nicht der aktuelle Benutzer: %s -> %s
|
||||
invalid_smtp_from=SMPT ist nicht gültig im Feld: %v
|
||||
invalid_smtp_from=SMTP Absender Feld ist nicht gültig: %v
|
||||
save_config_failed=Fehler beim Speichern der Konfiguration: %v
|
||||
invalid_admin_setting=Admin-Konto Einstellungen sind ungültig: %v
|
||||
install_success=Herzlich Willkommen! Wir sind froh, dass Sie sich für Gogs entschieden haben. Wir wünschen viel Vergnügen damit.
|
||||
@@ -462,7 +462,7 @@ editor.cancel=Abbrechen
|
||||
editor.filename_cannot_be_empty=Der Dateiname darf nicht leer sein.
|
||||
editor.branch_already_exists=Branch '%s' existiert bereits in diesem Repository.
|
||||
editor.directory_is_a_file='%s' im übergeordneten Verzeichnis ist eine Datei und kein Verzeichnis.
|
||||
editor.file_is_a_symlink=Die Datei '%s' ist ein Symlink die nicht im Webeditor verändert werden kann.
|
||||
editor.file_is_a_symlink=Die Datei '%s' ist ein Symlink, der im Webeditor nicht bearbeitet werden kann.
|
||||
editor.filename_is_a_directory=Die Datei '%s' existiert bereits als Verzeichnis in diesem Repository.
|
||||
editor.file_editing_no_longer_exists=Die Datei '%s', welche Sie bearbeiten, existiert in diesem Repository nicht mehr.
|
||||
editor.file_changed_while_editing=Seit dem Start der Bearbeitung hat sich die Datei geändert. <a target="_blank" href="%s">Hier klicken</a> um die Änderungen zu sehen, oder nochmals <strong>Commit drücken</strong> um die Änderungen zu überschreiben.
|
||||
@@ -473,7 +473,7 @@ editor.add_subdir=Unterverzeichnis erstellen...
|
||||
editor.unable_to_upload_files=Fehler beim Hochladen der Dateien zu '%s'. Fehler: %v
|
||||
editor.upload_files_to_dir=Dateien hochladen nach '%s'
|
||||
|
||||
commits.commit_history=Commit History
|
||||
commits.commit_history=Commit Verlauf
|
||||
commits.commits=Commits
|
||||
commits.search=Commits durchsuchen
|
||||
commits.find=Finden
|
||||
@@ -641,22 +641,26 @@ settings.collaboration.write=Schreibrechte
|
||||
settings.collaboration.read=Leserechte
|
||||
settings.collaboration.undefined=Nicht definiert
|
||||
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.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
|
||||
settings.update_default_branch_success=Standard-Branch dieses Repositories wurde erfolgreich aktualisiert!
|
||||
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.
|
||||
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
|
||||
settings.protected_branches_desc=Schützt Branches vor forcierten Pushes und versehentlichem Löschen. Comitter können freigeschaltet werden.
|
||||
settings.choose_a_branch=Wählen Sie einen Branch...
|
||||
settings.branch_protection=Branch-Schutz
|
||||
settings.branch_protection_desc=Bitte wählen Sie Schutzoptionen für den Branch <b>%s</b>.
|
||||
settings.protect_this_branch=Diesen Branch schützen
|
||||
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=Fügt die Benutzer zu Whitelist hinzu, die in diesen Branch pushen dürfen
|
||||
settings.protect_whitelist_committers_desc=Benutzer oder Teams zur Whitelist hinzufügen.
|
||||
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
|
||||
settings.protect_whitelist_search_teams=Teams suchen
|
||||
settings.update_protect_branch_success=Schutzoptionen für diesen Branch wurden erfolgreich aktualisiert!
|
||||
settings.hooks=Webhooks
|
||||
settings.githooks=Git-Hooks
|
||||
settings.basic_settings=Grundeinstellungen
|
||||
@@ -675,7 +679,7 @@ settings.external_wiki_url_desc=Besucher werden auf diese URL umgeleitet, wenn s
|
||||
settings.issues_desc=Issue-Tracker einschalten
|
||||
settings.use_internal_issue_tracker=Eingebauten Issue-Tracker verwenden
|
||||
settings.use_external_issue_tracker=Externes Issue-System verwenden
|
||||
settings.external_tracker_url=Externe Issue-Tracker URL
|
||||
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.
|
||||
settings.tracker_url_format=URL-Format des externen Issue-Systems
|
||||
settings.tracker_issue_style=Namenskonvention des externen Issue-Trackers:
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumerisch
|
||||
settings.tracker_url_format_desc=Sie können die Platzhalter <code>{user} {repo} {index}</code> für den Benutzernamen, den Namen des Repositories und die Issue-Nummer verwenden.
|
||||
settings.pulls_desc=Pull-Requests aktivieren, um öffentliche Mitwirkung zu ermöglichen
|
||||
settings.danger_zone=Gefahrenzone
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Der neue Eigentümer hat bereits ein Repository mit dem gleichen Namen. Bitte wählen Sie einen anderen Namen.
|
||||
settings.convert=In ein normales Repository umwandeln
|
||||
settings.convert_desc=Dieser Mirror kann in ein normales Repository umgewandelt werden. Dies kann nicht rückgängig gemacht werden.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Nach dem Löschen wird dieser Benutzer keine
|
||||
settings.remove_collaborator_success=Mitarbeiter wurde entfernt.
|
||||
settings.search_user_placeholder=Benutzer suchen...
|
||||
settings.org_not_allowed_to_be_collaborator=Eine Organisation kann nicht als Mitarbeiter hinzugefügt werden.
|
||||
settings.user_is_org_member=Benutzer ist ein Organisationsmitglied und kann nicht als Mitarbeiter hinzugefügt werden.
|
||||
settings.add_webhook=Webhook hinzufügen
|
||||
settings.hooks_desc=Webhooks erlauben es Ihnen, externe Dienste zu informieren, wenn etwas Bestimmtes in Ihrem Repository passiert. Gogs sendet dann einen POST-Request an alle angegebenen URLs. Erfahren Sie mehr in unserem <a target="_blank" href="%s">Webhooks Guide</a>.
|
||||
settings.webhook_deletion=Webhook entfernen
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs sendet einen <code>POST</code>-Request an die unt
|
||||
settings.payload_url=Payload URL
|
||||
settings.content_type=Inhaltstyp
|
||||
settings.secret=Secret
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Benutzername
|
||||
settings.slack_icon_url=Icon URL
|
||||
settings.slack_color=Farbe
|
||||
@@ -763,12 +768,12 @@ settings.delete_webhook=Webhook löschen
|
||||
settings.recent_deliveries=Letzte Zustellungen
|
||||
settings.hook_type=Hook Typ
|
||||
settings.add_slack_hook_desc=Fügen Sie <a href="%s">Slack</a>-Integration zu Ihrem Repository hinzu.
|
||||
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
|
||||
settings.add_discord_hook_desc=Fügen Sie <a href="%s">Discord</a>-Integration zu Ihrem Repository hinzu.
|
||||
settings.slack_token=Token
|
||||
settings.slack_domain=Domain
|
||||
settings.slack_channel=Kanal
|
||||
settings.deploy_keys=Deploy-Schlüssel
|
||||
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>Häufiger Fehler!</b> Wenn Sie öffentliche Schlüssel hinzufügen wollen, gehen Sie zu Ihren <a href="%s%s"> Kontoeinstellungen</a>.
|
||||
settings.add_deploy_key=Deploy-Schlüssel hinzufügen
|
||||
settings.deploy_key_desc=Deploy-Schlüssel haben nur lesenden Zugriff. Sie sind nicht identisch mit dem SSH-Schlüssel des persönlichen Kontos.
|
||||
settings.no_deploy_keys=Sie haben noch keine Deploy-Schlüssel hinzugefügt.
|
||||
@@ -847,7 +852,7 @@ team_permission_desc=Welche Berechtigungsstufe soll das Team haben?
|
||||
|
||||
form.name_reserved=Organisationsname '%s' ist bereits vergeben.
|
||||
form.name_pattern_not_allowed=Organisationsnamen der Form '%s' sind nicht erlaubt.
|
||||
form.team_name_reserved=Team name '%s' is reserved.
|
||||
form.team_name_reserved=Der Teamname '%s' ist reserviert.
|
||||
|
||||
settings=Einstellungen
|
||||
settings.options=Optionen
|
||||
@@ -938,8 +943,8 @@ dashboard.git_gc_repos=Garbage Collection auf Repositories ausführen
|
||||
dashboard.git_gc_repos_success=Garbage Collection wurde auf allen Repositories erfolgreich ausgeführt.
|
||||
dashboard.resync_all_sshkeys=Datei '.ssh/authorized_keys' neu anlegen (Achtung: Schlüssel, die nicht zu Gogs gehören gehen verloren)
|
||||
dashboard.resync_all_sshkeys_success=Alle öffentlichen Keys wurden erfolgreich neu geschrieben.
|
||||
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=Synchronisiere pre-receive, update und post-receive Hooks für alle Repositorien
|
||||
dashboard.resync_all_hooks_success=Pre-receive, update und post-receive Hooks aller Repositorien wurden erfolgreich synchronisiert.
|
||||
dashboard.reinit_missing_repos=Alle Repository-Datensätze mit verloren gegangenen Git-Dateien neu initialisieren
|
||||
dashboard.reinit_missing_repos_success=Alle Repository-Datensätze, die Git-Dateien verloren haben wurden erfolgreich neu initialisiert.
|
||||
|
||||
@@ -1089,15 +1094,15 @@ config.ssh_keygen_path=Keygen ('ssh-keygen') Pfad
|
||||
config.ssh_minimum_key_size_check=Prüfung der Mindestschlüssellänge
|
||||
config.ssh_minimum_key_sizes=Minimale Schlüssellängen
|
||||
|
||||
config.repo_config=Repository Configuration
|
||||
config.repo_config=Repository-Konfiguration
|
||||
config.repo_root_path=Repository-Verzeichnis
|
||||
config.script_type=Skript-Typ
|
||||
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=Erzwinge privat
|
||||
config.max_creation_limit=Maximal erstellbare Anzahl
|
||||
config.preferred_licenses=Bevorzugte Lizenzen
|
||||
config.disable_http_git=Deaktiviere HTTP-Git
|
||||
config.enable_local_path_migration=Erlaube Migration von lokalem Pfad
|
||||
config.commits_fetch_concurrency=Anzahl gleichzeitiger Commit-/Fetch-Prozesse
|
||||
|
||||
config.db_config=Datenbankkonfiguration
|
||||
config.db_type=Typ
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request = Require pull request instead direct push
|
||||
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.
|
||||
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.hooks = Webhooks
|
||||
settings.githooks = Git Hooks
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric = Alphanumeric
|
||||
settings.tracker_url_format_desc = You can use placeholder <code>{user} {repo} {index}</code> for user name, repository name and issue index.
|
||||
settings.pulls_desc = Enable pull requests to accept public contributions
|
||||
settings.danger_zone = Danger Zone
|
||||
settings.cannot_fork_to_same_owner = You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo = The new owner already has a repository with same name. Please choose another name.
|
||||
settings.convert = Convert To Regular Repository
|
||||
settings.convert_desc = You can convert this mirror to a regular repository. This cannot be reversed.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc = This user will no longer have collaboratio
|
||||
settings.remove_collaborator_success = Collaborator has been removed.
|
||||
settings.search_user_placeholder = Search user...
|
||||
settings.org_not_allowed_to_be_collaborator = Organization is not allowed to be added as a collaborator.
|
||||
settings.user_is_org_member = User is organization member who cannot be added as a collaborator.
|
||||
settings.add_webhook = Add Webhook
|
||||
settings.hooks_desc = Webhooks are much like basic HTTP POST event triggers. Whenever something occurs in Gogs, we will handle the notification to the target host you specify. Learn more in this <a target="_blank" href="%s">Webhooks Guide</a>.
|
||||
settings.webhook_deletion = Delete Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc = Gogs will send a <code>POST</code> request to the UR
|
||||
settings.payload_url = Payload URL
|
||||
settings.content_type = Content Type
|
||||
settings.secret = Secret
|
||||
settings.secret_desc = Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username = Username
|
||||
settings.slack_icon_url = Icon URL
|
||||
settings.slack_color = Color
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Requiere una solicitud pull, en lugar de u
|
||||
settings.protect_require_pull_request_desc=Active esta opción para deshabilitar un push directo a esta rama. Los commits tienen que ser empujados a otra rama no protegida y fusionados a esta rama a través de la solicitud pull.
|
||||
settings.protect_whitelist_committers=Lista blanca de quienes pueden empujar a esta rama
|
||||
settings.protect_whitelist_committers_desc=Añadir personas o equipos a la lista blanca de empuje directo a esta rama.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumérico
|
||||
settings.tracker_url_format_desc=Puedes usar las plantillas <code>{user} {repo} {index}</code> para el nombre de usuario, nombre del repositorio e índice de la incidencia.
|
||||
settings.pulls_desc=Habilitar Pull Requests para aceptar contribuciones públicas
|
||||
settings.danger_zone=Zona de Peligro
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=El nuevo propietario tiene un repositorio con el mismo nombre.
|
||||
settings.convert=Convertir en un repositorio normal
|
||||
settings.convert_desc=Puedes convertir este repositorio en un repositorio normal. Este cambio no se puede deshacer.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Este usuario no podrá colaborar en este rep
|
||||
settings.remove_collaborator_success=El colaborador ha sido eliminado.
|
||||
settings.search_user_placeholder=Buscar usuario...
|
||||
settings.org_not_allowed_to_be_collaborator=Las organizaciones no tiene permitido ser añadidas como colaboradores.
|
||||
settings.user_is_org_member=El usuario es miembro de la organización, no puede ser añadido como colaborador.
|
||||
settings.add_webhook=Añadir Webhook
|
||||
settings.hooks_desc=Los Webhooks permiten a servicios externos recibir notificaciones cuando sucedan ciertos eventos en Gogs. Cuando sucedan los eventos especificados, enviaremos una petición POST a cada una de las URLs indicadas. Para obtener más información, consulta nuestra <a target="_blank" href="%s">Guía de Webhooks</a>.
|
||||
settings.webhook_deletion=Eliminar Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Enviaremos una petición <code>POST</code> a la siguie
|
||||
settings.payload_url=URL de Payload
|
||||
settings.content_type=Tipo de contenido
|
||||
settings.secret=Secreto
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Nombre de usuario
|
||||
settings.slack_icon_url=URL de icono
|
||||
settings.slack_color=Color
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Vaadi pull-pyyntö suoran push-operaation
|
||||
settings.protect_require_pull_request_desc=Estä suorat push-operaatiot tähän haaraan. Commitit täytyy pushata ei-suojattuun haaraan ja yhdistää tähän haaraan pull-pyynnön kautta.
|
||||
settings.protect_whitelist_committers=Lista sallituista, jotka voivat pushata tähän haaraan
|
||||
settings.protect_whitelist_committers_desc=Lisää ihmisiä tai tiimejä sallittujen listaan, jotka voivat pushata suoraan tähän haaraan.
|
||||
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.hooks=Webkoukut
|
||||
settings.githooks=Git koukut
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Aakkosnumeerinen
|
||||
settings.tracker_url_format_desc=Voit käyttää paikkamerkkiä <code>{user} {repo} {index}</code> käyttäjänimelle, reponimelle ja vikanumerolle.
|
||||
settings.pulls_desc=Ota käyttöön pull-pyynnöt salliaksesi julkiset koodilahjoitukset
|
||||
settings.danger_zone=Vaaravyöhyke
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Uudella omistajalla on jo samanniminen repo. Ole hyvä ja valitse toinen nimi.
|
||||
settings.convert=Muunna tavalliseksi repoksi
|
||||
settings.convert_desc=Voit muuntaa tämän peilin tavalliseksi repoksi. Tätä ei voi peruuttaa.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Tällä käyttäjällä ei tule enää olema
|
||||
settings.remove_collaborator_success=Yhteistyökumppani on poistettu.
|
||||
settings.search_user_placeholder=Etsi käyttäjä...
|
||||
settings.org_not_allowed_to_be_collaborator=Yhteistyökumppaniksi ei voi lisätä organisaatiota.
|
||||
settings.user_is_org_member=Käyttäjä on organisaation jäsen, jota ei voi lisätä yhteistyökumppaniksi.
|
||||
settings.add_webhook=Lisää webkoukku
|
||||
settings.hooks_desc=Webkoukut muistuttavat paljon perus HTTP POST tapahtuma laukaisimia. Aina kun jotain tapahtuu Gogsissa, käsittelemme ilmoituksen määrittäämääsi kohteeseen. Lisätietoja <a target="_blank" href="%s">webkoukku oppaassa</a>.
|
||||
settings.webhook_deletion=Poista webkoukku
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs lähettää <code>POST</code> requestin määritt
|
||||
settings.payload_url=Payload URL
|
||||
settings.content_type=Sisältötyyppi
|
||||
settings.secret=Salaus
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Käyttäjätunnus
|
||||
settings.slack_icon_url=Kuvakkeen URL
|
||||
settings.slack_color=Väri
|
||||
|
||||
@@ -473,7 +473,7 @@ editor.add_subdir=Ajouter un sous-répertoire...
|
||||
editor.unable_to_upload_files=Échec lors de l'envoie du fichier '%s' avec l’erreur : %v
|
||||
editor.upload_files_to_dir=Transférer les fichiers vers '%s'
|
||||
|
||||
commits.commit_history=Commit History
|
||||
commits.commit_history=Historique des commits
|
||||
commits.commits=Commits
|
||||
commits.search=Rechercher des commits
|
||||
commits.find=Trouver
|
||||
@@ -656,7 +656,11 @@ settings.protect_require_pull_request=Exiger une requête de fusion plutôt qu'u
|
||||
settings.protect_require_pull_request_desc=Activez cette option pour empêcher la publication immédiate vers cette branche. Les commits devront être publiés vers une autre branche (non protégée) et fusionnée dans cette branche avec une requête de fusion.
|
||||
settings.protect_whitelist_committers=Liste blanche de personnes pouvant publier sur cette branche
|
||||
settings.protect_whitelist_committers_desc=Ajouter des personnes ou des équipes à la liste blanche de publication directe vers cette branche.
|
||||
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
|
||||
settings.protect_whitelist_users=Utilisateurs qui peuvent pousser sur cette branche
|
||||
settings.protect_whitelist_search_users=Rechercher des utilisateurs
|
||||
settings.protect_whitelist_teams=Les équipes pour lesquelles les membres peuvent pousser sur cette branche
|
||||
settings.protect_whitelist_search_teams=Rechercher des équipes
|
||||
settings.update_protect_branch_success=Les options de protection de cette branches ont été mises à jour avec succès.
|
||||
settings.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
settings.basic_settings=Paramètres de base
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumérique
|
||||
settings.tracker_url_format_desc=Vous pouvez utiliser l'espace réservé <code>{user} {repo} {index}</code> pour le nom d'utilisateur, le nom du dépôt et le numéro de bug.
|
||||
settings.pulls_desc=Activer les pull requests pour accepter les contributions publiques
|
||||
settings.danger_zone=Zone de danger
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Le nouveau propriétaire a déjà un dépôt nommé ainsi.
|
||||
settings.convert=Convertir en dépôt ordinaire
|
||||
settings.convert_desc=Vous pouvez convertir ce miroir en dépôt ordinaire. Cela ne peut pas être inversée.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Cet utilisateur n'aura plus accès pour coll
|
||||
settings.remove_collaborator_success=Collaborateur supprimé.
|
||||
settings.search_user_placeholder=Rechercher un utilisateur...
|
||||
settings.org_not_allowed_to_be_collaborator=Une organisation n'est pas autorisée à être ajoutée en tant que collaborateur.
|
||||
settings.user_is_org_member=Cet utilisateur ne peut pas être ajouté en tant que collaborateur car il fait partie d'une organisation.
|
||||
settings.add_webhook=Ajouter un Webhook
|
||||
settings.hooks_desc=Les Webhooks sont des déclencheurs de POST HTTP . Lorsque qu'un événement se produit dans Gogs, une notification sera envoyée vers l'hôte cible préalablement spécifié. Apprenez-en davantage dans le <a target="_blank" href="%s">Guide des Webhooks</a>.
|
||||
settings.webhook_deletion=Supprimer le Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Une requête <code>POST</code> sera transmise vers l'U
|
||||
settings.payload_url=URL des Données Utiles
|
||||
settings.content_type=Type de contenu
|
||||
settings.secret=Confidentiel
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Nom d'utilisateur
|
||||
settings.slack_icon_url=URL de l'icône
|
||||
settings.slack_color=Couleur
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumérico
|
||||
settings.tracker_url_format_desc=Podes usar os modelos <code>{user} {repo} {index}</code> para o nome de usuario, nome do repositorio e índice da incidencia.
|
||||
settings.pulls_desc=Habilitar Pull Requests para aceptar contribucións públicas
|
||||
settings.danger_zone=Zona de perigo
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=O novo propietario ten un repositorio co mesmo nome.
|
||||
settings.convert=Converter nun repositorio normal
|
||||
settings.convert_desc=Podes converter este repositorio nun repositorio normal. Este cambio non se pode desfacer.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Este usuario non poderá colaborar neste rep
|
||||
settings.remove_collaborator_success=O colaborador foi eliminado.
|
||||
settings.search_user_placeholder=Buscar usuario...
|
||||
settings.org_not_allowed_to_be_collaborator=As organizacións non teñen permitido ser engadidas como colaboradores.
|
||||
settings.user_is_org_member=O usuario é membro da organización, non pode ser engadido como colaborador.
|
||||
settings.add_webhook=Engadir Webhook
|
||||
settings.hooks_desc=Os Webhooks permiten a servizos externos recibir notificacións cando sucedan certos eventos en Gogs. Cando sucedan os eventos especificados, enviaremos unha petición POST a cada unha das URLs indicadas. Para obter máis información, consulta a nosa <a target="_blank" href="%s">Guía de Webhooks</a>.
|
||||
settings.webhook_deletion=Eliminar Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Enviaremos unha petición <code>POST</code> á seguint
|
||||
settings.payload_url=URL de Payload
|
||||
settings.content_type=Tipo de contido
|
||||
settings.secret=Secreto
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Nome da persoa usuaria
|
||||
settings.slack_icon_url=URL da icona
|
||||
settings.slack_color=Cor
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumeric
|
||||
settings.tracker_url_format_desc=You can use placeholder <code>{user} {repo} {index}</code> for user name, repository name and issue index.
|
||||
settings.pulls_desc=Abilita le pull requests per accettare contributi pubblici
|
||||
settings.danger_zone=Zona Pericolosa
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Il nuovo proprietario ha già un repository con lo stesso nome. Per favore scegli un altro nome.
|
||||
settings.convert=Converti in Repository Regolare
|
||||
settings.convert_desc=Puoi convertire questo mirror in un repository regolare. Questa operazione non può essere annullata.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Questo utente non potrà più collaborare a
|
||||
settings.remove_collaborator_success=Il collaboratore è stato rimosso.
|
||||
settings.search_user_placeholder=Cerca utente...
|
||||
settings.org_not_allowed_to_be_collaborator=Un'organizzazione non può essere aggiunta come collaboratore.
|
||||
settings.user_is_org_member=L'utente è un membro dell'organizzazione che non può essere aggiunto come collaboratore.
|
||||
settings.add_webhook=Aggiungi Webhook
|
||||
settings.hooks_desc=I Webhooks sono molto simili a un basilare evento trigger HTTP POST. Ogni volta che qualcosa si verifica in Gogs, tratteremo la notifica all'host di destinazione specificato. Ulteriori informazioni in questa <a target="_blank" href="%s">Guida ai Webhooks</a>.
|
||||
settings.webhook_deletion=Elimina Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs manderà una richiesta <code>POST</code> all'URL
|
||||
settings.payload_url=Payload URL
|
||||
settings.content_type=Content Type
|
||||
settings.secret=Secret
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Nome utente
|
||||
settings.slack_icon_url=URL icona
|
||||
settings.slack_color=Colore
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Git のフック
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumeric
|
||||
settings.tracker_url_format_desc=You can use placeholder <code>{user} {repo} {index}</code> for user name, repository name and issue index.
|
||||
settings.pulls_desc=Enable pull requests to accept public contributions
|
||||
settings.danger_zone=危険地帯
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=新しいオーナーは、既に同じ名前のリポジトリを持っています。
|
||||
settings.convert=Convert To Regular Repository
|
||||
settings.convert_desc=You can convert this mirror to a regular repository. This cannot be reversed.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=This user will no longer have collaboration
|
||||
settings.remove_collaborator_success=共同編集者が削除されました。
|
||||
settings.search_user_placeholder=Search users
|
||||
settings.org_not_allowed_to_be_collaborator=組織を共同編集者として追加することはできません。
|
||||
settings.user_is_org_member=ユーザーは組織の一員なので、共同編集者として追加することはできません。
|
||||
settings.add_webhook=Webhook を追加
|
||||
settings.hooks_desc=Webhooksは、Gogsで特定のイベントの発生時に指定された外部サービスに通知を許可します。イベントが発生すると、それぞれ指定されたUrlに、POSTリクエストが送られます。詳細はこちらのの <a target="_blank"href="%s"> Webhooks ガイド</a>をご覧ください。
|
||||
settings.webhook_deletion=Webhook を削除
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=私たちは、指定されたURLに購読されたイ
|
||||
settings.payload_url=ペイロードの URL
|
||||
settings.content_type=コンテンツ タイプ
|
||||
settings.secret=秘密
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=ユーザ名
|
||||
settings.slack_icon_url=アイコン URL
|
||||
settings.slack_color=カラー
|
||||
|
||||
@@ -657,6 +657,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
@@ -685,6 +689,7 @@ settings.tracker_issue_style.alphanumeric=문자 숫자
|
||||
settings.tracker_url_format_desc=<code>{user} {repo} {index}</code> 사용자 명, 저장소 명, 이슈 인덱스를 사용하여 표시자를 사용할 수 있습니다.
|
||||
settings.pulls_desc=끌어오기 요청을 공개적으로 기여받을 수 있도록 활성화합니다.
|
||||
settings.danger_zone=위험 설정
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=새로운 소유자가 같은 이름의 저장소를 이미 가지고 있습니다. 다른 이름을 선택해주세요.
|
||||
settings.convert=일반 리파지토리로 변환
|
||||
settings.convert_desc=이 미러를 일반 리파지토리로 변환할 수 없습니다. 반대로는 할 수 없습니다.
|
||||
@@ -719,7 +724,6 @@ settings.collaborator_deletion_desc=이 사용자는 더 이상 이 저장소의
|
||||
settings.remove_collaborator_success=공동작업자가 삭제 되었습니다.
|
||||
settings.search_user_placeholder=사용자 검색...
|
||||
settings.org_not_allowed_to_be_collaborator=조직을 공동 작업자로 추가할 수 없습니다.
|
||||
settings.user_is_org_member=사용자가 조직 구성원이므로 공동 작업자로 추가할 수 없습니다.
|
||||
settings.add_webhook=Webhook 추가
|
||||
settings.hooks_desc=웹후크는 기본적인 HTTP POST 이벤트 트리거입니다. Gogs에서 무슨 일이 발생할 때마다, 지정한 대상 호스트에 알림을 보냅니다. <a target="_blank" href="%s">웹후크 안내서</a>에서 자세히 알아보십시오.
|
||||
settings.webhook_deletion=Webhook 삭제
|
||||
@@ -742,6 +746,7 @@ settings.add_webhook_desc=Gogs는 발생한 이벤트와 관련하여 지정한
|
||||
settings.payload_url=페이로드 URL
|
||||
settings.content_type=컨텐츠 타입
|
||||
settings.secret=비밀
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=사용자 이름
|
||||
settings.slack_icon_url=아이콘 URL
|
||||
settings.slack_color=색
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Tīmekļa āķi
|
||||
settings.githooks=Git āķi
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Burti un cipari
|
||||
settings.tracker_url_format_desc=Jūs varat izmantot <code>{user}{repo}{index}</code> lietotājvārdam, repozitorija nosaukumam un problēmas identifikātoram.
|
||||
settings.pulls_desc=Iespējot izmaiņu pieprasījumus lai saņemtu publiskus ieguldījumus
|
||||
settings.danger_zone=Bīstamā zona
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Jaunajam īpašniekam jau ir repozitorijs ar šādu nosaukumu.
|
||||
settings.convert=Konvertēt uz parastu repozitoriju
|
||||
settings.convert_desc=Šo spoguli ir iespējams konvertēt par parastu repozitoriju. Šī ir neatgriezeniska darbība.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Šim lietotājam pēc dzēšanas vairs nebū
|
||||
settings.remove_collaborator_success=Līdzstrādnieks tika noņemts.
|
||||
settings.search_user_placeholder=Meklēt lietotāju...
|
||||
settings.org_not_allowed_to_be_collaborator=Organizāciju nav atļauts pievienot kā līdzstrādnieku.
|
||||
settings.user_is_org_member=Lietotājs ir organizācijas biedrs, kas nevar tikt pievienots kā līdzstrādnieks.
|
||||
settings.add_webhook=Pievienot tīmekļa āķi
|
||||
settings.hooks_desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem notikomiem, kas notiek Git servisā. Kad iestāsies kāds notikums, katram ārējā servisa URL tiks nosūtīts POST pieprasījums. Lai uzzinātu sīkāk skatieties <a target="_blank" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
|
||||
settings.webhook_deletion=Dzēst tīmekļa āķi
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Uz norādīto URL tiks nosūtīts <code>POST</code> pi
|
||||
settings.payload_url=Vērtuma URL
|
||||
settings.content_type=Satura tips
|
||||
settings.secret=Noslēpums
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Lietotājvārds
|
||||
settings.slack_icon_url=Ikonas URL
|
||||
settings.slack_color=Krāsa
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Git-hooks
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanummeriek
|
||||
settings.tracker_url_format_desc=U kan de aanduidingen <code>{user} {repo} {index}</code> gebruiken voor de gebruikersnaam, de naam van de repository en de lijst van open tickets.
|
||||
settings.pulls_desc=Schakel 'pull request' in om publieke bijdragen te mogelijk te maken
|
||||
settings.danger_zone=Gevaren zone
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=De nieuwe eigenaar heeft al een repositorie met deze naam
|
||||
settings.convert=Converteren naar gewone repository
|
||||
settings.convert_desc=U kunt deze mirror converteren naar een gewone repository. Dit kan niet ongedaan worden gemaakt.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Deze gebruiker zal niet langer toegang hebbe
|
||||
settings.remove_collaborator_success=medewerker is verwijderd.
|
||||
settings.search_user_placeholder=Zoek gebruiker...
|
||||
settings.org_not_allowed_to_be_collaborator=De organisatie kan niet toegevoegd worden als medewerker.
|
||||
settings.user_is_org_member=Gebruiker is lid van de organisatie die als een medewerker kan niet worden toegevoegd.
|
||||
settings.add_webhook=Webhook toevoegen
|
||||
settings.hooks_desc=Webhooks dat de externe diensten om kennisgevingen te ontvangen wanneer bepaalde gebeurtenissen op Gogs plaatsvinden. Wanneer de opgegeven gebeurtenissen plaatsvinden, sturen we een POST-aanvraag naar elk van de URL's die u opgeeft. Meer informatie vindt u in onze <a target="_blank" href="%s"> Webhooks gids</a>.
|
||||
settings.webhook_deletion=Webhook verwijderen
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=We sturen een <code>POST</code>-aanvraag naar de onder
|
||||
settings.payload_url=Nettolading URL
|
||||
settings.content_type=Content type
|
||||
settings.secret=Geheim
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Gebruikersnaam
|
||||
settings.slack_icon_url=Icoon URL
|
||||
settings.slack_color=Kleur
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooki
|
||||
settings.githooks=Hooki Git
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumeryczne
|
||||
settings.tracker_url_format_desc=Symbole zastępcze <code>{user} {repo} {index}</code> mogą być użyte dla nazwy użytkownika, nazwy repozytorium i numeru problemu.
|
||||
settings.pulls_desc=Włącz obsługę pull request, aby akceptować publiczny wkład
|
||||
settings.danger_zone=Strefa niebezpieczeństwa
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Nowy właściciel już posiada repozytorium o tej samej nazwie.
|
||||
settings.convert=Konwersja na repozytorium regularne
|
||||
settings.convert_desc=Możesz przekonwertować ten mirror na repozytorium regularne. Ta czynność nie może być odwrócona.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Ten użytkownik nie będzie miał dostępu w
|
||||
settings.remove_collaborator_success=Współpracownik został usunięty.
|
||||
settings.search_user_placeholder=Szukaj użytkownika...
|
||||
settings.org_not_allowed_to_be_collaborator=Organizacji nie można dodać jako współpracownika.
|
||||
settings.user_is_org_member=Użytkownik jest członkiem organizacji, który nie może być dodany jako współpracownik.
|
||||
settings.add_webhook=Dodaj webhooka
|
||||
settings.hooks_desc=Webooki działają tak jak proste wywołania HTTP POST. Jeśli cokolwiek zdarzy się w Gogs, wyślemy powiadomienie do wybranego hosta. Więcej informacji można znaleźć w <a target="_blank" href="%s">przewodniku webhooków</a>.
|
||||
settings.webhook_deletion=Usuń webhooka
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Wyślemy żądanie <code>POST</code> pod poniższy adr
|
||||
settings.payload_url=URL do wywołania
|
||||
settings.content_type=Typ zawartości
|
||||
settings.secret=Sekret
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Użytkownik
|
||||
settings.slack_icon_url=Adres URL ikony
|
||||
settings.slack_color=Kolor
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Hooks do Git
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumérico
|
||||
settings.tracker_url_format_desc=Você pode usar o espaço reservado <code>{user} {repo} {index}</code> para o nome do usuário, índice de nome e a questão do repositório.
|
||||
settings.pulls_desc=Habilitar Pull Requests para aceitar contribuições públicas
|
||||
settings.danger_zone=Zona de perigo
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=O novo dono já tem um repositório com o mesmo nome. Por favor, escolha outro nome.
|
||||
settings.convert=Converter para repositório tradicional
|
||||
settings.convert_desc=Você pode converter este espelho em um repositório tradicional. Esta ação não pode ser revertida.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Este usuário não terá mais acesso de cola
|
||||
settings.remove_collaborator_success=O colaborador foi removido.
|
||||
settings.search_user_placeholder=Pesquisar usuário...
|
||||
settings.org_not_allowed_to_be_collaborator=Organização não tem permissão para ser adicionada como um colaborador.
|
||||
settings.user_is_org_member=O usuário é um membro da organização que não pode ser adicionado como um colaborador.
|
||||
settings.add_webhook=Adicionar Webhook
|
||||
settings.hooks_desc=Hooks da web ou Webhooks permitem serviços externos serem notificados quando certos eventos acontecem no Gogs. Quando acontecem os eventos especificados, enviaremos uma solicitação POST para cada uma das URLs que você fornecer. Saiba mais no nosso <a target="_blank" href="%s"> Guia de Webhooks</a>.
|
||||
settings.webhook_deletion=Deletar Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Enviaremos uma solicitação <code>POST</code> para o
|
||||
settings.payload_url=URL de Payload
|
||||
settings.content_type=Tipo de conteúdo
|
||||
settings.secret=Secreto
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Nome de usuário
|
||||
settings.slack_icon_url=URL do ícone
|
||||
settings.slack_color=Cor
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Автоматическое обновление
|
||||
settings.githooks=Git хуки
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Буквенноцифровой
|
||||
settings.tracker_url_format_desc=Вы можете использовать шаблон <code>{user} {repo} {index}</code> для имени пользователя, репозитория и номера задачи.
|
||||
settings.pulls_desc=Включить публичные запросы на слияние
|
||||
settings.danger_zone=Опасная зона
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=У нового владельца уже есть хранилище с таким названием.
|
||||
settings.convert=Преобразовать в обычный репозиторий
|
||||
settings.convert_desc=Это зеркало можно преобразовать в обычный репозиторий. Это не может быть отменено.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Этот пользователь больш
|
||||
settings.remove_collaborator_success=Соавтор был удален.
|
||||
settings.search_user_placeholder=Поиск пользователя...
|
||||
settings.org_not_allowed_to_be_collaborator=Организации не могут быть добавлены как соавторы.
|
||||
settings.user_is_org_member=Пользователь является членом организации, члены которой не могут быть добавлены в качестве соавтора.
|
||||
settings.add_webhook=Добавить Webhook
|
||||
settings.hooks_desc=Webhooks позволяют внешним службам получать уведомления при возникновении определенных событий на Gogs. При возникновении указанных событий мы отправим запрос POST на каждый заданный вами URL. Узнать больше можно в нашем <a target="_blank" href="%s">Руководстве по Webhooks</a>.
|
||||
settings.webhook_deletion=Удалить веб-хук
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Мы отправим запрос <code>POST</code>
|
||||
settings.payload_url=URL обработчика
|
||||
settings.content_type=Тип содержимого
|
||||
settings.secret=Secret
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Имя пользователя
|
||||
settings.slack_icon_url=URL иконки
|
||||
settings.slack_color=Цвет
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webhooks
|
||||
settings.githooks=Git хуки
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Алфанумерично
|
||||
settings.tracker_url_format_desc=Можете да користите шаблон <code>{user} {repo} {index}</code> за корисничко име, спремишта и задатака.
|
||||
settings.pulls_desc=Омогући систем захтева за спајање да би сте преузели јавних доприноса
|
||||
settings.danger_zone=Опасна зона
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Нови власник већ има спремиште по истим називом. Молимо вас изаберите друго име.
|
||||
settings.convert=Претворити у обично спремиште
|
||||
settings.convert_desc=Можете претворити огледало у обично спремиште, али та операција не може се укинути.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Овај корисник неће имат
|
||||
settings.remove_collaborator_success=Сарадник је уклоњен.
|
||||
settings.search_user_placeholder=Претрага корисника...
|
||||
settings.org_not_allowed_to_be_collaborator=Неможе се додати организација као сарадник.
|
||||
settings.user_is_org_member=Корисник је члан организације и потом неможе бити додат као сарадник.
|
||||
settings.add_webhook=Додај Webhook
|
||||
settings.hooks_desc=Webhooks омогућавају спољашњим услугама да приме обавештења када се нешто одређено догоди на Gogs. Сазнајте више у овом <a target="_blank" href="%s">водичу за Webhooks</a>.
|
||||
settings.webhook_deletion=Уклони Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Послаћемо захтев <code>POST</code> на
|
||||
settings.payload_url=URL адреса за слање
|
||||
settings.content_type=Тип садржаја
|
||||
settings.secret=Тајна
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Корисничко име
|
||||
settings.slack_icon_url=URL адреса иконице
|
||||
settings.slack_color=Боја
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Webbhookar
|
||||
settings.githooks=Githookar
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumerisk
|
||||
settings.tracker_url_format_desc=Du kan använda platshållaren <code>{user} {repo} {index}</code> för användarnamn, reponamn, och ärendenummer.
|
||||
settings.pulls_desc=Aktivera pullförfrågningar för att ta emot publika bidrag
|
||||
settings.danger_zone=Högrisksområde
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Den nya ägaren har redan ett repo med det namnet. Vänligen välj ett annat namn.
|
||||
settings.convert=Konvertera Till Vanligt Repo
|
||||
settings.convert_desc=Du kan konvertera denna spegling till ett vanligt förråd. Detta kan inte ångras.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Denna användare kommer förlora sin åtkoms
|
||||
settings.remove_collaborator_success=Deltagare har tagits bort.
|
||||
settings.search_user_placeholder=Sök användare...
|
||||
settings.org_not_allowed_to_be_collaborator=Organisationen kan inte läggas till som en deltagare.
|
||||
settings.user_is_org_member=Änvändaren är en organisationsmedlem som inte kan bli tillagd som deltagare.
|
||||
settings.add_webhook=Lägg Till Webbhook
|
||||
settings.hooks_desc=Webbhookar påminner mycket om vanliga HTTP POST-händelseutlösare. När något inträffar i Gogs, kommer vi att meddela måldatorn som du anger. Läs mera i <a target="_blank" href="%s">Webbhook Guide</a>.
|
||||
settings.webhook_deletion=Ta Bort Webbhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs kommer skicka <code>POST</code>-anrop till webbad
|
||||
settings.payload_url=Adress till innehåll
|
||||
settings.content_type=Typ av innehåll
|
||||
settings.secret=Hemlighet
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Användarnamn
|
||||
settings.slack_icon_url=URL för ikon
|
||||
settings.slack_color=Färg
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=Web İstekleri
|
||||
settings.githooks=Git İstekleri
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumerik
|
||||
settings.tracker_url_format_desc=Kullanıcı adı, depo ismi ve hata indeksi için <code>{kullanıcı} {depo} {indeks}</code> tutucusunu kullanabilirsiniz.
|
||||
settings.pulls_desc=Herkese açık katkıları kabul etmek için değişiklik isteklerini etkinleştirin
|
||||
settings.danger_zone=Tehlike Alanı
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Yeni sahibin aynı isimde başka bir deposu var. Lütfen farklı bir isim seçin.
|
||||
settings.convert=Düzenli Depoya Dönüştür
|
||||
settings.convert_desc=Bu yansıyı düzenli bir depoya dönüştürebilirsiniz. Bu işlem geri alınamaz.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Kullanıcı, silme işleminden sonra bu depo
|
||||
settings.remove_collaborator_success=Katkıcı silindi.
|
||||
settings.search_user_placeholder=Kullanıcı ara...
|
||||
settings.org_not_allowed_to_be_collaborator=Organizasyon, bir katkıcı olarak eklenemez.
|
||||
settings.user_is_org_member=Kullanıcı organizasyon üyesi olduğu için katkıcı olarak eklenemez.
|
||||
settings.add_webhook=Web İsteği Ekle
|
||||
settings.hooks_desc=Web istekleri, HTTP POST olay tetikleyicileri gibidirler. Gogs'ta ne zaman bir şey olsa, hedef belirttiğiniz sunuculara bildirim yapabilecek duruma geliriz. Daha fazla bilgiyi <a target="_blank" href="%s">Web İstekleri Kılavuzu</a>'nda bulabilirsiniz.
|
||||
settings.webhook_deletion=Web İsteğini Sil
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs, meydana gelen olay ile birlikte belirttiğiniz b
|
||||
settings.payload_url=Yük Bağlantısı
|
||||
settings.content_type=İçerik Türü
|
||||
settings.secret=Gizli
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Kullanıcı Adı
|
||||
settings.slack_icon_url=Simge Bağlantısı
|
||||
settings.slack_color=Renk
|
||||
|
||||
@@ -39,7 +39,7 @@ your_profile=Ваш профіль
|
||||
your_settings=Ваші налаштування
|
||||
|
||||
activities=Дії
|
||||
pull_requests=пропозиція змін
|
||||
pull_requests=Запити на злиття
|
||||
issues=Обговорення
|
||||
|
||||
cancel=Скасувати
|
||||
@@ -69,7 +69,7 @@ app_name_helper=Вкажіть назву вашої організації, в
|
||||
repo_path=Кореневий шлях репозиторія
|
||||
repo_path_helper=До цього каталогу буде збережено всі зовнішні сховища Git.
|
||||
run_user=Запустити як
|
||||
run_user_helper=Користувач повинен мати доступ до папки репозиторіїв і запустити Gogs.
|
||||
run_user_helper=Користувач мусить мати доступ до кореню репозиторіїв та право на запуск Gogs.
|
||||
domain=Домен
|
||||
domain_helper=Це впливає на клонування через SSH.
|
||||
ssh_port=SSH порт
|
||||
@@ -192,9 +192,9 @@ AuthName=Назва авторизації
|
||||
AdminEmail=Електронна пошта адміністратора
|
||||
|
||||
NewBranchName=Ім'я нової гілки
|
||||
CommitSummary=Резюме комміту
|
||||
CommitMessage=Зафіксувати повідомлення
|
||||
CommitChoice=Зробити вибір
|
||||
CommitSummary=Резюме коміту
|
||||
CommitMessage=Повідомлення коміту
|
||||
CommitChoice=Зафіксувати вибір
|
||||
TreeName=Шлях до файлу
|
||||
Content=Вміст
|
||||
|
||||
@@ -305,7 +305,7 @@ add_email_success=Вашу нову адресу електронної пошт
|
||||
manage_ssh_keys=Керувати ключами SSH
|
||||
add_key=Додати ключ
|
||||
ssh_desc=Це список ключів SSH, пов'язані з вашим обліковим записом. Видаліть будь-які ключі, які не є вашими.
|
||||
ssh_helper=<strong>Потрібна допомога?</strong> Дивіться наш гід до <a href="%s"> генерації ключів SSH</a> або виправлення <a href="%s"> типових неполадок SSH</a>.
|
||||
ssh_helper=<strong>Потрібна допомога?</strong> Дивіться гід на GitHub з <a href="%s"> генерації ключів SSH</a> або виправлення <a href="%s">типових неполадок SSH</a>.
|
||||
add_new_key=Додати SSH ключа
|
||||
ssh_key_been_used=Було використано публічний ключ.
|
||||
ssh_key_name_used=Відкритий ключ з таким іменем уже існує.
|
||||
@@ -422,7 +422,7 @@ filter_branch_and_tag=Фільтрувати гілку або тег
|
||||
branches=Гілки
|
||||
tags=Теги
|
||||
issues=Проблеми
|
||||
pulls=Пропозиція Змін
|
||||
pulls=Запити на злиття
|
||||
labels=Мітка
|
||||
milestones=Проміжні етапи
|
||||
commits=Коміти
|
||||
@@ -449,12 +449,12 @@ editor.name_your_file=Дайте назву файлу...
|
||||
editor.filename_help=Щоб додати каталог, просто наберіть його ім'я, та натисніть /. Щоб видалити каталог, перейдіь на початок поля й натисніть клавішу backspace.
|
||||
editor.or=Або
|
||||
editor.cancel_lower=Скасувати
|
||||
editor.commit_changes=Порівняти зміни
|
||||
editor.commit_changes=Зафіксувати зміни
|
||||
editor.add_tmpl=Додати '%s/<filename>'
|
||||
editor.add=Додати '%s'
|
||||
editor.update=Оновити '%s'
|
||||
editor.delete=Видалити '%s'
|
||||
editor.commit_message_desc=Додати необов'язкове розширене описання...
|
||||
editor.commit_message_desc=Додати необов'язковий розширений опис...
|
||||
editor.commit_directly_to_this_branch=Зробіть комміт прямо в гілку <strong class="branch-name">%s</strong>.
|
||||
editor.create_new_branch=Створіть <strong>нову гілку</strong> для цього коміту та відкривайте запит на втягування.
|
||||
editor.new_branch_name_desc=Ім'я нової гілки...
|
||||
@@ -473,7 +473,7 @@ editor.add_subdir=Додати підкаталогу...
|
||||
editor.unable_to_upload_files=Не вдалося завантажити файли до '%s' через помилку: %v
|
||||
editor.upload_files_to_dir=Завантажувати файли до '%s'
|
||||
|
||||
commits.commit_history=Commit History
|
||||
commits.commit_history=Історія комітів
|
||||
commits.commits=Коміти
|
||||
commits.search=Знайти коміт
|
||||
commits.find=Пошук
|
||||
@@ -515,7 +515,7 @@ issues.filter_assginee_no_select=Етап не обрано
|
||||
issues.filter_type=Тип
|
||||
issues.filter_type.all_issues=Всі проблемы
|
||||
issues.filter_type.assigned_to_you=Призначене вам
|
||||
issues.filter_type.created_by_you=Створено тобою
|
||||
issues.filter_type.created_by_you=Створено вами
|
||||
issues.filter_type.mentioning_you=Вас згадано
|
||||
issues.filter_sort=Сортування
|
||||
issues.filter_sort.latest=Найновіші
|
||||
@@ -656,7 +656,11 @@ settings.protect_require_pull_request=Вимагати запрос на зли
|
||||
settings.protect_require_pull_request_desc=Увімкніть цю опцію для заборони прямого push у цю гілку. Коміт має бути запушений у іншу, незахищену гілку та влитий у цю через запрос на злиття.
|
||||
settings.protect_whitelist_committers=Білий список тих, хто може робити push у цю гілку
|
||||
settings.protect_whitelist_committers_desc=Додати людей або команди у білий список для виконання push до цієї гілки.
|
||||
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
|
||||
settings.protect_whitelist_users=Користувачі що можуть виконувати push до цієї гілки
|
||||
settings.protect_whitelist_search_users=Пошук користувачів
|
||||
settings.protect_whitelist_teams=Команди, члени яких можуть виконувати push до цієї гілки
|
||||
settings.protect_whitelist_search_teams=Пошук команд
|
||||
settings.update_protect_branch_success=Опції захисту цієї гілки було успішно оновлено!
|
||||
settings.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
settings.basic_settings=Основні налаштування
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Буквено-цифровий
|
||||
settings.tracker_url_format_desc=Ви можете використовувати заповнювач <code>{user} {repo} {index}</code> для ім'я користувача, назви репозиторію на номеру проблеми.
|
||||
settings.pulls_desc=Увімкнути публічні запроси на злиття
|
||||
settings.danger_zone=Небезпечна зона
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=Новий власник вже має репозиторій з такою назвою.
|
||||
settings.convert=Перетворити на звичайний репозиторій
|
||||
settings.convert_desc=Ви можете сконвертувати це дзеркало у звичайний репозиторій. Це не може бути повернуто.
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=Цей користувач більше н
|
||||
settings.remove_collaborator_success=Співавтора було видалено.
|
||||
settings.search_user_placeholder=Пошук користувача...
|
||||
settings.org_not_allowed_to_be_collaborator=Організації не можуть бути додані як співавтори.
|
||||
settings.user_is_org_member=Користувач входить в організацію, член якої не може бути доданий як співавтор.
|
||||
settings.add_webhook=Додати Webhook
|
||||
settings.hooks_desc=Web-хуки схожі на HTTP POST тригери подій. Яка б подія не виникла в Gogs, ми можемо обробити повідомлення про неї на сторонньому хості який ви задаєте. Взнайте більше у <a target="_blank" href="%s">Webhooks Guide</a>.
|
||||
settings.webhook_deletion=Видалити Webhook
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=Gogs відправляє <code>POST</code> запит
|
||||
settings.payload_url=URL розробника
|
||||
settings.content_type=Тип змісту
|
||||
settings.secret=Таємний код
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=Ім'я користувача
|
||||
settings.slack_icon_url=URL іконки
|
||||
settings.slack_color=Колір
|
||||
@@ -783,7 +788,7 @@ settings.deploy_key_deletion_success=Ключі для розгортуванн
|
||||
|
||||
diff.browse_source=Переглянути джерело
|
||||
diff.parent=батько
|
||||
diff.commit=комміт
|
||||
diff.commit=коміт
|
||||
diff.data_not_available=Жодних diff даних не доступно.
|
||||
diff.show_diff_stats=Показати статистику Diff
|
||||
diff.show_split_view=Розділений вигляд
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=要求通过合并请求提交代码
|
||||
settings.protect_require_pull_request_desc=启用该选项后代码将不能直接被推送到此分支,所有的代码提交都必须通过另一个非保护分支发起合并请求进行合并。
|
||||
settings.protect_whitelist_committers=限制可以推送代码的成员
|
||||
settings.protect_whitelist_committers_desc=添加用户或团队到可直接推送代码的白名单。
|
||||
settings.protect_whitelist_users=允许推送到此分支的用户
|
||||
settings.protect_whitelist_search_users=搜索用户
|
||||
settings.protect_whitelist_teams=允许其成员推送到此分支的团队
|
||||
settings.protect_whitelist_search_teams=搜索团队
|
||||
settings.update_protect_branch_success=此分支的保护选项更新成功!
|
||||
settings.hooks=管理 Web 钩子
|
||||
settings.githooks=管理 Git 钩子
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=英文字母数字组合形式
|
||||
settings.tracker_url_format_desc=您可以使用 <code>{user} {repo} {index}</code> 分别作为用户名、仓库名和工单索引的占位符。
|
||||
settings.pulls_desc=启用合并请求以接受社区贡献
|
||||
settings.danger_zone=危险操作区
|
||||
settings.cannot_fork_to_same_owner=您不能派生仓库到其当前的所有者。
|
||||
settings.new_owner_has_same_repo=新的仓库拥有者已经存在同名仓库!
|
||||
settings.convert=转换为普通仓库
|
||||
settings.convert_desc=您可以将该镜像仓库转换为普通仓库,且此操作不可逆。
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=此用户被删除后将不再拥有相关
|
||||
settings.remove_collaborator_success=被操作的协作者已经被收回权限!
|
||||
settings.search_user_placeholder=搜索用户...
|
||||
settings.org_not_allowed_to_be_collaborator=组织不允许被添加为仓库协作者!
|
||||
settings.user_is_org_member=被操作的用户是组织成员,因此无法添加为协作者!
|
||||
settings.add_webhook=添加 Web 钩子
|
||||
settings.hooks_desc=Web 钩子允许您设定在 Gogs 上发生指定事件时对指定 URL 发送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文档</a> 获取更多信息。
|
||||
settings.webhook_deletion=删除 Web 钩子
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=我们会通过 <code>POST</code> 请求将订阅事
|
||||
settings.payload_url=推送地址
|
||||
settings.content_type=数据格式
|
||||
settings.secret=密钥文本
|
||||
settings.secret_desc=密钥文本将被用于计算推送内容的 SHA256 HMAC 哈希值,并设置为 <code>X-Gogs-Signature</code> 请求头的值。
|
||||
settings.slack_username=服务名称
|
||||
settings.slack_icon_url=图标 URL
|
||||
settings.slack_color=颜色代码
|
||||
|
||||
@@ -656,6 +656,10 @@ settings.protect_require_pull_request=Require pull request instead direct pushin
|
||||
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.
|
||||
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.hooks=管理 Web 鉤子
|
||||
settings.githooks=管理 Git 鉤子
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumeric
|
||||
settings.tracker_url_format_desc=您可以使用 <code>{user} {repo} {index}</code> 分別作為用戶名、倉庫名和問題索引的占位符。
|
||||
settings.pulls_desc=啟用合併請求以接受社區貢獻
|
||||
settings.danger_zone=危險操作區
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=新的倉庫擁有者已經存在同名倉庫!
|
||||
settings.convert=轉換為正規倉庫
|
||||
settings.convert_desc=您可以將此鏡像轉成正規倉庫。此動做不可逆。
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=This user will no longer have collaboration
|
||||
settings.remove_collaborator_success=被操作的協作者已經被收回權限!
|
||||
settings.search_user_placeholder=搜索用戶...
|
||||
settings.org_not_allowed_to_be_collaborator=Organization is not allowed to be added as a collaborator.
|
||||
settings.user_is_org_member=被操作的用戶是組織成員,因此無法添加為協作者!
|
||||
settings.add_webhook=添加 Web 鉤子
|
||||
settings.hooks_desc=Web 鉤子允許您設定在 Gogs 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文檔</a> 獲取更多信息。
|
||||
settings.webhook_deletion=刪除 Web 鉤子
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事
|
||||
settings.payload_url=推送地址
|
||||
settings.content_type=數據格式
|
||||
settings.secret=密鑰文本
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=服務名稱
|
||||
settings.slack_icon_url=圖標 URL
|
||||
settings.slack_color=顏色代碼
|
||||
|
||||
@@ -473,7 +473,7 @@ editor.add_subdir=新增子目錄...
|
||||
editor.unable_to_upload_files=上傳檔案失敗到 '%s', 錯誤訊息: %v
|
||||
editor.upload_files_to_dir=上傳檔案到 '%s'
|
||||
|
||||
commits.commit_history=Commit History
|
||||
commits.commit_history=提交歷史
|
||||
commits.commits=次代碼提交
|
||||
commits.search=搜索提交歷史
|
||||
commits.find=查找
|
||||
@@ -656,7 +656,11 @@ settings.protect_require_pull_request=請使用 pull request 來更新(合併)
|
||||
settings.protect_require_pull_request_desc=啟用這個選項之後,程式碼將無法直接 Push 到這個分支,所有 Commit 必須先 Push 到另一個非保護的分支,再透過 Pull Request 來要求合併。
|
||||
settings.protect_whitelist_committers=限制誰可以 Push 到這個分支
|
||||
settings.protect_whitelist_committers_desc=新增用戶或團隊到可以直接push到這個分支的白名單。
|
||||
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
|
||||
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=此分支設置保護已更新成功!
|
||||
settings.hooks=管理 Web 鉤子
|
||||
settings.githooks=管理 Git 鉤子
|
||||
settings.basic_settings=基本設置
|
||||
@@ -684,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=字母及數字
|
||||
settings.tracker_url_format_desc=您可以使用 <code>{user} {repo} {index}</code> 分別作為用戶名、倉庫名和問題索引的占位符。
|
||||
settings.pulls_desc=啟用合併請求以接受社區貢獻
|
||||
settings.danger_zone=危險操作區
|
||||
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
|
||||
settings.new_owner_has_same_repo=新的倉庫擁有者已經存在同名倉庫!
|
||||
settings.convert=轉換為正規倉庫
|
||||
settings.convert_desc=您可以將此鏡像轉成正規倉庫。此動做不可逆。
|
||||
@@ -718,7 +723,6 @@ settings.collaborator_deletion_desc=刪除後此使用者將不再有協同者
|
||||
settings.remove_collaborator_success=被操作的協作者已經被收回權限!
|
||||
settings.search_user_placeholder=搜索用戶...
|
||||
settings.org_not_allowed_to_be_collaborator=組織不允許被加為協同者。
|
||||
settings.user_is_org_member=被操作的用戶是組織成員,因此無法添加為協作者!
|
||||
settings.add_webhook=添加 Web 鉤子
|
||||
settings.hooks_desc=Web 鉤子允許您設定在 Gogs 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文檔</a> 獲取更多信息。
|
||||
settings.webhook_deletion=刪除 Web 鉤子
|
||||
@@ -741,6 +745,7 @@ settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事
|
||||
settings.payload_url=推送地址
|
||||
settings.content_type=數據格式
|
||||
settings.secret=密鑰文本
|
||||
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
|
||||
settings.slack_username=服務名稱
|
||||
settings.slack_icon_url=圖標 URL
|
||||
settings.slack_color=顏色代碼
|
||||
|
||||
2
gogs.go
2
gogs.go
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.9.164.0220 / 0.10 RC"
|
||||
const APP_VER = "0.10.0.0227"
|
||||
|
||||
func init() {
|
||||
setting.AppVer = APP_VER
|
||||
|
||||
@@ -57,41 +57,45 @@ type Access struct {
|
||||
Mode AccessMode
|
||||
}
|
||||
|
||||
func accessLevel(e Engine, u *User, repo *Repository) (AccessMode, error) {
|
||||
func accessLevel(e Engine, userID int64, repo *Repository) (AccessMode, error) {
|
||||
mode := ACCESS_MODE_NONE
|
||||
// Everyone has read access to public repository
|
||||
if !repo.IsPrivate {
|
||||
mode = ACCESS_MODE_READ
|
||||
}
|
||||
|
||||
if u == nil {
|
||||
if userID <= 0 {
|
||||
return mode, nil
|
||||
}
|
||||
|
||||
if u.ID == repo.OwnerID {
|
||||
if userID == repo.OwnerID {
|
||||
return ACCESS_MODE_OWNER, nil
|
||||
}
|
||||
|
||||
a := &Access{UserID: u.ID, RepoID: repo.ID}
|
||||
if has, err := e.Get(a); !has || err != nil {
|
||||
access := &Access{
|
||||
UserID: userID,
|
||||
RepoID: repo.ID,
|
||||
}
|
||||
if has, err := e.Get(access); !has || err != nil {
|
||||
return mode, err
|
||||
}
|
||||
return a.Mode, nil
|
||||
return access.Mode, nil
|
||||
}
|
||||
|
||||
// AccessLevel returns the Access a user has to a repository. Will return NoneAccess if the
|
||||
// user does not have access. User can be nil!
|
||||
func AccessLevel(u *User, repo *Repository) (AccessMode, error) {
|
||||
return accessLevel(x, u, repo)
|
||||
// user does not have access.
|
||||
func AccessLevel(userID int64, repo *Repository) (AccessMode, error) {
|
||||
return accessLevel(x, userID, repo)
|
||||
}
|
||||
|
||||
func hasAccess(e Engine, u *User, repo *Repository, testMode AccessMode) (bool, error) {
|
||||
mode, err := accessLevel(e, u, repo)
|
||||
func hasAccess(e Engine, userID int64, repo *Repository, testMode AccessMode) (bool, error) {
|
||||
mode, err := accessLevel(e, userID, repo)
|
||||
return mode >= testMode, err
|
||||
}
|
||||
|
||||
// HasAccess returns true if someone has the request access level. User can be nil!
|
||||
func HasAccess(u *User, repo *Repository, testMode AccessMode) (bool, error) {
|
||||
return hasAccess(x, u, repo, testMode)
|
||||
func HasAccess(userID int64, repo *Repository, testMode AccessMode) (bool, error) {
|
||||
return hasAccess(x, userID, repo, testMode)
|
||||
}
|
||||
|
||||
// GetRepositoryAccesses finds all repositories with their access mode where a user has access but does not own.
|
||||
@@ -225,7 +229,7 @@ func (repo *Repository) recalculateAccesses(e Engine) error {
|
||||
return repo.recalculateTeamAccesses(e, 0)
|
||||
}
|
||||
|
||||
accessMap := make(map[int64]AccessMode, 20)
|
||||
accessMap := make(map[int64]AccessMode, 10)
|
||||
if err := repo.refreshCollaboratorAccesses(e, accessMap); err != nil {
|
||||
return fmt.Errorf("refreshCollaboratorAccesses: %v", err)
|
||||
}
|
||||
|
||||
@@ -335,7 +335,12 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
|
||||
}
|
||||
refMarked[issue.ID] = true
|
||||
|
||||
message := fmt.Sprintf(`<a href="%s/commit/%s">%s</a>`, repo.Link(), c.Sha1, c.Message)
|
||||
msgLines := strings.Split(c.Message, "\n")
|
||||
shortMsg := msgLines[0]
|
||||
if len(msgLines) > 2 {
|
||||
shortMsg += "..."
|
||||
}
|
||||
message := fmt.Sprintf(`<a href="%s/commit/%s">%s</a>`, repo.Link(), c.Sha1, shortMsg)
|
||||
if err = CreateRefComment(doer, repo, issue, message, c.Sha1); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -366,8 +366,10 @@ func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*
|
||||
case strings.HasPrefix(line, "index"):
|
||||
if curFile.IsDeleted {
|
||||
curFile.Index = line[6:46]
|
||||
} else {
|
||||
} else if len(line) >= 88 {
|
||||
curFile.Index = line[49:88]
|
||||
} else {
|
||||
curFile.Index = curFile.Name
|
||||
}
|
||||
break CHECK_TYPE
|
||||
case strings.HasPrefix(line, "similarity index 100%"):
|
||||
|
||||
@@ -618,7 +618,7 @@ func newIssue(e *xorm.Session, opts NewIssueOptions) (err error) {
|
||||
// Assume assignee is invalid and drop silently.
|
||||
opts.Issue.AssigneeID = 0
|
||||
if assignee != nil {
|
||||
valid, err := hasAccess(e, assignee, opts.Repo, ACCESS_MODE_READ)
|
||||
valid, err := hasAccess(e, assignee.ID, opts.Repo, ACCESS_MODE_READ)
|
||||
if err != nil {
|
||||
return fmt.Errorf("hasAccess [user_id: %d, repo_id: %d]: %v", assignee.ID, opts.Repo.ID, err)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ func init() {
|
||||
new(Issue), new(PullRequest), new(Comment), new(Attachment), new(IssueUser),
|
||||
new(Label), new(IssueLabel), new(Milestone),
|
||||
new(Mirror), new(Release), new(LoginSource), new(Webhook), new(HookTask),
|
||||
new(ProtectBranch),
|
||||
new(ProtectBranch), new(ProtectBranchWhitelist),
|
||||
new(Team), new(OrgUser), new(TeamUser), new(TeamRepo),
|
||||
new(Notice), new(EmailAddress))
|
||||
|
||||
|
||||
@@ -10,10 +10,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/go-xorm/builder"
|
||||
"github.com/go-xorm/xorm"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -32,10 +30,10 @@ func (org *User) IsOrgMember(uid int64) bool {
|
||||
}
|
||||
|
||||
func (org *User) getTeam(e Engine, name string) (*Team, error) {
|
||||
return getTeam(e, org.ID, name)
|
||||
return getTeamOfOrgByName(e, org.ID, name)
|
||||
}
|
||||
|
||||
// GetTeam returns named team of organization.
|
||||
// GetTeamOfOrgByName returns named team of organization.
|
||||
func (org *User) GetTeam(name string) (*Team, error) {
|
||||
return org.getTeam(x, name)
|
||||
}
|
||||
@@ -49,8 +47,9 @@ func (org *User) GetOwnerTeam() (*Team, error) {
|
||||
return org.getOwnerTeam(x)
|
||||
}
|
||||
|
||||
func (org *User) getTeams(e Engine) error {
|
||||
return e.Where("org_id=?", org.ID).Find(&org.Teams)
|
||||
func (org *User) getTeams(e Engine) (err error) {
|
||||
org.Teams, err = getTeamsByOrgID(e, org.ID)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetTeams returns all teams that belong to organization.
|
||||
@@ -58,6 +57,11 @@ func (org *User) GetTeams() error {
|
||||
return org.getTeams(x)
|
||||
}
|
||||
|
||||
// TeamsHaveAccessToRepo returns all teamsthat have given access level to the repository.
|
||||
func (org *User) TeamsHaveAccessToRepo(repoID int64, mode AccessMode) ([]*Team, error) {
|
||||
return GetTeamsHaveAccessToRepo(org.ID, repoID, mode)
|
||||
}
|
||||
|
||||
// GetMembers returns all members of organization.
|
||||
func (org *User) GetMembers() error {
|
||||
ous, err := GetOrgUsersByOrgID(org.ID)
|
||||
@@ -483,8 +487,7 @@ func (org *User) GetUserTeams(userID int64) ([]*Team, error) {
|
||||
return org.getUserTeams(x, userID)
|
||||
}
|
||||
|
||||
// GetUserRepositories returns a range of repositories in organization
|
||||
// that the user with the given userID has access to,
|
||||
// GetUserRepositories returns a range of repositories in organization which the user has access to,
|
||||
// and total number of records based on given condition.
|
||||
func (org *User) GetUserRepositories(userID int64, page, pageSize int) ([]*Repository, int64, error) {
|
||||
teamIDs, err := org.GetUserTeamIDs(userID)
|
||||
@@ -493,43 +496,43 @@ func (org *User) GetUserRepositories(userID int64, page, pageSize int) ([]*Repos
|
||||
}
|
||||
if len(teamIDs) == 0 {
|
||||
// user has no team but "IN ()" is invalid SQL
|
||||
teamIDs = []int64{-1} // there is no repo with id=-1
|
||||
teamIDs = []int64{-1} // there is no team with id=-1
|
||||
}
|
||||
|
||||
var teamRepoIDs []int64
|
||||
if err = x.Table("team_repo").In("team_id", teamIDs).Distinct("repo_id").Find(&teamRepoIDs); err != nil {
|
||||
return nil, 0, fmt.Errorf("get team repository IDs: %v", err)
|
||||
}
|
||||
if len(teamRepoIDs) == 0 {
|
||||
// team has no repo but "IN ()" is invalid SQL
|
||||
teamRepoIDs = []int64{-1} // there is no repo with id=-1
|
||||
}
|
||||
|
||||
if page <= 0 {
|
||||
page = 1
|
||||
}
|
||||
repos := make([]*Repository, 0, pageSize)
|
||||
// FIXME: use XORM chain operations instead of raw SQL.
|
||||
if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository
|
||||
INNER JOIN team_repo
|
||||
ON team_repo.repo_id = repository.id
|
||||
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s)
|
||||
GROUP BY repository.id
|
||||
ORDER BY updated_unix DESC
|
||||
LIMIT %d OFFSET %d`,
|
||||
strings.Join(base.Int64sToStrings(teamIDs), ","), pageSize, (page-1)*pageSize),
|
||||
org.ID, false).Find(&repos); err != nil {
|
||||
return nil, 0, fmt.Errorf("get repositories: %v", err)
|
||||
if err = x.Where("owner_id = ?", org.ID).
|
||||
And("is_private = ?", false).
|
||||
Or(builder.In("id", teamRepoIDs)).
|
||||
Desc("updated_unix").
|
||||
Limit(pageSize, (page-1)*pageSize).
|
||||
Find(&repos); err != nil {
|
||||
return nil, 0, fmt.Errorf("get user repositories: %v", err)
|
||||
}
|
||||
|
||||
results, err := x.Query(fmt.Sprintf(`SELECT repository.id FROM repository
|
||||
INNER JOIN team_repo
|
||||
ON team_repo.repo_id = repository.id
|
||||
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s)
|
||||
GROUP BY repository.id
|
||||
ORDER BY updated_unix DESC`,
|
||||
strings.Join(base.Int64sToStrings(teamIDs), ",")),
|
||||
org.ID, false)
|
||||
repoCount, err := x.Where("owner_id = ?", org.ID).
|
||||
And("is_private = ?", false).
|
||||
Or(builder.In("id", teamRepoIDs)).
|
||||
Count(new(Repository))
|
||||
if err != nil {
|
||||
log.Error(4, "count user repositories in organization: %v", err)
|
||||
return nil, 0, fmt.Errorf("count user repositories: %v", err)
|
||||
}
|
||||
|
||||
return repos, int64(len(results)), nil
|
||||
return repos, repoCount, nil
|
||||
}
|
||||
|
||||
// GetUserRepositories returns mirror repositories of the organization
|
||||
// that the user with the given userID has access to.
|
||||
// GetUserMirrorRepositories returns mirror repositories of the organization which the user has access to.
|
||||
func (org *User) GetUserMirrorRepositories(userID int64) ([]*Repository, error) {
|
||||
teamIDs, err := org.GetUserTeamIDs(userID)
|
||||
if err != nil {
|
||||
@@ -539,16 +542,24 @@ func (org *User) GetUserMirrorRepositories(userID int64) ([]*Repository, error)
|
||||
teamIDs = []int64{-1}
|
||||
}
|
||||
|
||||
var teamRepoIDs []int64
|
||||
err = x.Table("team_repo").In("team_id", teamIDs).Distinct("repo_id").Find(&teamRepoIDs)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get team repository ids: %v", err)
|
||||
}
|
||||
if len(teamRepoIDs) == 0 {
|
||||
// team has no repo but "IN ()" is invalid SQL
|
||||
teamRepoIDs = []int64{-1} // there is no repo with id=-1
|
||||
}
|
||||
|
||||
repos := make([]*Repository, 0, 10)
|
||||
if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository
|
||||
INNER JOIN team_repo
|
||||
ON team_repo.repo_id = repository.id AND repository.is_mirror = ?
|
||||
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s)
|
||||
GROUP BY repository.id
|
||||
ORDER BY updated_unix DESC`,
|
||||
strings.Join(base.Int64sToStrings(teamIDs), ",")),
|
||||
true, org.ID, false).Find(&repos); err != nil {
|
||||
return nil, fmt.Errorf("get repositories: %v", err)
|
||||
if err = x.Where("owner_id = ?", org.ID).
|
||||
And("is_private = ?", false).
|
||||
Or(builder.In("id", teamRepoIDs)).
|
||||
And("is_mirror = ?", true). // Don't move up because it's an independent condition
|
||||
Desc("updated_unix").
|
||||
Find(&repos); err != nil {
|
||||
return nil, fmt.Errorf("get user repositories: %v", err)
|
||||
}
|
||||
return repos, nil
|
||||
}
|
||||
|
||||
@@ -43,9 +43,14 @@ func (t *Team) IsOwnerTeam() bool {
|
||||
return t.Name == OWNER_TEAM
|
||||
}
|
||||
|
||||
// HasWriteAccess returns true if team has at least write level access mode.
|
||||
func (t *Team) HasWriteAccess() bool {
|
||||
return t.Authorize >= ACCESS_MODE_WRITE
|
||||
}
|
||||
|
||||
// IsTeamMember returns true if given user is a member of team.
|
||||
func (t *Team) IsMember(uid int64) bool {
|
||||
return IsTeamMember(t.OrgID, t.ID, uid)
|
||||
func (t *Team) IsMember(userID int64) bool {
|
||||
return IsTeamMember(t.OrgID, t.ID, userID)
|
||||
}
|
||||
|
||||
func (t *Team) getRepositories(e Engine) (err error) {
|
||||
@@ -166,15 +171,15 @@ func (t *Team) removeRepository(e Engine, repo *Repository, recalculate bool) (e
|
||||
if err = t.getMembers(e); err != nil {
|
||||
return fmt.Errorf("get team members: %v", err)
|
||||
}
|
||||
for _, u := range t.Members {
|
||||
has, err := hasAccess(e, u, repo, ACCESS_MODE_READ)
|
||||
for _, member := range t.Members {
|
||||
has, err := hasAccess(e, member.ID, repo, ACCESS_MODE_READ)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if has {
|
||||
continue
|
||||
}
|
||||
|
||||
if err = watchRepo(e, u.ID, repo.ID, false); err != nil {
|
||||
if err = watchRepo(e, member.ID, repo.ID, false); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -260,9 +265,9 @@ func NewTeam(t *Team) error {
|
||||
return sess.Commit()
|
||||
}
|
||||
|
||||
func getTeam(e Engine, orgId int64, name string) (*Team, error) {
|
||||
func getTeamOfOrgByName(e Engine, orgID int64, name string) (*Team, error) {
|
||||
t := &Team{
|
||||
OrgID: orgId,
|
||||
OrgID: orgID,
|
||||
LowerName: strings.ToLower(name),
|
||||
}
|
||||
has, err := e.Get(t)
|
||||
@@ -274,14 +279,14 @@ func getTeam(e Engine, orgId int64, name string) (*Team, error) {
|
||||
return t, nil
|
||||
}
|
||||
|
||||
// GetTeam returns team by given team name and organization.
|
||||
func GetTeam(orgId int64, name string) (*Team, error) {
|
||||
return getTeam(x, orgId, name)
|
||||
// GetTeamOfOrgByName returns team by given team name and organization.
|
||||
func GetTeamOfOrgByName(orgID int64, name string) (*Team, error) {
|
||||
return getTeamOfOrgByName(x, orgID, name)
|
||||
}
|
||||
|
||||
func getTeamByID(e Engine, teamId int64) (*Team, error) {
|
||||
func getTeamByID(e Engine, teamID int64) (*Team, error) {
|
||||
t := new(Team)
|
||||
has, err := e.Id(teamId).Get(t)
|
||||
has, err := e.Id(teamID).Get(t)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
@@ -291,8 +296,18 @@ func getTeamByID(e Engine, teamId int64) (*Team, error) {
|
||||
}
|
||||
|
||||
// GetTeamByID returns team by given ID.
|
||||
func GetTeamByID(teamId int64) (*Team, error) {
|
||||
return getTeamByID(x, teamId)
|
||||
func GetTeamByID(teamID int64) (*Team, error) {
|
||||
return getTeamByID(x, teamID)
|
||||
}
|
||||
|
||||
func getTeamsByOrgID(e Engine, orgID int64) ([]*Team, error) {
|
||||
teams := make([]*Team, 0, 3)
|
||||
return teams, e.Where("org_id = ?", orgID).Find(&teams)
|
||||
}
|
||||
|
||||
// GetTeamsByOrgID returns all teams belong to given organization.
|
||||
func GetTeamsByOrgID(orgID int64) ([]*Team, error) {
|
||||
return getTeamsByOrgID(x, orgID)
|
||||
}
|
||||
|
||||
// UpdateTeam updates information of team.
|
||||
@@ -429,39 +444,34 @@ func GetTeamMembers(teamID int64) ([]*User, error) {
|
||||
return getTeamMembers(x, teamID)
|
||||
}
|
||||
|
||||
func getUserTeams(e Engine, orgId, uid int64) ([]*Team, error) {
|
||||
tus := make([]*TeamUser, 0, 5)
|
||||
if err := e.Where("uid=?", uid).And("org_id=?", orgId).Find(&tus); err != nil {
|
||||
func getUserTeams(e Engine, orgID, userID int64) ([]*Team, error) {
|
||||
teamUsers := make([]*TeamUser, 0, 5)
|
||||
if err := e.Where("uid = ?", userID).And("org_id = ?", orgID).Find(&teamUsers); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ts := make([]*Team, len(tus))
|
||||
for i, tu := range tus {
|
||||
t := new(Team)
|
||||
has, err := e.Id(tu.TeamID).Get(t)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrTeamNotExist
|
||||
}
|
||||
ts[i] = t
|
||||
teamIDs := make([]int64, len(teamUsers))
|
||||
for i := range teamUsers {
|
||||
teamIDs[i] = teamUsers[i].TeamID
|
||||
}
|
||||
return ts, nil
|
||||
|
||||
teams := make([]*Team, 0, len(teamIDs))
|
||||
return teams, e.Where("org_id = ?", orgID).In("id", teamIDs).Find(&teams)
|
||||
}
|
||||
|
||||
// GetUserTeams returns all teams that user belongs to in given organization.
|
||||
func GetUserTeams(orgId, uid int64) ([]*Team, error) {
|
||||
return getUserTeams(x, orgId, uid)
|
||||
func GetUserTeams(orgID, userID int64) ([]*Team, error) {
|
||||
return getUserTeams(x, orgID, userID)
|
||||
}
|
||||
|
||||
// AddTeamMember adds new membership of given team to given organization,
|
||||
// the user will have membership to given organization automatically when needed.
|
||||
func AddTeamMember(orgID, teamID, uid int64) error {
|
||||
if IsTeamMember(orgID, teamID, uid) {
|
||||
func AddTeamMember(orgID, teamID, userID int64) error {
|
||||
if IsTeamMember(orgID, teamID, userID) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := AddOrgUser(orgID, uid); err != nil {
|
||||
if err := AddOrgUser(orgID, userID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -483,7 +493,7 @@ func AddTeamMember(orgID, teamID, uid int64) error {
|
||||
}
|
||||
|
||||
tu := &TeamUser{
|
||||
UID: uid,
|
||||
UID: userID,
|
||||
OrgID: orgID,
|
||||
TeamID: teamID,
|
||||
}
|
||||
@@ -502,7 +512,7 @@ func AddTeamMember(orgID, teamID, uid int64) error {
|
||||
|
||||
// We make sure it exists before.
|
||||
ou := new(OrgUser)
|
||||
if _, err = sess.Where("uid = ?", uid).And("org_id = ?", orgID).Get(ou); err != nil {
|
||||
if _, err = sess.Where("uid = ?", userID).And("org_id = ?", orgID).Get(ou); err != nil {
|
||||
return err
|
||||
}
|
||||
ou.NumTeams++
|
||||
@@ -600,18 +610,18 @@ func RemoveTeamMember(orgID, teamID, uid int64) error {
|
||||
|
||||
// TeamRepo represents an team-repository relation.
|
||||
type TeamRepo struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
ID int64
|
||||
OrgID int64 `xorm:"INDEX"`
|
||||
TeamID int64 `xorm:"UNIQUE(s)"`
|
||||
RepoID int64 `xorm:"UNIQUE(s)"`
|
||||
}
|
||||
|
||||
func hasTeamRepo(e Engine, orgID, teamID, repoID int64) bool {
|
||||
has, _ := e.Where("org_id=?", orgID).And("team_id=?", teamID).And("repo_id=?", repoID).Get(new(TeamRepo))
|
||||
has, _ := e.Where("org_id = ?", orgID).And("team_id = ?", teamID).And("repo_id = ?", repoID).Get(new(TeamRepo))
|
||||
return has
|
||||
}
|
||||
|
||||
// HasTeamRepo returns true if given repository belongs to team.
|
||||
// HasTeamRepo returns true if given team has access to the repository of the organization.
|
||||
func HasTeamRepo(orgID, teamID, repoID int64) bool {
|
||||
return hasTeamRepo(x, orgID, teamID, repoID)
|
||||
}
|
||||
@@ -642,3 +652,13 @@ func removeTeamRepo(e Engine, teamID, repoID int64) error {
|
||||
func RemoveTeamRepo(teamID, repoID int64) error {
|
||||
return removeTeamRepo(x, teamID, repoID)
|
||||
}
|
||||
|
||||
// GetTeamsHaveAccessToRepo returns all teams in an organization that have given access level to the repository.
|
||||
func GetTeamsHaveAccessToRepo(orgID, repoID int64, mode AccessMode) ([]*Team, error) {
|
||||
teams := make([]*Team, 0, 5)
|
||||
return teams, x.Where("team.authorize >= ?", mode).
|
||||
Join("INNER", "team_repo", "team_repo.team_id = team.id").
|
||||
And("team_repo.org_id = ?", orgID).
|
||||
And("team_repo.repo_id = ?", repoID).
|
||||
Find(&teams)
|
||||
}
|
||||
|
||||
@@ -329,14 +329,14 @@ func (repo *Repository) DeleteWiki() {
|
||||
}
|
||||
}
|
||||
|
||||
// getAssignees returns a list of users who can be assigned to issues in this repository.
|
||||
func (repo *Repository) getAssignees(e Engine) (_ []*User, err error) {
|
||||
// getUsersWithAccesMode returns users that have at least given access mode to the repository.
|
||||
func (repo *Repository) getUsersWithAccesMode(e Engine, mode AccessMode) (_ []*User, err error) {
|
||||
if err = repo.getOwner(e); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
accesses := make([]*Access, 0, 10)
|
||||
if err = e.Where("repo_id = ? AND mode >= ?", repo.ID, ACCESS_MODE_READ).Find(&accesses); err != nil {
|
||||
if err = e.Where("repo_id = ? AND mode >= ?", repo.ID, mode).Find(&accesses); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -360,7 +360,12 @@ func (repo *Repository) getAssignees(e Engine) (_ []*User, err error) {
|
||||
return users, nil
|
||||
}
|
||||
|
||||
// GetAssignees returns all users that have write access and can be assigned to issues
|
||||
// getAssignees returns a list of users who can be assigned to issues in this repository.
|
||||
func (repo *Repository) getAssignees(e Engine) (_ []*User, err error) {
|
||||
return repo.getUsersWithAccesMode(e, ACCESS_MODE_READ)
|
||||
}
|
||||
|
||||
// GetAssignees returns all users that have read access and can be assigned to issues
|
||||
// of the repository,
|
||||
func (repo *Repository) GetAssignees() (_ []*User, err error) {
|
||||
return repo.getAssignees(x)
|
||||
@@ -371,6 +376,11 @@ func (repo *Repository) GetAssigneeByID(userID int64) (*User, error) {
|
||||
return GetAssigneeByID(repo, userID)
|
||||
}
|
||||
|
||||
// GetWriters returns all users that have write access to the repository.
|
||||
func (repo *Repository) GetWriters() (_ []*User, err error) {
|
||||
return repo.getUsersWithAccesMode(x, ACCESS_MODE_WRITE)
|
||||
}
|
||||
|
||||
// GetMilestoneByID returns the milestone belongs to repository by given ID.
|
||||
func (repo *Repository) GetMilestoneByID(milestoneID int64) (*Milestone, error) {
|
||||
return GetMilestoneByRepoID(repo.ID, milestoneID)
|
||||
@@ -419,8 +429,8 @@ func (repo *Repository) ComposeCompareURL(oldCommitID, newCommitID string) strin
|
||||
return fmt.Sprintf("%s/%s/compare/%s...%s", repo.MustOwner().Name, repo.Name, oldCommitID, newCommitID)
|
||||
}
|
||||
|
||||
func (repo *Repository) HasAccess(u *User) bool {
|
||||
has, _ := HasAccess(u, repo, ACCESS_MODE_READ)
|
||||
func (repo *Repository) HasAccess(userID int64) bool {
|
||||
has, _ := HasAccess(userID, repo, ACCESS_MODE_READ)
|
||||
return has
|
||||
}
|
||||
|
||||
@@ -655,14 +665,14 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
||||
|
||||
wikiRemotePath := wikiRemoteURL(opts.RemoteAddr)
|
||||
if len(wikiRemotePath) > 0 {
|
||||
RemoveAllWithNotice("Repository wiki path erase before creation", repoPath)
|
||||
RemoveAllWithNotice("Repository wiki path erase before creation", wikiPath)
|
||||
if err = git.Clone(wikiRemotePath, wikiPath, git.CloneRepoOptions{
|
||||
Mirror: true,
|
||||
Quiet: true,
|
||||
Timeout: migrateTimeout,
|
||||
}); err != nil {
|
||||
log.Trace("Fail to clone wiki: %v", err)
|
||||
RemoveAllWithNotice("Delete repository wiki for initialization failure", repoPath)
|
||||
RemoveAllWithNotice("Delete repository wiki for initialization failure", wikiPath)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1015,10 +1025,10 @@ func CreateRepository(u *User, opts CreateRepoOptions) (_ *Repository, err error
|
||||
}
|
||||
|
||||
_, stderr, err := process.ExecDir(-1,
|
||||
repoPath, fmt.Sprintf("CreateRepository(git update-server-info): %s", repoPath),
|
||||
repoPath, fmt.Sprintf("CreateRepository 'git update-server-info': %s", repoPath),
|
||||
"git", "update-server-info")
|
||||
if err != nil {
|
||||
return nil, errors.New("CreateRepository(git update-server-info): " + stderr)
|
||||
return nil, errors.New("CreateRepository 'git update-server-info': " + stderr)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1391,6 +1401,8 @@ func DeleteRepository(uid, repoID int64) error {
|
||||
&Release{RepoID: repoID},
|
||||
&Collaboration{RepoID: repoID},
|
||||
&PullRequest{BaseRepoID: repoID},
|
||||
&ProtectBranch{RepoID: repoID},
|
||||
&ProtectBranchWhitelist{RepoID: repoID},
|
||||
); err != nil {
|
||||
return fmt.Errorf("deleteBeans: %v", err)
|
||||
}
|
||||
|
||||
@@ -6,8 +6,12 @@ package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
)
|
||||
|
||||
type Branch struct {
|
||||
@@ -58,6 +62,20 @@ func (br *Branch) GetCommit() (*git.Commit, error) {
|
||||
return gitRepo.GetBranchCommit(br.Name)
|
||||
}
|
||||
|
||||
type ProtectBranchWhitelist struct {
|
||||
ID int64
|
||||
ProtectBranchID int64
|
||||
RepoID int64 `xorm:"UNIQUE(protect_branch_whitelist)"`
|
||||
Name string `xorm:"UNIQUE(protect_branch_whitelist)"`
|
||||
UserID int64 `xorm:"UNIQUE(protect_branch_whitelist)"`
|
||||
}
|
||||
|
||||
// IsUserInProtectBranchWhitelist returns true if given user is in the whitelist of a branch in a repository.
|
||||
func IsUserInProtectBranchWhitelist(repoID, userID int64, branch string) bool {
|
||||
has, err := x.Where("repo_id = ?", repoID).And("user_id = ?", userID).And("name = ?", branch).Get(new(ProtectBranchWhitelist))
|
||||
return has && err == nil
|
||||
}
|
||||
|
||||
// ProtectBranch contains options of a protected branch.
|
||||
type ProtectBranch struct {
|
||||
ID int64
|
||||
@@ -65,6 +83,9 @@ type ProtectBranch struct {
|
||||
Name string `xorm:"UNIQUE(protect_branch)"`
|
||||
Protected bool
|
||||
RequirePullRequest bool
|
||||
EnableWhitelist bool
|
||||
WhitelistUserIDs string `xorm:"TEXT"`
|
||||
WhitelistTeamIDs string `xorm:"TEXT"`
|
||||
}
|
||||
|
||||
// GetProtectBranchOfRepoByName returns *ProtectBranch by branch name in given repostiory.
|
||||
@@ -94,15 +115,135 @@ func IsBranchOfRepoRequirePullRequest(repoID int64, name string) bool {
|
||||
// UpdateProtectBranch saves branch protection options.
|
||||
// If ID is 0, it creates a new record. Otherwise, updates existing record.
|
||||
func UpdateProtectBranch(protectBranch *ProtectBranch) (err error) {
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
if err = sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if protectBranch.ID == 0 {
|
||||
if _, err = x.Insert(protectBranch); err != nil {
|
||||
if _, err = sess.Insert(protectBranch); err != nil {
|
||||
return fmt.Errorf("Insert: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
_, err = x.Id(protectBranch.ID).AllCols().Update(protectBranch)
|
||||
return err
|
||||
if _, err = sess.Id(protectBranch.ID).AllCols().Update(protectBranch); err != nil {
|
||||
return fmt.Errorf("Update: %v", err)
|
||||
}
|
||||
|
||||
return sess.Commit()
|
||||
}
|
||||
|
||||
// UpdateOrgProtectBranch saves branch protection options of organizational repository.
|
||||
// If ID is 0, it creates a new record. Otherwise, updates existing record.
|
||||
// This function also performs check if whitelist user and team's IDs have been changed
|
||||
// to avoid unnecessary whitelist delete and regenerate.
|
||||
func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whitelistUserIDs, whitelistTeamIDs string) (err error) {
|
||||
if err = repo.GetOwner(); err != nil {
|
||||
return fmt.Errorf("GetOwner: %v", err)
|
||||
} else if !repo.Owner.IsOrganization() {
|
||||
return fmt.Errorf("expect repository owner to be an organization")
|
||||
}
|
||||
|
||||
hasUsersChanged := false
|
||||
validUserIDs := base.StringsToInt64s(strings.Split(protectBranch.WhitelistUserIDs, ","))
|
||||
if protectBranch.WhitelistUserIDs != whitelistUserIDs {
|
||||
hasUsersChanged = true
|
||||
userIDs := base.StringsToInt64s(strings.Split(whitelistUserIDs, ","))
|
||||
validUserIDs = make([]int64, 0, len(userIDs))
|
||||
for _, userID := range userIDs {
|
||||
has, err := HasAccess(userID, repo, ACCESS_MODE_WRITE)
|
||||
if err != nil {
|
||||
return fmt.Errorf("HasAccess [user_id: %d, repo_id: %d]: %v", userID, protectBranch.RepoID, err)
|
||||
} else if !has {
|
||||
continue // Drop invalid user ID
|
||||
}
|
||||
|
||||
validUserIDs = append(validUserIDs, userID)
|
||||
}
|
||||
|
||||
protectBranch.WhitelistUserIDs = strings.Join(base.Int64sToStrings(validUserIDs), ",")
|
||||
}
|
||||
|
||||
hasTeamsChanged := false
|
||||
validTeamIDs := base.StringsToInt64s(strings.Split(protectBranch.WhitelistTeamIDs, ","))
|
||||
if protectBranch.WhitelistTeamIDs != whitelistTeamIDs {
|
||||
hasTeamsChanged = true
|
||||
teamIDs := base.StringsToInt64s(strings.Split(whitelistTeamIDs, ","))
|
||||
teams, err := GetTeamsHaveAccessToRepo(repo.OwnerID, repo.ID, ACCESS_MODE_WRITE)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetTeamsHaveAccessToRepo [org_id: %d, repo_id: %d]: %v", repo.OwnerID, repo.ID, err)
|
||||
}
|
||||
validTeamIDs = make([]int64, 0, len(teams))
|
||||
for i := range teams {
|
||||
if teams[i].HasWriteAccess() && com.IsSliceContainsInt64(teamIDs, teams[i].ID) {
|
||||
validTeamIDs = append(validTeamIDs, teams[i].ID)
|
||||
}
|
||||
}
|
||||
|
||||
protectBranch.WhitelistTeamIDs = strings.Join(base.Int64sToStrings(validTeamIDs), ",")
|
||||
}
|
||||
|
||||
// Merge users and members of teams
|
||||
var whitelists []*ProtectBranchWhitelist
|
||||
if hasUsersChanged || hasTeamsChanged {
|
||||
mergedUserIDs := make(map[int64]bool)
|
||||
for _, userID := range validUserIDs {
|
||||
// Empty whitelist users can cause an ID with 0
|
||||
if userID != 0 {
|
||||
mergedUserIDs[userID] = true
|
||||
}
|
||||
}
|
||||
|
||||
for _, teamID := range validTeamIDs {
|
||||
members, err := GetTeamMembers(teamID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetTeamMembers [team_id: %d]: %v", teamID, err)
|
||||
}
|
||||
|
||||
for i := range members {
|
||||
mergedUserIDs[members[i].ID] = true
|
||||
}
|
||||
}
|
||||
|
||||
whitelists = make([]*ProtectBranchWhitelist, 0, len(mergedUserIDs))
|
||||
for userID := range mergedUserIDs {
|
||||
whitelists = append(whitelists, &ProtectBranchWhitelist{
|
||||
ProtectBranchID: protectBranch.ID,
|
||||
RepoID: repo.ID,
|
||||
Name: protectBranch.Name,
|
||||
UserID: userID,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
if err = sess.Begin(); err != nil {
|
||||
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)
|
||||
}
|
||||
|
||||
// Refresh whitelists
|
||||
if hasUsersChanged || hasTeamsChanged {
|
||||
if _, err = sess.Delete(&ProtectBranchWhitelist{ProtectBranchID: protectBranch.ID}); err != nil {
|
||||
return fmt.Errorf("delete old protect branch whitelists: %v", err)
|
||||
} else if _, err = sess.Insert(whitelists); err != nil {
|
||||
return fmt.Errorf("insert new protect branch whitelists: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
return sess.Commit()
|
||||
}
|
||||
|
||||
// GetProtectBranchesByRepoID returns a list of *ProtectBranch in given repostiory.
|
||||
|
||||
@@ -62,17 +62,10 @@ func (repo *Repository) AddCollaborator(u *User) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err = sess.InsertOne(collaboration); err != nil {
|
||||
if _, err = sess.Insert(collaboration); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if repo.Owner.IsOrganization() {
|
||||
err = repo.recalculateTeamAccesses(sess, 0)
|
||||
} else {
|
||||
err = repo.recalculateAccesses(sess)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("recalculateAccesses 'team=%v': %v", repo.Owner.IsOrganization(), err)
|
||||
} else if err = repo.recalculateAccesses(sess); err != nil {
|
||||
return fmt.Errorf("recalculateAccesses [repo_id: %v]: %v", repo.ID, err)
|
||||
}
|
||||
|
||||
return sess.Commit()
|
||||
@@ -148,6 +141,19 @@ func (repo *Repository) ChangeCollaborationAccessMode(userID int64, mode AccessM
|
||||
}
|
||||
collaboration.Mode = mode
|
||||
|
||||
// If it's an organizational repository, merge with team access level for highest permission
|
||||
if repo.Owner.IsOrganization() {
|
||||
teams, err := GetUserTeams(repo.OwnerID, userID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetUserTeams: [org_id: %d, user_id: %d]: %v", repo.OwnerID, userID, err)
|
||||
}
|
||||
for i := range teams {
|
||||
if mode < teams[i].Authorize {
|
||||
mode = teams[i].Authorize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
if err = sess.Begin(); err != nil {
|
||||
@@ -173,7 +179,7 @@ func (repo *Repository) ChangeCollaborationAccessMode(userID int64, mode AccessM
|
||||
_, err = sess.Insert(access)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("update access table: %v", err)
|
||||
return fmt.Errorf("update/insert access table: %v", err)
|
||||
}
|
||||
|
||||
return sess.Commit()
|
||||
|
||||
@@ -736,7 +736,7 @@ func DeleteDeployKey(doer *User, id int64) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetRepositoryByID: %v", err)
|
||||
}
|
||||
yes, err := HasAccess(doer, repo, ACCESS_MODE_ADMIN)
|
||||
yes, err := HasAccess(doer.ID, repo, ACCESS_MODE_ADMIN)
|
||||
if err != nil {
|
||||
return fmt.Errorf("HasAccess: %v", err)
|
||||
} else if !yes {
|
||||
|
||||
@@ -385,18 +385,18 @@ func (u *User) DeleteAvatar() error {
|
||||
|
||||
// IsAdminOfRepo returns true if user has admin or higher access of repository.
|
||||
func (u *User) IsAdminOfRepo(repo *Repository) bool {
|
||||
has, err := HasAccess(u, repo, ACCESS_MODE_ADMIN)
|
||||
has, err := HasAccess(u.ID, repo, ACCESS_MODE_ADMIN)
|
||||
if err != nil {
|
||||
log.Error(3, "HasAccess: %v", err)
|
||||
log.Error(2, "HasAccess: %v", err)
|
||||
}
|
||||
return has
|
||||
}
|
||||
|
||||
// IsWriterOfRepo returns true if user has write access to given repository.
|
||||
func (u *User) IsWriterOfRepo(repo *Repository) bool {
|
||||
has, err := HasAccess(u, repo, ACCESS_MODE_WRITE)
|
||||
has, err := HasAccess(u.ID, repo, ACCESS_MODE_WRITE)
|
||||
if err != nil {
|
||||
log.Error(3, "HasAccess: %v", err)
|
||||
log.Error(2, "HasAccess: %v", err)
|
||||
}
|
||||
return has
|
||||
}
|
||||
@@ -911,7 +911,7 @@ func GetUserByID(id int64) (*User, error) {
|
||||
|
||||
// GetAssigneeByID returns the user with write access of repository by given ID.
|
||||
func GetAssigneeByID(repo *Repository, userID int64) (*User, error) {
|
||||
has, err := HasAccess(&User{ID: userID}, repo, ACCESS_MODE_READ)
|
||||
has, err := HasAccess(userID, repo, ACCESS_MODE_READ)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha256"
|
||||
"crypto/tls"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
@@ -118,7 +121,7 @@ func (w *Webhook) AfterSet(colName string, _ xorm.Cell) {
|
||||
case "events":
|
||||
w.HookEvent = &HookEvent{}
|
||||
if err = json.Unmarshal([]byte(w.Events), w.HookEvent); err != nil {
|
||||
log.Error(3, "Unmarshal[%d]: %v", w.ID, err)
|
||||
log.Error(3, "Unmarshal [%d]: %v", w.ID, err)
|
||||
}
|
||||
case "created_unix":
|
||||
w.Created = time.Unix(w.CreatedUnix, 0).Local()
|
||||
@@ -130,7 +133,7 @@ func (w *Webhook) AfterSet(colName string, _ xorm.Cell) {
|
||||
func (w *Webhook) GetSlackHook() *SlackMeta {
|
||||
s := &SlackMeta{}
|
||||
if err := json.Unmarshal([]byte(w.Meta), s); err != nil {
|
||||
log.Error(4, "webhook.GetSlackHook(%d): %v", w.ID, err)
|
||||
log.Error(2, "GetSlackHook [%d]: %v", w.ID, err)
|
||||
}
|
||||
return s
|
||||
}
|
||||
@@ -197,8 +200,17 @@ func getWebhook(bean *Webhook) (*Webhook, error) {
|
||||
return bean, nil
|
||||
}
|
||||
|
||||
// GetWebhookByRepoID returns webhook of repository by given ID.
|
||||
func GetWebhookByRepoID(repoID, id int64) (*Webhook, error) {
|
||||
// GetWebhookByID returns webhook by given ID.
|
||||
// Use this function with caution of accessing unauthorized webhook,
|
||||
// which means should only be used in non-user interactive functions.
|
||||
func GetWebhookByID(id int64) (*Webhook, error) {
|
||||
return getWebhook(&Webhook{
|
||||
ID: id,
|
||||
})
|
||||
}
|
||||
|
||||
// GetWebhookOfRepoByID returns webhook of repository by given ID.
|
||||
func GetWebhookOfRepoByID(repoID, id int64) (*Webhook, error) {
|
||||
return getWebhook(&Webhook{
|
||||
ID: id,
|
||||
RepoID: repoID,
|
||||
@@ -293,8 +305,9 @@ const (
|
||||
)
|
||||
|
||||
var hookTaskTypes = map[string]HookTaskType{
|
||||
"gogs": GOGS,
|
||||
"slack": SLACK,
|
||||
"gogs": GOGS,
|
||||
"slack": SLACK,
|
||||
"discord": DISCORD,
|
||||
}
|
||||
|
||||
// ToHookTaskType returns HookTaskType by given name.
|
||||
@@ -308,6 +321,8 @@ func (t HookTaskType) Name() string {
|
||||
return "gogs"
|
||||
case SLACK:
|
||||
return "slack"
|
||||
case DISCORD:
|
||||
return "discord"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -346,6 +361,7 @@ type HookTask struct {
|
||||
UUID string
|
||||
Type HookTaskType
|
||||
URL string `xorm:"TEXT"`
|
||||
Signature string `xorm:"TEXT"`
|
||||
api.Payloader `xorm:"-"`
|
||||
PayloadContent string `xorm:"TEXT"`
|
||||
ContentType HookContentType
|
||||
@@ -433,29 +449,14 @@ func UpdateHookTask(t *HookTask) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// PrepareWebhooks adds new webhooks to task queue for given payload.
|
||||
func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) error {
|
||||
ws, err := GetActiveWebhooksByRepoID(repo.ID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetActiveWebhooksByRepoID: %v", err)
|
||||
}
|
||||
|
||||
// check if repo belongs to org and append additional webhooks
|
||||
if repo.MustOwner().IsOrganization() {
|
||||
// get hooks for org
|
||||
orgws, err := GetActiveWebhooksByOrgID(repo.OwnerID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetActiveWebhooksByOrgID: %v", err)
|
||||
}
|
||||
ws = append(ws, orgws...)
|
||||
}
|
||||
|
||||
if len(ws) == 0 {
|
||||
// prepareWebhooks adds list of webhooks to task queue.
|
||||
func prepareWebhooks(repo *Repository, event HookEventType, p api.Payloader, webhooks []*Webhook) (err error) {
|
||||
if len(webhooks) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var payloader api.Payloader
|
||||
for _, w := range ws {
|
||||
for _, w := range webhooks {
|
||||
switch event {
|
||||
case HOOK_EVENT_CREATE:
|
||||
if !w.HasCreateEvent() {
|
||||
@@ -484,15 +485,26 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err
|
||||
return fmt.Errorf("GetDiscordPayload: %v", err)
|
||||
}
|
||||
default:
|
||||
p.SetSecret(w.Secret)
|
||||
payloader = p
|
||||
}
|
||||
|
||||
var signature string
|
||||
if len(w.Secret) > 0 {
|
||||
data, err := payloader.JSONPayload()
|
||||
if err != nil {
|
||||
log.Error(2, "prepareWebhooks.JSONPayload: %v", err)
|
||||
}
|
||||
sig := hmac.New(sha256.New, []byte(w.Secret))
|
||||
sig.Write(data)
|
||||
signature = hex.EncodeToString(sig.Sum(nil))
|
||||
}
|
||||
|
||||
if err = CreateHookTask(&HookTask{
|
||||
RepoID: repo.ID,
|
||||
HookID: w.ID,
|
||||
Type: w.HookTaskType,
|
||||
URL: w.URL,
|
||||
Signature: signature,
|
||||
Payloader: payloader,
|
||||
ContentType: w.ContentType,
|
||||
EventType: event,
|
||||
@@ -504,12 +516,41 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err
|
||||
return nil
|
||||
}
|
||||
|
||||
// PrepareWebhooks adds all active webhooks to task queue.
|
||||
func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) error {
|
||||
webhooks, err := GetActiveWebhooksByRepoID(repo.ID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetActiveWebhooksByRepoID [%d]: %v", repo.ID, err)
|
||||
}
|
||||
|
||||
// check if repo belongs to org and append additional webhooks
|
||||
if repo.MustOwner().IsOrganization() {
|
||||
// get hooks for org
|
||||
orgws, err := GetActiveWebhooksByOrgID(repo.OwnerID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetActiveWebhooksByOrgID [%d]: %v", repo.OwnerID, err)
|
||||
}
|
||||
webhooks = append(webhooks, orgws...)
|
||||
}
|
||||
return prepareWebhooks(repo, event, p, webhooks)
|
||||
}
|
||||
|
||||
// TestWebhook adds the test webhook matches the ID to task queue.
|
||||
func TestWebhook(repo *Repository, event HookEventType, p api.Payloader, webhookID int64) error {
|
||||
webhook, err := GetWebhookOfRepoByID(repo.ID, webhookID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetWebhookOfRepoByID [repo_id: %d, id: %d]: %v", repo.ID, webhookID, err)
|
||||
}
|
||||
return prepareWebhooks(repo, event, p, []*Webhook{webhook})
|
||||
}
|
||||
|
||||
func (t *HookTask) deliver() {
|
||||
t.IsDelivered = true
|
||||
|
||||
timeout := time.Duration(setting.Webhook.DeliverTimeout) * time.Second
|
||||
req := httplib.Post(t.URL).SetTimeout(timeout, timeout).
|
||||
Header("X-Gogs-Delivery", t.UUID).
|
||||
Header("X-Gogs-Signature", t.Signature).
|
||||
Header("X-Gogs-Event", string(t.EventType)).
|
||||
SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify})
|
||||
|
||||
@@ -541,9 +582,9 @@ func (t *HookTask) deliver() {
|
||||
}
|
||||
|
||||
// Update webhook last delivery status.
|
||||
w, err := GetWebhookByRepoID(t.RepoID, t.HookID)
|
||||
w, err := GetWebhookByID(t.HookID)
|
||||
if err != nil {
|
||||
log.Error(5, "GetWebhookByID: %v", err)
|
||||
log.Error(3, "GetWebhookByID: %v", err)
|
||||
return
|
||||
}
|
||||
if t.IsSucceed {
|
||||
@@ -552,7 +593,7 @@ func (t *HookTask) deliver() {
|
||||
w.LastStatus = HOOK_STATUS_FAILED
|
||||
}
|
||||
if err = UpdateWebhook(w); err != nil {
|
||||
log.Error(5, "UpdateWebhook: %v", err)
|
||||
log.Error(3, "UpdateWebhook: %v", err)
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -12,6 +12,8 @@ import (
|
||||
|
||||
"github.com/gogits/git-module"
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
type DiscordEmbedFooterObject struct {
|
||||
@@ -46,8 +48,6 @@ type DiscordPayload struct {
|
||||
Embeds []*DiscordEmbedObject `json:"embeds"`
|
||||
}
|
||||
|
||||
func (p *DiscordPayload) SetSecret(_ string) {}
|
||||
|
||||
func (p *DiscordPayload) JSONPayload() ([]byte, error) {
|
||||
data, err := json.MarshalIndent(p, "", " ")
|
||||
if err != nil {
|
||||
@@ -56,6 +56,10 @@ func (p *DiscordPayload) JSONPayload() ([]byte, error) {
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func DiscordTextFormatter(s string) string {
|
||||
return strings.Split(s, "\n")[0]
|
||||
}
|
||||
|
||||
func DiscordLinkFormatter(url string, text string) string {
|
||||
return fmt.Sprintf("[%s](%s)", text, url)
|
||||
}
|
||||
@@ -78,6 +82,7 @@ func getDiscordCreatePayload(p *api.CreatePayload, slack *SlackMeta) (*DiscordPa
|
||||
AvatarURL: slack.IconURL,
|
||||
Embeds: []*DiscordEmbedObject{{
|
||||
Description: content,
|
||||
URL: setting.AppUrl + p.Sender.UserName,
|
||||
Color: int(color),
|
||||
Author: &DiscordEmbedAuthorObject{
|
||||
Name: p.Sender.UserName,
|
||||
@@ -113,7 +118,7 @@ func getDiscordPushPayload(p *api.PushPayload, slack *SlackMeta) (*DiscordPayloa
|
||||
|
||||
// for each commit, generate attachment text
|
||||
for i, commit := range p.Commits {
|
||||
content += fmt.Sprintf("%s %s - %s", DiscordSHALinkFormatter(commit.URL, commit.ID[:7]), SlackShortTextFormatter(commit.Message), commit.Author.Name)
|
||||
content += fmt.Sprintf("%s %s - %s", DiscordSHALinkFormatter(commit.URL, commit.ID[:7]), DiscordTextFormatter(commit.Message), commit.Author.Name)
|
||||
// add linebreak to each commit but the last
|
||||
if i < len(p.Commits)-1 {
|
||||
content += "\n"
|
||||
@@ -126,6 +131,7 @@ func getDiscordPushPayload(p *api.PushPayload, slack *SlackMeta) (*DiscordPayloa
|
||||
AvatarURL: slack.IconURL,
|
||||
Embeds: []*DiscordEmbedObject{{
|
||||
Description: content,
|
||||
URL: setting.AppUrl + p.Sender.UserName,
|
||||
Color: int(color),
|
||||
Author: &DiscordEmbedAuthorObject{
|
||||
Name: p.Sender.UserName,
|
||||
|
||||
@@ -39,8 +39,6 @@ type SlackPayload struct {
|
||||
Attachments []*SlackAttachment `json:"attachments"`
|
||||
}
|
||||
|
||||
func (p *SlackPayload) SetSecret(_ string) {}
|
||||
|
||||
func (p *SlackPayload) JSONPayload() ([]byte, error) {
|
||||
data, err := json.MarshalIndent(p, "", " ")
|
||||
if err != nil {
|
||||
|
||||
@@ -116,6 +116,9 @@ func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) bi
|
||||
type ProtectBranchForm struct {
|
||||
Protected bool
|
||||
RequirePullRequest bool
|
||||
EnableWhitelist bool
|
||||
WhitelistUsers string
|
||||
WhitelistTeams string
|
||||
}
|
||||
|
||||
func (f *ProtectBranchForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
||||
@@ -186,7 +186,7 @@ func AvatarLink(email string) (url string) {
|
||||
var err error
|
||||
url, err = setting.LibravatarService.FromEmail(email)
|
||||
if err != nil {
|
||||
log.Error(2, "LibravatarService.FromEmail [%s]: %v", email, err)
|
||||
log.Warn("AvatarLink.LibravatarService.FromEmail [%s]: %v", email, err)
|
||||
}
|
||||
}
|
||||
if len(url) == 0 && !setting.DisableGravatar {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -98,6 +98,16 @@ func (r *Repository) GetEditorconfig() (*editorconfig.Editorconfig, error) {
|
||||
return editorconfig.ParseBytes(data)
|
||||
}
|
||||
|
||||
// PullRequestURL returns URL for composing a pull request.
|
||||
// This function does not check if the repository can actually compose a pull request.
|
||||
func (r *Repository) PullRequestURL(baseBranch, headBranch string) string {
|
||||
repoLink := r.RepoLink
|
||||
if r.PullRequest.BaseRepo != nil {
|
||||
repoLink = r.PullRequest.BaseRepo.Link()
|
||||
}
|
||||
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 {
|
||||
@@ -196,7 +206,11 @@ func RepoAssignment(args ...bool) macaron.Handler {
|
||||
if ctx.IsSigned && ctx.User.IsAdmin {
|
||||
ctx.Repo.AccessMode = models.ACCESS_MODE_OWNER
|
||||
} else {
|
||||
mode, err := models.AccessLevel(ctx.User, repo)
|
||||
var userID int64
|
||||
if ctx.IsSigned {
|
||||
userID = ctx.User.ID
|
||||
}
|
||||
mode, err := models.AccessLevel(userID, repo)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "AccessLevel", err)
|
||||
return
|
||||
|
||||
@@ -107,15 +107,6 @@ var (
|
||||
UsePostgreSQL bool
|
||||
UseMSSQL bool
|
||||
|
||||
// Webhook settings
|
||||
Webhook struct {
|
||||
QueueLength int
|
||||
DeliverTimeout int
|
||||
SkipTLSVerify bool
|
||||
Types []string
|
||||
PagingNum int
|
||||
}
|
||||
|
||||
// Repository settings
|
||||
Repository struct {
|
||||
AnsiCharset string
|
||||
@@ -146,6 +137,15 @@ var (
|
||||
RepoRootPath string
|
||||
ScriptType string
|
||||
|
||||
// Webhook settings
|
||||
Webhook struct {
|
||||
Types []string
|
||||
QueueLength int
|
||||
DeliverTimeout int
|
||||
SkipTLSVerify bool
|
||||
PagingNum int
|
||||
}
|
||||
|
||||
// Markdown sttings
|
||||
Markdown struct {
|
||||
EnableHardLineBreak bool
|
||||
@@ -187,7 +187,7 @@ var (
|
||||
|
||||
// Session settings
|
||||
SessionConfig session.Options
|
||||
CSRFCookieName = "_csrf"
|
||||
CSRFCookieName string
|
||||
|
||||
// Cron tasks
|
||||
Cron struct {
|
||||
@@ -579,6 +579,8 @@ func NewContext() {
|
||||
|
||||
if err = Cfg.Section("http").MapTo(&HTTP); err != nil {
|
||||
log.Fatal(2, "Fail to map HTTP settings: %v", err)
|
||||
} else if err = Cfg.Section("webhook").MapTo(&Webhook); err != nil {
|
||||
log.Fatal(2, "Fail to map Webhook settings: %v", err)
|
||||
} else if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil {
|
||||
log.Fatal(2, "Fail to map Markdown settings: %v", err)
|
||||
} else if err = Cfg.Section("admin").MapTo(&Admin); err != nil {
|
||||
@@ -742,6 +744,7 @@ func newSessionService() {
|
||||
SessionConfig.Secure = Cfg.Section("session").Key("COOKIE_SECURE").MustBool()
|
||||
SessionConfig.Gclifetime = Cfg.Section("session").Key("GC_INTERVAL_TIME").MustInt64(86400)
|
||||
SessionConfig.Maxlifetime = Cfg.Section("session").Key("SESSION_LIFE_TIME").MustInt64(86400)
|
||||
CSRFCookieName = Cfg.Section("session").Key("CSRF_COOKIE_NAME").MustString("_csrf")
|
||||
|
||||
log.Info("Session Service Enabled")
|
||||
}
|
||||
@@ -822,15 +825,6 @@ func newNotifyMailService() {
|
||||
log.Info("Notify Mail Service Enabled")
|
||||
}
|
||||
|
||||
func newWebhookService() {
|
||||
sec := Cfg.Section("webhook")
|
||||
Webhook.QueueLength = sec.Key("QUEUE_LENGTH").MustInt(1000)
|
||||
Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5)
|
||||
Webhook.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool()
|
||||
Webhook.Types = []string{"gogs", "slack", "discord"}
|
||||
Webhook.PagingNum = sec.Key("PAGING_NUM").MustInt(10)
|
||||
}
|
||||
|
||||
func NewService() {
|
||||
newService()
|
||||
}
|
||||
@@ -843,5 +837,4 @@ func NewServices() {
|
||||
newMailService()
|
||||
newRegisterMailService()
|
||||
newNotifyMailService()
|
||||
newWebhookService()
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
web: ./gogs web
|
||||
web: ./gogs web -p ${PORT:=3000}
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
"outputPathIsOutsideProject": 0,
|
||||
"outputPathIsSetByUser": 0
|
||||
},
|
||||
"\/css\/semantic-2.2.7.min.css": {
|
||||
"\/css\/semantic-2.2.9.min.css": {
|
||||
"fileType": 16,
|
||||
"ignore": 1,
|
||||
"ignoreWasSetByUser": 1,
|
||||
"inputAbbreviatedPath": "\/css\/semantic-2.2.7.min.css",
|
||||
"inputAbbreviatedPath": "\/css\/semantic-2.2.9.min.css",
|
||||
"outputAbbreviatedPath": "No Output Path",
|
||||
"outputPathIsOutsideProject": 0,
|
||||
"outputPathIsSetByUser": 0
|
||||
@@ -66,7 +66,7 @@
|
||||
"fileType": 32768,
|
||||
"ignore": 0,
|
||||
"ignoreWasSetByUser": 0,
|
||||
"initialSize": 4048,
|
||||
"initialSize": 514087,
|
||||
"inputAbbreviatedPath": "\/img\/avatar_default.png",
|
||||
"outputAbbreviatedPath": "\/img\/avatar_default.png",
|
||||
"outputPathIsOutsideProject": 0,
|
||||
@@ -161,12 +161,12 @@
|
||||
"outputStyle": 1,
|
||||
"syntaxCheckerStyle": 1
|
||||
},
|
||||
"\/js\/semantic-2.2.7.min.js": {
|
||||
"\/js\/semantic-2.2.9.min.js": {
|
||||
"fileType": 64,
|
||||
"ignore": 1,
|
||||
"ignoreWasSetByUser": 1,
|
||||
"inputAbbreviatedPath": "\/js\/semantic-2.2.7.min.js",
|
||||
"outputAbbreviatedPath": "\/js\/min\/semantic-2.2.7.min-min.js",
|
||||
"inputAbbreviatedPath": "\/js\/semantic-2.2.9.min.js",
|
||||
"outputAbbreviatedPath": "\/js\/min\/semantic-2.2.9.min-min.js",
|
||||
"outputPathIsOutsideProject": 0,
|
||||
"outputPathIsSetByUser": 0,
|
||||
"outputStyle": 1,
|
||||
|
||||
@@ -2310,9 +2310,18 @@ footer .ui.language .menu {
|
||||
margin-left: 20px;
|
||||
display: block;
|
||||
}
|
||||
.repository.settings.branches .branch-protection .whitelist {
|
||||
margin-left: 26px;
|
||||
}
|
||||
.repository.settings.branches .branch-protection .whitelist .dropdown img {
|
||||
display: inline-block;
|
||||
}
|
||||
.repository.settings.webhooks .types .menu .item {
|
||||
padding: 10px !important;
|
||||
}
|
||||
.repository.settings.webhook .text.desc {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.repository.settings.webhook .events .column {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
@@ -2905,7 +2914,7 @@ footer .ui.language .menu {
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
.feeds .news .push.news .content ul .text.truncate {
|
||||
width: 80%;
|
||||
width: 60%;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
.feeds .news .commit-id {
|
||||
|
||||
@@ -341,7 +341,7 @@ function initRepository() {
|
||||
// Branches
|
||||
if ($('.repository.settings.branches').length > 0) {
|
||||
initFilterSearchDropdown('.protected-branches .dropdown');
|
||||
$('.enable-protection').change(function () {
|
||||
$('.enable-protection, .enable-whitelist').change(function () {
|
||||
if (this.checked) {
|
||||
$($(this).data('target')).removeClass('disabled');
|
||||
} else {
|
||||
@@ -930,6 +930,15 @@ function initWebhook() {
|
||||
}
|
||||
});
|
||||
|
||||
// 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);
|
||||
@@ -1223,7 +1232,9 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
// Semantic UI modules.
|
||||
$('.dropdown').dropdown();
|
||||
$('.ui.dropdown').dropdown({
|
||||
forceSelection: false
|
||||
});
|
||||
$('.jump.dropdown').dropdown({
|
||||
action: 'hide',
|
||||
onShow: function () {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
.text.truncate {
|
||||
width: 80%;
|
||||
width: 60%;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1330,6 +1330,13 @@
|
||||
margin-left: 20px;
|
||||
display: block;
|
||||
}
|
||||
.whitelist {
|
||||
margin-left: 26px;
|
||||
|
||||
.dropdown img {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1342,6 +1349,9 @@
|
||||
}
|
||||
|
||||
&.webhook {
|
||||
.text.desc {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.events {
|
||||
.column {
|
||||
padding-bottom: 0;
|
||||
|
||||
@@ -65,7 +65,7 @@ func repoAssignment() macaron.Handler {
|
||||
if ctx.IsSigned && ctx.User.IsAdmin {
|
||||
ctx.Repo.AccessMode = models.ACCESS_MODE_OWNER
|
||||
} else {
|
||||
mode, err := models.AccessLevel(ctx.User, repo)
|
||||
mode, err := models.AccessLevel(ctx.User.ID, repo)
|
||||
if err != nil {
|
||||
ctx.Error(500, "AccessLevel", err)
|
||||
return
|
||||
|
||||
@@ -99,12 +99,12 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
|
||||
|
||||
// https://github.com/gogits/go-gogs-client/wiki/Repositories#edit-a-hook
|
||||
func EditHook(ctx *context.APIContext, form api.EditHookOption) {
|
||||
w, err := models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
||||
w, err := models.GetWebhookOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
||||
if err != nil {
|
||||
if models.IsErrWebhookNotExist(err) {
|
||||
ctx.Status(404)
|
||||
} else {
|
||||
ctx.Error(500, "GetWebhookByID", err)
|
||||
ctx.Error(500, "GetWebhookOfRepoByID", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
SETTINGS_OPTIONS base.TplName = "org/settings/options"
|
||||
SETTINGS_DELETE base.TplName = "org/settings/delete"
|
||||
SETTINGS_HOOKS base.TplName = "org/settings/hooks"
|
||||
SETTINGS_OPTIONS base.TplName = "org/settings/options"
|
||||
SETTINGS_DELETE base.TplName = "org/settings/delete"
|
||||
SETTINGS_WEBHOOKS base.TplName = "org/settings/webhooks"
|
||||
)
|
||||
|
||||
func Settings(ctx *context.Context) {
|
||||
@@ -140,6 +140,7 @@ func Webhooks(ctx *context.Context) {
|
||||
ctx.Data["PageIsSettingsHooks"] = true
|
||||
ctx.Data["BaseLink"] = ctx.Org.OrgLink
|
||||
ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc")
|
||||
ctx.Data["Types"] = setting.Webhook.Types
|
||||
|
||||
ws, err := models.GetWebhooksByOrgID(ctx.Org.Organization.ID)
|
||||
if err != nil {
|
||||
@@ -148,7 +149,7 @@ func Webhooks(ctx *context.Context) {
|
||||
}
|
||||
|
||||
ctx.Data["Webhooks"] = ws
|
||||
ctx.HTML(200, SETTINGS_HOOKS)
|
||||
ctx.HTML(200, SETTINGS_WEBHOOKS)
|
||||
}
|
||||
|
||||
func DeleteWebhook(ctx *context.Context) {
|
||||
|
||||
@@ -279,8 +279,8 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo
|
||||
return
|
||||
}
|
||||
|
||||
if form.IsNewBrnach() {
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + oldBranchName + "..." + form.NewBranchName)
|
||||
if form.IsNewBrnach() && ctx.Repo.PullRequest.Allowed {
|
||||
ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, form.NewBranchName))
|
||||
} else {
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + template.EscapePound(form.TreePath))
|
||||
}
|
||||
@@ -382,8 +382,8 @@ func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm) {
|
||||
return
|
||||
}
|
||||
|
||||
if form.IsNewBrnach() {
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + oldBranchName + "..." + form.NewBranchName)
|
||||
if form.IsNewBrnach() && ctx.Repo.PullRequest.Allowed {
|
||||
ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, form.NewBranchName))
|
||||
} else {
|
||||
ctx.Flash.Success(ctx.Tr("repo.editor.file_delete_success", ctx.Repo.TreePath))
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName)
|
||||
@@ -503,8 +503,8 @@ func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm) {
|
||||
return
|
||||
}
|
||||
|
||||
if form.IsNewBrnach() {
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + oldBranchName + "..." + form.NewBranchName)
|
||||
if form.IsNewBrnach() && ctx.Repo.PullRequest.Allowed {
|
||||
ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, form.NewBranchName))
|
||||
} else {
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + form.TreePath)
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ func HTTPContexter() macaron.Handler {
|
||||
if isPull {
|
||||
mode = models.ACCESS_MODE_READ
|
||||
}
|
||||
has, err := models.HasAccess(authUser, repo, mode)
|
||||
has, err := models.HasAccess(authUser.ID, repo, mode)
|
||||
if err != nil {
|
||||
ctx.Handle(http.StatusInternalServerError, "HasAccess", err)
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@ func getForkRepository(ctx *context.Context) *models.Repository {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !forkRepo.CanBeForked() || !forkRepo.HasAccess(ctx.User) {
|
||||
if !forkRepo.CanBeForked() || !forkRepo.HasAccess(ctx.User.ID) {
|
||||
ctx.Handle(404, "getForkRepository", nil)
|
||||
return nil
|
||||
}
|
||||
@@ -118,6 +118,12 @@ func ForkPost(ctx *context.Context, form auth.CreateRepoForm) {
|
||||
}
|
||||
}
|
||||
|
||||
// Cannot fork to same owner
|
||||
if ctxUser.ID == forkRepo.OwnerID {
|
||||
ctx.RenderWithErr(ctx.Tr("repo.settings.cannot_fork_to_same_owner"), FORK, &form)
|
||||
return
|
||||
}
|
||||
|
||||
repo, err := models.ForkRepository(ctxUser, forkRepo, form.RepoName, form.Description)
|
||||
if err != nil {
|
||||
ctx.Data["Err_RepoName"] = true
|
||||
@@ -626,6 +632,7 @@ func CompareAndPullRequest(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split"
|
||||
ctx.HTML(200, COMPARE_PULL)
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ func Releases(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// FIXME: should only get releases match tags result and drafts.
|
||||
releases, err := models.GetReleasesByRepoID(ctx.Repo.Repository.ID)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetReleasesByRepoID", err)
|
||||
@@ -72,7 +73,9 @@ func Releases(ctx *context.Context) {
|
||||
tags := make([]*models.Release, len(tagsResult.Tags))
|
||||
for i, rawTag := range tagsResult.Tags {
|
||||
for j, r := range releases {
|
||||
if r == nil || (r.IsDraft && !ctx.Repo.IsOwner()) {
|
||||
if r == nil ||
|
||||
(r.IsDraft && !ctx.Repo.IsOwner()) ||
|
||||
(!r.IsDraft && r.TagName != rawTag) {
|
||||
continue
|
||||
}
|
||||
releases[j] = nil // Mark as used.
|
||||
|
||||
@@ -238,7 +238,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
|
||||
return
|
||||
}
|
||||
|
||||
if ctx.Repo.Owner.IsOrganization() {
|
||||
if ctx.Repo.Owner.IsOrganization() && !ctx.User.IsAdmin {
|
||||
if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) {
|
||||
ctx.Error(404)
|
||||
return
|
||||
@@ -320,20 +320,13 @@ func SettingsCollaborationPost(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Organization is not allowed to be added as a collaborator.
|
||||
// Organization is not allowed to be added as a collaborator
|
||||
if u.IsOrganization() {
|
||||
ctx.Flash.Error(ctx.Tr("repo.settings.org_not_allowed_to_be_collaborator"))
|
||||
ctx.Redirect(setting.AppSubUrl + ctx.Req.URL.Path)
|
||||
return
|
||||
}
|
||||
|
||||
// Check if user is organization member.
|
||||
if ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOrgMember(u.ID) {
|
||||
ctx.Flash.Info(ctx.Tr("repo.settings.user_is_org_member"))
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration")
|
||||
return
|
||||
}
|
||||
|
||||
if err = ctx.Repo.Repository.AddCollaborator(u); err != nil {
|
||||
ctx.Handle(500, "AddCollaborator", err)
|
||||
return
|
||||
@@ -415,7 +408,6 @@ func SettingsProtectedBranch(ctx *context.Context) {
|
||||
|
||||
ctx.Data["Title"] = ctx.Tr("repo.settings.protected_branches") + " - " + branch
|
||||
ctx.Data["PageIsSettingsBranches"] = true
|
||||
ctx.Data["IsOrgRepo"] = ctx.Repo.Owner.IsOrganization()
|
||||
|
||||
protectBranch, err := models.GetProtectBranchOfRepoByName(ctx.Repo.Repository.ID, branch)
|
||||
if err != nil {
|
||||
@@ -430,6 +422,24 @@ func SettingsProtectedBranch(ctx *context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
if ctx.Repo.Owner.IsOrganization() {
|
||||
users, err := ctx.Repo.Repository.GetWriters()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "Repo.Repository.GetPushers", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["Users"] = users
|
||||
ctx.Data["whitelist_users"] = protectBranch.WhitelistUserIDs
|
||||
|
||||
teams, err := ctx.Repo.Owner.TeamsHaveAccessToRepo(ctx.Repo.Repository.ID, models.ACCESS_MODE_WRITE)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "Repo.Owner.TeamsHaveAccessToRepo", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["Teams"] = teams
|
||||
ctx.Data["whitelist_teams"] = protectBranch.WhitelistTeamIDs
|
||||
}
|
||||
|
||||
ctx.Data["Branch"] = protectBranch
|
||||
ctx.HTML(200, SETTINGS_PROTECTED_BRANCH)
|
||||
}
|
||||
@@ -457,8 +467,14 @@ func SettingsProtectedBranchPost(ctx *context.Context, form auth.ProtectBranchFo
|
||||
|
||||
protectBranch.Protected = form.Protected
|
||||
protectBranch.RequirePullRequest = form.RequirePullRequest
|
||||
if err = models.UpdateProtectBranch(protectBranch); err != nil {
|
||||
ctx.Handle(500, "UpdateProtectBranch", err)
|
||||
protectBranch.EnableWhitelist = form.EnableWhitelist
|
||||
if ctx.Repo.Owner.IsOrganization() {
|
||||
err = models.UpdateOrgProtectBranch(ctx.Repo.Repository, protectBranch, form.WhitelistUsers, form.WhitelistTeams)
|
||||
} else {
|
||||
err = models.UpdateProtectBranch(protectBranch)
|
||||
}
|
||||
if err != nil {
|
||||
ctx.Handle(500, "UpdateOrgProtectBranch/UpdateProtectBranch", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
HOOKS base.TplName = "repo/settings/hooks"
|
||||
HOOK_NEW base.TplName = "repo/settings/hook_new"
|
||||
ORG_HOOK_NEW base.TplName = "org/settings/hook_new"
|
||||
WEBHOOKS base.TplName = "repo/settings/webhooks"
|
||||
WEBHOOK_NEW base.TplName = "repo/settings/webhook_new"
|
||||
ORG_WEBHOOK_NEW base.TplName = "org/settings/webhook_new"
|
||||
)
|
||||
|
||||
func Webhooks(ctx *context.Context) {
|
||||
@@ -33,6 +33,7 @@ func Webhooks(ctx *context.Context) {
|
||||
ctx.Data["PageIsSettingsHooks"] = true
|
||||
ctx.Data["BaseLink"] = ctx.Repo.RepoLink
|
||||
ctx.Data["Description"] = ctx.Tr("repo.settings.hooks_desc", "https://github.com/gogits/go-gogs-client/wiki/Repositories-Webhooks")
|
||||
ctx.Data["Types"] = setting.Webhook.Types
|
||||
|
||||
ws, err := models.GetWebhooksByRepoID(ctx.Repo.Repository.ID)
|
||||
if err != nil {
|
||||
@@ -41,7 +42,7 @@ func Webhooks(ctx *context.Context) {
|
||||
}
|
||||
ctx.Data["Webhooks"] = ws
|
||||
|
||||
ctx.HTML(200, HOOKS)
|
||||
ctx.HTML(200, WEBHOOKS)
|
||||
}
|
||||
|
||||
type OrgRepoCtx struct {
|
||||
@@ -57,7 +58,7 @@ func getOrgRepoCtx(ctx *context.Context) (*OrgRepoCtx, error) {
|
||||
return &OrgRepoCtx{
|
||||
RepoID: ctx.Repo.Repository.ID,
|
||||
Link: ctx.Repo.RepoLink,
|
||||
NewTemplate: HOOK_NEW,
|
||||
NewTemplate: WEBHOOK_NEW,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -65,7 +66,7 @@ func getOrgRepoCtx(ctx *context.Context) (*OrgRepoCtx, error) {
|
||||
return &OrgRepoCtx{
|
||||
OrgID: ctx.Org.Organization.ID,
|
||||
Link: ctx.Org.OrgLink,
|
||||
NewTemplate: ORG_HOOK_NEW,
|
||||
NewTemplate: ORG_WEBHOOK_NEW,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -273,7 +274,7 @@ func checkWebhook(ctx *context.Context) (*OrgRepoCtx, *models.Webhook) {
|
||||
|
||||
var w *models.Webhook
|
||||
if orCtx.RepoID > 0 {
|
||||
w, err = models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
||||
w, err = models.GetWebhookOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
||||
} else {
|
||||
w, err = models.GetWebhookByOrgID(ctx.Org.Organization.ID, ctx.ParamsInt64(":id"))
|
||||
}
|
||||
@@ -504,8 +505,8 @@ func TestWebhook(ctx *context.Context) {
|
||||
Pusher: apiUser,
|
||||
Sender: apiUser,
|
||||
}
|
||||
if err := models.PrepareWebhooks(ctx.Repo.Repository, models.HOOK_EVENT_PUSH, p); err != nil {
|
||||
ctx.Flash.Error("PrepareWebhooks: " + err.Error())
|
||||
if err := models.TestWebhook(ctx.Repo.Repository, models.HOOK_EVENT_PUSH, p, ctx.QueryInt64("id")); err != nil {
|
||||
ctx.Flash.Error("TestWebhook: " + err.Error())
|
||||
ctx.Status(500)
|
||||
} else {
|
||||
go models.HookQueue.Add(ctx.Repo.Repository.ID)
|
||||
|
||||
@@ -293,7 +293,7 @@ func Issues(ctx *context.Context) {
|
||||
}
|
||||
|
||||
// Check if user has access to given repository.
|
||||
if !repo.IsOwnedBy(ctxUser.ID) && !repo.HasAccess(ctxUser) {
|
||||
if !repo.IsOwnedBy(ctxUser.ID) && !repo.HasAccess(ctxUser.ID) {
|
||||
ctx.Handle(404, "Issues", fmt.Errorf("#%d", repoID))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.164.0220 / 0.10 RC
|
||||
0.10.0.0227
|
||||
@@ -52,4 +52,5 @@
|
||||
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
|
||||
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.9.min.js"></script>
|
||||
|
||||
{{template "inject/footer" .}}
|
||||
</html>
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
<title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
|
||||
|
||||
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
|
||||
|
||||
{{template "inject/head" .}}
|
||||
</head>
|
||||
<body>
|
||||
<div class="full height">
|
||||
|
||||
@@ -238,6 +238,43 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else if eq .Lang "uk-UA"}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-flame"></i> Простий у втановленні
|
||||
</h1>
|
||||
<p class="large">
|
||||
Просто <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">запустіть виконуваний файл</a> для вашої платформи. Використовуйте Gogs с <a target="_blank" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> або <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, або завантажте <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">пакет</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-device-desktop"></i> Кросплатформність
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs працює у будь-якій операційній системі, що може компілювати <a target="_blank" href="http://golang.org/">Go</a>: Windows, Mac OS X, Linux, ARM і т. д. Обирайте що вам більше до вподоби!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-rocket"></i> Легковісний
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs має низькі системні вимоги та може працювати на недорогому Raspberry Pi. Економте енергію вашої машини!
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-code"></i> Відкритий сирцевий код
|
||||
</h1>
|
||||
<p class="large">
|
||||
Все це у <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a>! Приєднуйтеся до нас, робіть внесок, щоб зробити цей проект ще краще. Не бійтеся допомагати!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
|
||||
0
templates/inject/footer.tmpl
Normal file
0
templates/inject/footer.tmpl
Normal file
0
templates/inject/head.tmpl
Normal file
0
templates/inject/head.tmpl
Normal file
@@ -17,12 +17,12 @@
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "repo/settings/hook_gogs" .}}
|
||||
{{template "repo/settings/hook_slack" .}}
|
||||
{{template "repo/settings/hook_discord" .}}
|
||||
{{template "repo/settings/webhook_gogs" .}}
|
||||
{{template "repo/settings/webhook_slack" .}}
|
||||
{{template "repo/settings/webhook_discord" .}}
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_history" .}}
|
||||
{{template "repo/settings/webhook_history" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
{{template "repo/settings/hook_list" .}}
|
||||
{{template "repo/settings/webhook_list" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,18 +93,25 @@
|
||||
{{range $j, $section := $file.Sections}}
|
||||
{{range $k, $line := $section.Lines}}
|
||||
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
|
||||
<td class="lines-num lines-num-old">
|
||||
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-code halfwidth">
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
|
||||
</td>
|
||||
<td class="lines-num lines-num-new">
|
||||
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-code halfwidth">
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
|
||||
</td>
|
||||
{{if eq .GetType 4}}
|
||||
<td class="lines-num"></td>
|
||||
<td colspan="3" class="lines-code">
|
||||
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
|
||||
</td>
|
||||
{{else}}
|
||||
<td class="lines-num lines-num-old">
|
||||
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-code halfwidth">
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
|
||||
</td>
|
||||
<td class="lines-num lines-num-new">
|
||||
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-code halfwidth">
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
|
||||
</td>
|
||||
{{end}}
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{{end}}
|
||||
</td>
|
||||
{{end}}
|
||||
<td class="lines-code" rel="">
|
||||
<td class="lines-code">
|
||||
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_assginee_no_select"}}</a>
|
||||
{{range .Assignees}}
|
||||
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.ID}}"><img src="{{.RelAvatarLink}}"> {{.Name}}</a>
|
||||
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.ID}}"><img src="{{.RelAvatarLink}}"> {{.DisplayName}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,14 +113,14 @@
|
||||
{{end}}
|
||||
|
||||
<p class="desc">
|
||||
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
|
||||
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.DisplayName | Safe}}
|
||||
{{if .Milestone}}
|
||||
<a class="milestone" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
|
||||
<span class="octicon octicon-milestone"></span> {{.Milestone.Name | Sanitize}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .Assignee}}
|
||||
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
|
||||
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.DisplayName}}" data-variation="inverted" data-position="left center">
|
||||
<img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}">
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</a>
|
||||
<div class="content">
|
||||
<div class="ui top attached header">
|
||||
<span class="text grey"><a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a> {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}</span>
|
||||
<span class="text grey"><a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.DisplayName}}</a> {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}</span>
|
||||
<div class="ui right actions">
|
||||
{{if .IsIssueOwner}}
|
||||
<div class="item action">
|
||||
@@ -66,7 +66,7 @@
|
||||
</a>
|
||||
<div class="content">
|
||||
<div class="ui top attached header">
|
||||
<span class="text grey"><a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
|
||||
<span class="text grey"><a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.DisplayName}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
|
||||
<div class="ui right actions">
|
||||
{{if gt .ShowTag 0}}
|
||||
<div class="item tag">
|
||||
@@ -90,7 +90,7 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="render-content markdown has-emoji">
|
||||
{{if .RenderedContent}}
|
||||
{{.RenderedContent|Str2html}}
|
||||
{{.RenderedContent | Str2html}}
|
||||
{{else}}
|
||||
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
@@ -137,8 +137,7 @@
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.RelAvatarLink}}">
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
|
||||
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.DisplayName}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
|
||||
<div class="detail">
|
||||
<span class="octicon octicon-git-commit"></span>
|
||||
<span class="text grey">{{.Content | Str2html}}</span>
|
||||
@@ -329,7 +328,7 @@
|
||||
<div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/assignee">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
|
||||
{{range .Assignees}}
|
||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.RelAvatarLink}}"><img src="{{.RelAvatarLink}}"> {{.Name}}</div>
|
||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.RelAvatarLink}}"><img src="{{.RelAvatarLink}}"> {{.DisplayName}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -337,7 +336,7 @@
|
||||
<span class="no-select item {{if .Issue.Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Issue.Assignee}}
|
||||
<a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.ID}}"><img class="ui avatar image" src="{{.Issue.Assignee.RelAvatarLink}}"> {{.Issue.Assignee.Name}}</a>
|
||||
<a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.ID}}"><img class="ui avatar image" src="{{.Issue.Assignee.RelAvatarLink}}"> {{.Issue.Assignee.DisplayName}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{{template "base/alert" .}}
|
||||
<h2 class="ui header">
|
||||
{{.i18n.Tr "repo.release.releases"}}
|
||||
{{if .IsRepositoryWriter}}
|
||||
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
|
||||
<div class="ui right">
|
||||
<a class="ui small green button" href="{{$.RepoLink}}/releases/new">
|
||||
{{.i18n.Tr "repo.release.new_release"}}
|
||||
@@ -42,7 +42,7 @@
|
||||
<p class="text grey">
|
||||
<span class="author">
|
||||
<img class="img-10" src="{{.Publisher.RelAvatarLink}}">
|
||||
<a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
|
||||
<a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.DisplayName}}</a>
|
||||
</span>
|
||||
{{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
|
||||
<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
|
||||
|
||||
@@ -28,14 +28,47 @@
|
||||
<p class="help">{{.i18n.Tr "repo.settings.protect_require_pull_request_desc"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{if .IsOrgRepo}}
|
||||
{{if .Owner.IsOrganization}}
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input name="whitelist_committers" type="checkbox" data-target="#whitelist_box">
|
||||
<input class="enable-whitelist" name="enable_whitelist" type="checkbox" data-target="#whitelist_box" {{if .Branch.EnableWhitelist}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.protect_whitelist_committers"}}</label>
|
||||
<p class="help">{{.i18n.Tr "repo.settings.protect_whitelist_committers_desc"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="whitelist_box" class="field {{if not .Branch.EnableWhitelist}}disabled{{end}}">
|
||||
<div class="whitelist field">
|
||||
<label>{{.i18n.Tr "repo.settings.protect_whitelist_users"}}</label>
|
||||
<div class="ui multiple search selection dropdown">
|
||||
<input type="hidden" name="whitelist_users" value="{{.whitelist_users}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.settings.protect_whitelist_search_users"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Users}}
|
||||
<div class="item" data-value="{{.ID}}">
|
||||
<img class="ui mini image" src="{{.RelAvatarLink}}">
|
||||
{{.DisplayName}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="whitelist field">
|
||||
<label>{{.i18n.Tr "repo.settings.protect_whitelist_teams"}}</label>
|
||||
<div class="ui multiple search selection dropdown">
|
||||
<input type="hidden" name="whitelist_teams" value="{{.whitelist_teams}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.settings.protect_whitelist_search_teams"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Teams}}
|
||||
<div class="item" data-value="{{.ID}}">
|
||||
<i class="octicon octicon-jersey"></i>
|
||||
{{.Name}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
<label for="color">{{.i18n.Tr "repo.settings.slack_color"}}</label>
|
||||
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
{{template "repo/settings/webhook_settings" .}}
|
||||
</form>
|
||||
{{end}}
|
||||
@@ -22,7 +22,8 @@
|
||||
<div class="field {{if .Err_Secret}}error{{end}}">
|
||||
<label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
|
||||
<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
|
||||
<p class="text grey desc">{{.i18n.Tr "repo.settings.secret_desc" | Safe}}</p>
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
{{template "repo/settings/webhook_settings" .}}
|
||||
</form>
|
||||
{{end}}
|
||||
@@ -4,7 +4,7 @@
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
<button class="ui teal tiny button poping up" id="test-delivery" data-content=
|
||||
"{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
|
||||
"{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test?id={{.Webhook.ID}}" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</h4>
|
||||
@@ -60,7 +60,7 @@
|
||||
<pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
||||
{{end}}</pre>
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
|
||||
<pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
|
||||
<pre class="raw"><code class="nohighlight">{{.ResponseInfo.Body}}</code></pre>
|
||||
{{else}}
|
||||
N/A
|
||||
{{end}}
|
||||
@@ -4,18 +4,26 @@
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
<div class="ui right">
|
||||
<div class="ui types jump dropdown">
|
||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
||||
<img class="img-12" src="{{AppSubUrl}}/img/favicon.png">Gogs
|
||||
</a>
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
|
||||
<img class="img-12" src="{{AppSubUrl}}/img/slack.png">Slack
|
||||
</a>
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/discord/new">
|
||||
<img class="img-12" src="{{AppSubUrl}}/img/discord.png">Discord
|
||||
</a>
|
||||
</div>
|
||||
{{if .Types}}
|
||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Types}}
|
||||
{{if eq . "gogs"}}
|
||||
<a class="item" href="{{$.BaseLink}}/settings/hooks/gogs/new">
|
||||
<img class="img-12" src="{{AppSubUrl}}/img/favicon.png">Gogs
|
||||
</a>
|
||||
{{else if eq . "slack"}}
|
||||
<a class="item" href="{{$.BaseLink}}/settings/hooks/slack/new">
|
||||
<img class="img-12" src="{{AppSubUrl}}/img/slack.png">Slack
|
||||
</a>
|
||||
{{else if eq . "discord"}}
|
||||
<a class="item" href="{{$.BaseLink}}/settings/hooks/discord/new">
|
||||
<img class="img-12" src="{{AppSubUrl}}/img/discord.png">Discord
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</h4>
|
||||
@@ -44,4 +52,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_delete_modal" .}}
|
||||
{{template "repo/settings/webhook_delete_modal" .}}
|
||||
@@ -17,12 +17,12 @@
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "repo/settings/hook_gogs" .}}
|
||||
{{template "repo/settings/hook_slack" .}}
|
||||
{{template "repo/settings/hook_discord" .}}
|
||||
{{template "repo/settings/webhook_gogs" .}}
|
||||
{{template "repo/settings/webhook_slack" .}}
|
||||
{{template "repo/settings/webhook_discord" .}}
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_history" .}}
|
||||
{{template "repo/settings/webhook_history" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,4 +73,4 @@
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_delete_modal" .}}
|
||||
{{template "repo/settings/webhook_delete_modal" .}}
|
||||
@@ -23,6 +23,6 @@
|
||||
<label for="color">{{.i18n.Tr "repo.settings.slack_color"}}</label>
|
||||
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
{{template "repo/settings/webhook_settings" .}}
|
||||
</form>
|
||||
{{end}}
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
{{template "repo/settings/hook_list" .}}
|
||||
{{template "repo/settings/webhook_list" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
2
vendor/github.com/gogits/go-gogs-client/gogs.go
generated
vendored
2
vendor/github.com/gogits/go-gogs-client/gogs.go
generated
vendored
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func Version() string {
|
||||
return "0.12.5"
|
||||
return "0.12.6"
|
||||
}
|
||||
|
||||
// Client represents a Gogs API client.
|
||||
|
||||
16
vendor/github.com/gogits/go-gogs-client/repo_hook.go
generated
vendored
16
vendor/github.com/gogits/go-gogs-client/repo_hook.go
generated
vendored
@@ -70,7 +70,6 @@ func (c *Client) DeleteRepoHook(user, repo string, id int64) error {
|
||||
}
|
||||
|
||||
type Payloader interface {
|
||||
SetSecret(string)
|
||||
JSONPayload() ([]byte, error)
|
||||
}
|
||||
|
||||
@@ -104,17 +103,12 @@ var (
|
||||
// \/ \/ \/ \/
|
||||
|
||||
type CreatePayload struct {
|
||||
Secret string `json:"secret"`
|
||||
Ref string `json:"ref"`
|
||||
RefType string `json:"ref_type"`
|
||||
Repo *Repository `json:"repository"`
|
||||
Sender *User `json:"sender"`
|
||||
}
|
||||
|
||||
func (p *CreatePayload) SetSecret(secret string) {
|
||||
p.Secret = secret
|
||||
}
|
||||
|
||||
func (p *CreatePayload) JSONPayload() ([]byte, error) {
|
||||
return json.MarshalIndent(p, "", " ")
|
||||
}
|
||||
@@ -148,7 +142,6 @@ func ParseCreateHook(raw []byte) (*CreatePayload, error) {
|
||||
|
||||
// PushPayload represents a payload information of push event.
|
||||
type PushPayload struct {
|
||||
Secret string `json:"secret"`
|
||||
Ref string `json:"ref"`
|
||||
Before string `json:"before"`
|
||||
After string `json:"after"`
|
||||
@@ -159,10 +152,6 @@ type PushPayload struct {
|
||||
Sender *User `json:"sender"`
|
||||
}
|
||||
|
||||
func (p *PushPayload) SetSecret(secret string) {
|
||||
p.Secret = secret
|
||||
}
|
||||
|
||||
func (p *PushPayload) JSONPayload() ([]byte, error) {
|
||||
return json.MarshalIndent(p, "", " ")
|
||||
}
|
||||
@@ -227,7 +216,6 @@ type ChangesPayload struct {
|
||||
|
||||
// PullRequestPayload represents a payload information of pull request event.
|
||||
type PullRequestPayload struct {
|
||||
Secret string `json:"secret"`
|
||||
Action HookIssueAction `json:"action"`
|
||||
Index int64 `json:"number"`
|
||||
Changes *ChangesPayload `json:"changes,omitempty"`
|
||||
@@ -236,10 +224,6 @@ type PullRequestPayload struct {
|
||||
Sender *User `json:"sender"`
|
||||
}
|
||||
|
||||
func (p *PullRequestPayload) SetSecret(secret string) {
|
||||
p.Secret = secret
|
||||
}
|
||||
|
||||
func (p *PullRequestPayload) JSONPayload() ([]byte, error) {
|
||||
return json.MarshalIndent(p, "", " ")
|
||||
}
|
||||
|
||||
8
vendor/vendor.json
vendored
8
vendor/vendor.json
vendored
@@ -165,10 +165,10 @@
|
||||
"revisionTime": "2017-02-19T18:16:29Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "xvG+RgJODQqlmdAkHUQK2TyLR88=",
|
||||
"checksumSHA1": "exKX51W/Hieq7OOmYK2gYn+Huuw=",
|
||||
"path": "github.com/gogits/go-gogs-client",
|
||||
"revision": "89ff140a38c057e71a1012af6d666fbc037ba606",
|
||||
"revisionTime": "2017-02-14T02:02:40Z"
|
||||
"revision": "f12fbacb5495120dc62dae7cfdf140d39bf6f715",
|
||||
"revisionTime": "2017-02-24T06:16:35Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "p4yoFWgDiTfpu1JYgh26t6+VDTk=",
|
||||
@@ -557,7 +557,7 @@
|
||||
{
|
||||
"checksumSHA1": "qM9ubEa57g4oNa6JLFQ+e1TCMno=",
|
||||
"path": "gopkg.in/macaron.v1",
|
||||
"revision": "8be5635c28f40a85ce8e8f65c6118b4ee4e548e9",
|
||||
"revision": "a325110f8b392bce3e5cdeb8c44bf98078ada3be",
|
||||
"revisionTime": "2017-02-19T20:49:11Z"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user