Permalink
Browse files

Merge pull request #1 from gogits/master

Please Update to current master
  • Loading branch information...
crohr committed May 8, 2018
2 parents 6f2347f + eccc810 commit 7ecf5f714d66953cde1264c734e1b10aa104675e
Showing with 12,422 additions and 6,132 deletions.
  1. +2 −2 .gitattributes
  2. +1 −20 .github/CONTRIBUTING.md
  3. +2 −1 .github/ISSUE_TEMPLATE.md
  4. +0 −64 .gopmfile
  5. +2 −0 .pkgr.yml
  6. +1 −0 .travis.yml
  7. +44 −0 Dockerfile.aarch64hub
  8. +1 −1 Makefile
  9. +5 −5 README.md
  10. +3 −3 README_ZH.md
  11. +4 −4 cmd/admin.go
  12. +4 −3 cmd/hook.go
  13. +5 −1 cmd/web.go
  14. +21 −5 conf/app.ini
  15. +29 −0 conf/auth.d/ldap_bind_dn.conf.example
  16. +30 −0 conf/auth.d/ldap_simple_auth.conf.example
  17. +10 −0 conf/auth.d/pam.conf.example
  18. +16 −0 conf/auth.d/smtp.conf.example
  19. +63 −0 conf/gitignore/PhpStorm
  20. +63 −0 conf/gitignore/WebStorm
  21. +2 −0 conf/locale/TRANSLATORS
  22. +6 −5 conf/locale/locale_bg-BG.ini
  23. +3 −2 conf/locale/locale_cs-CZ.ini
  24. +12 −11 conf/locale/locale_de-DE.ini
  25. +3 −2 conf/locale/locale_en-GB.ini
  26. +6 −3 conf/locale/locale_en-US.ini
  27. +3 −2 conf/locale/locale_es-ES.ini
  28. +1,333 −0 conf/locale/locale_fa-IR.ini
  29. +6 −5 conf/locale/locale_fi-FI.ini
  30. +18 −17 conf/locale/locale_fr-FR.ini
  31. +3 −2 conf/locale/locale_gl-ES.ini
  32. +10 −9 conf/locale/locale_hu-HU.ini
  33. +1,331 −0 conf/locale/locale_id-ID.ini
  34. +3 −2 conf/locale/locale_it-IT.ini
  35. +58 −57 conf/locale/locale_ja-JP.ini
  36. +5 −4 conf/locale/locale_ko-KR.ini
  37. +3 −2 conf/locale/locale_lv-LV.ini
  38. +6 −5 conf/locale/locale_nl-NL.ini
  39. +11 −10 conf/locale/locale_pl-PL.ini
  40. +7 −6 conf/locale/locale_pt-BR.ini
  41. +32 −31 conf/locale/locale_ru-RU.ini
  42. +3 −2 conf/locale/locale_sk-SK.ini
  43. +11 −10 conf/locale/locale_sr-SP.ini
  44. +3 −2 conf/locale/locale_sv-SE.ini
  45. +158 −157 conf/locale/locale_tr-TR.ini
  46. +16 −15 conf/locale/locale_uk-UA.ini
  47. +1,331 −0 conf/locale/locale_vi-VN.ini
  48. +4 −3 conf/locale/locale_zh-CN.ini
  49. +15 −14 conf/locale/locale_zh-HK.ini
  50. +39 −38 conf/locale/locale_zh-TW.ini
  51. +4 −0 docker/README.md
  52. +3 −0 docker/aarch64/build.sh
  53. BIN docker/aarch64/qemu-aarch64-static
  54. BIN docker/aarch64/resin-xbuild
  55. +66 −0 docker/aarch64/resin-xbuild.go
  56. +0 −1 docker/build.sh
  57. +1 −1 gogs.go
  58. +1 −1 models/admin.go
  59. +0 −33 models/error.go
  60. +27 −0 models/errors/login_source.go
  61. +13 −0 models/errors/repo.go
  62. +269 −70 models/login_source.go
  63. +0 −7 models/migrations/migrations.go
  64. +2 −0 models/models.go
  65. +40 −14 models/pull.go
  66. +16 −5 models/repo.go
  67. +4 −3 models/repo_branch.go
  68. +5 −3 models/ssh_key.go
  69. +1 −1 models/user.go
  70. +1 −1 models/wiki.go
  71. +2 −2 pkg/auth/auth.go
  72. +9 −12 pkg/auth/ldap/ldap.go
  73. +169 −54 pkg/bindata/bindata.go
  74. +1 −1 pkg/context/context.go
  75. +1 −1 pkg/form/repo.go
  76. +4 −3 pkg/form/user.go
  77. +1 −1 pkg/mailer/mailer.go
  78. +1 −1 pkg/markup/markdown.go
  79. +5 −4 pkg/markup/markup.go
  80. +26 −0 pkg/markup/markup_test.go
  81. +28 −14 pkg/setting/setting.go
  82. +9 −8 pkg/template/template.go
  83. +9 −1 pkg/tool/tool.go
  84. +2 −2 public/assets/librejs/librejs.html
  85. +7 −7 public/config.codekit
  86. +10 −2 public/css/gogs.css
  87. +0 −364 public/css/semantic-2.2.13.min.css
  88. +364 −0 public/css/semantic-2.3.1.min.css
  89. BIN public/css/themes/basic/assets/fonts/icons.eot
  90. +0 −450 public/css/themes/basic/assets/fonts/icons.svg
  91. BIN public/css/themes/basic/assets/fonts/icons.ttf
  92. BIN public/css/themes/basic/assets/fonts/icons.woff
  93. BIN public/css/themes/default/assets/fonts/brand-icons.eot
  94. +1,008 −0 public/css/themes/default/assets/fonts/brand-icons.svg
  95. BIN public/css/themes/default/assets/fonts/brand-icons.ttf
  96. BIN public/css/themes/default/assets/fonts/brand-icons.woff
  97. BIN public/css/themes/default/assets/fonts/brand-icons.woff2
  98. BIN public/css/themes/default/assets/fonts/icons.eot
  99. +1,515 −2,668 public/css/themes/default/assets/fonts/icons.svg
  100. BIN public/css/themes/default/assets/fonts/icons.ttf
  101. BIN public/css/themes/default/assets/fonts/icons.woff
  102. BIN public/css/themes/default/assets/fonts/icons.woff2
  103. BIN public/css/themes/default/assets/fonts/outline-icons.eot
  104. +366 −0 public/css/themes/default/assets/fonts/outline-icons.svg
  105. BIN public/css/themes/default/assets/fonts/outline-icons.ttf
  106. BIN public/css/themes/default/assets/fonts/outline-icons.woff
  107. BIN public/css/themes/default/assets/fonts/outline-icons.woff2
  108. +0 −19 public/js/semantic-2.2.13.min.js
  109. +11 −0 public/js/semantic-2.3.1.min.js
  110. +2 −1 public/less/_base.less
  111. +11 −2 public/less/_repository.less
  112. +0 −1 public/plugins/notebookjs-0.2.6/notebook.min.js
  113. +1 −0 public/plugins/notebookjs-0.3.0/notebook.min.js
  114. +1 −1 routes/admin/admin.go
  115. +30 −32 routes/admin/auths.go
  116. +2 −1 routes/api/v1/admin/user.go
  117. +2 −2 routes/api/v1/repo/branch.go
  118. +12 −1 routes/install.go
  119. +6 −6 routes/org/setting.go
  120. +1 −0 routes/repo/commit.go
  121. +2 −2 routes/repo/editor.go
  122. +14 −2 routes/repo/http.go
  123. +15 −2 routes/repo/issue.go
  124. +2 −2 routes/repo/setting.go
  125. +31 −9 routes/user/auth.go
  126. +2 −2 routes/user/setting.go
  127. +3 −0 scripts/mysql.sql
  128. +1 −1 templates/.VERSION
  129. +3 −1 templates/admin/auth/edit.tmpl
  130. +20 −7 templates/admin/auth/list.tmpl
  131. +0 −8 templates/admin/auth/new.tmpl
  132. +4 −2 templates/admin/config.tmpl
  133. +2 −2 templates/admin/dashboard.tmpl
  134. +4 −4 templates/admin/monitor.tmpl
  135. +0 −15 templates/admin/nav.tmpl
  136. +2 −2 templates/admin/notice.tmpl
  137. +2 −2 templates/admin/org/list.tmpl
  138. +2 −2 templates/admin/repo/list.tmpl
  139. +2 −2 templates/admin/user/list.tmpl
  140. +1 −1 templates/base/footer.tmpl
  141. +15 −14 templates/base/head.tmpl
  142. +7 −7 templates/home.tmpl
  143. +1 −1 templates/repo/bare.tmpl
  144. +2 −2 templates/repo/branches/all.tmpl
  145. +5 −5 templates/repo/branches/overview.tmpl
  146. +2 −2 templates/repo/commits_table.tmpl
  147. +1 −1 templates/repo/diff/box.tmpl
  148. +1 −1 templates/repo/editor/diff_preview.tmpl
  149. +1 −1 templates/repo/home.tmpl
  150. +2 −2 templates/repo/settings/branches.tmpl
  151. +0 −14 templates/repo/settings/nav.tmpl
  152. +2 −2 templates/repo/view_file.tmpl
  153. +1 −1 templates/repo/view_list.tmpl
  154. +19 −1 templates/user/auth/login.tmpl
  155. +8 −0 templates/user/dashboard/issues.tmpl
  156. +2 −2 templates/user/profile.tmpl
  157. +1 −1 templates/user/settings/email.tmpl
  158. +4 −4 vendor/github.com/go-xorm/core/cache.go
  159. +2 −1 vendor/github.com/go-xorm/core/circle.yml
  160. +10 −9 vendor/github.com/go-xorm/core/column.go
  161. +7 −0 vendor/github.com/go-xorm/core/dialect.go
  162. +12 −0 vendor/github.com/go-xorm/core/rows.go
  163. +3 −0 vendor/github.com/go-xorm/core/scan.go
  164. +23 −18 vendor/github.com/go-xorm/core/type.go
  165. +3 −6 vendor/github.com/go-xorm/xorm/CONTRIBUTING.md
  166. +177 −46 vendor/github.com/go-xorm/xorm/README.md
  167. +168 −33 vendor/github.com/go-xorm/xorm/README_CN.md
  168. +12 −22 vendor/github.com/go-xorm/xorm/cache_lru.go
  169. +10 −1 vendor/github.com/go-xorm/xorm/circle.yml
  170. +26 −0 vendor/github.com/go-xorm/xorm/context.go
  171. +15 −3 vendor/github.com/go-xorm/xorm/convert.go
  172. +74 −0 vendor/github.com/go-xorm/xorm/dialect_mysql.go
  173. +82 −72 vendor/github.com/go-xorm/xorm/dialect_postgres.go
  174. +2 −2 vendor/github.com/go-xorm/xorm/doc.go
  175. +191 −109 vendor/github.com/go-xorm/xorm/engine.go
  176. +230 −0 vendor/github.com/go-xorm/xorm/engine_cond.go
  177. +194 −0 vendor/github.com/go-xorm/xorm/engine_group.go
  178. +116 −0 vendor/github.com/go-xorm/xorm/engine_group_policy.go
  179. +22 −0 vendor/github.com/go-xorm/xorm/engine_maxlife.go
  180. +2 −0 vendor/github.com/go-xorm/xorm/error.go
  181. +14 −10 vendor/github.com/go-xorm/xorm/helpers.go
  182. +104 −0 vendor/github.com/go-xorm/xorm/interface.go
  183. +33 −7 vendor/github.com/go-xorm/xorm/processors.go
  184. +27 −46 vendor/github.com/go-xorm/xorm/rows.go
  185. +130 −86 vendor/github.com/go-xorm/xorm/session.go
  186. +12 −12 vendor/github.com/go-xorm/xorm/session_cols.go
  187. +9 −9 vendor/github.com/go-xorm/xorm/session_cond.go
  188. +42 −46 vendor/github.com/go-xorm/xorm/session_convert.go
  189. +38 −38 vendor/github.com/go-xorm/xorm/session_delete.go
  190. +86 −0 vendor/github.com/go-xorm/xorm/session_exist.go
  191. +112 −95 vendor/github.com/go-xorm/xorm/session_find.go
  192. +79 −59 vendor/github.com/go-xorm/xorm/session_get.go
  193. +78 −81 vendor/github.com/go-xorm/xorm/session_insert.go
  194. +54 −0 vendor/github.com/go-xorm/xorm/session_iterate.go
  195. +262 −0 vendor/github.com/go-xorm/xorm/session_query.go
  196. +89 −206 vendor/github.com/go-xorm/xorm/session_raw.go
  197. +100 −102 vendor/github.com/go-xorm/xorm/session_schema.go
  198. +98 −0 vendor/github.com/go-xorm/xorm/session_stats.go
  199. +0 −140 vendor/github.com/go-xorm/xorm/session_sum.go
  200. +11 −13 vendor/github.com/go-xorm/xorm/session_tx.go
  201. +113 −79 vendor/github.com/go-xorm/xorm/session_update.go
  202. +118 −258 vendor/github.com/go-xorm/xorm/statement.go
  203. +9 −0 vendor/github.com/go-xorm/xorm/tag.go
  204. +1 −0 vendor/github.com/go-xorm/xorm/test_mssql_cache.sh
  205. +1 −0 vendor/github.com/go-xorm/xorm/test_mymysql.sh
  206. +1 −0 vendor/github.com/go-xorm/xorm/test_mymysql_cache.sh
  207. +1 −0 vendor/github.com/go-xorm/xorm/test_mysql_cache.sh
  208. +1 −0 vendor/github.com/go-xorm/xorm/test_postgres_cache.sh
  209. +1 −0 vendor/github.com/go-xorm/xorm/test_sqlite_cache.sh
  210. +12 −2 vendor/github.com/go-xorm/xorm/xorm.go
  211. +9 −4 vendor/github.com/gogits/git-module/blob.go
  212. +17 −1 vendor/gopkg.in/clog.v1/README.md
  213. +8 −1 vendor/gopkg.in/clog.v1/clog.go
  214. +0 −2 vendor/gopkg.in/clog.v1/console.go
  215. +218 −0 vendor/gopkg.in/clog.v1/discord.go
  216. +2 −3 vendor/gopkg.in/clog.v1/file.go
  217. +31 −15 vendor/gopkg.in/clog.v1/slack.go
  218. +1 −1 vendor/gopkg.in/macaron.v1/LICENSE
  219. +3 −3 vendor/gopkg.in/macaron.v1/README.md
  220. +5 −0 vendor/gopkg.in/macaron.v1/context.go
  221. +2 −2 vendor/gopkg.in/macaron.v1/macaron.go
  222. +8 −5 vendor/gopkg.in/macaron.v1/response_writer.go
  223. +13 −3 vendor/gopkg.in/macaron.v1/router.go
  224. +22 −11 vendor/gopkg.in/macaron.v1/tree.go
  225. +25 −0 vendor/gopkg.in/macaron.v1/util_go17.go
  226. +24 −0 vendor/gopkg.in/macaron.v1/util_go18.go
  227. +15 −15 vendor/vendor.json
@@ -4,7 +4,7 @@ public/assets/* linguist-vendored
public/plugins/* linguist-vendored
public/css/themes/* linguist-vendored
public/css/github.min.css linguist-vendored
public/css/semantic-2.2.10.min.css linguist-vendored
public/css/semantic-2.3.1.min.css linguist-vendored
public/js/libs/* linguist-vendored
public/js/jquery-1.11.3.min.js linguist-vendored
public/js/semantic-2.2.10.min.js linguist-vendored
public/js/semantic-2.3.1.min.js linguist-vendored
@@ -15,26 +15,7 @@ Depends on the situation, you will:
### Bug Report
If you find something you consider a bug, please create a issue on [GitHub](https://github.com/gogits/gogs/issues). To avoid wasting time and reduce back-and-forth communication with team members, please include at least the following information in a form comfortable for you:
- Bug Description
- Gogs Version
- Git Version
- System Type
- Error Log
- Other information
Please take a moment to check that an issue on [GitHub](https://github.com/gogits/gogs/issues) doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
#### Bug Report Example
Gogs crashed when creating a repository with a license, using v0.5.13.0207, SQLite3, Git 1.9.0, Ubuntu 12.04.
Error log:
```
2014/09/01 07:21:49 [E] nil pointer
```
If you find something you consider a bug, please create an issue on [GitHub](https://github.com/gogits/gogs/issues). To avoid wasting time and reduce back-and-forth communication with team members, please be respect to [Issue Template](ISSUE_TEMPLATE.md).
### Feature Request
@@ -1,7 +1,8 @@
The issue will be closed without any reasons if it does not satisfy any of following requirements:
1. Please speak English, we have forum in [Chinese](https://discuss.gogs.io/c/getting-help/getting-help-chinese).
1. Please speak English, we have forum in [中文](https://discuss.gogs.io/c/getting-help/getting-help-chinese).
2. Please post questions or config/deploy problems on our forum: https://discuss.gogs.io, here are bugs and feature requests only.
3. Please do not end your title with a question mark or period.
3. Please take a moment to search that an issue doesn't already exist.
4. Please give all relevant information below for bug reports; incomplete details considered invalid report.

This file was deleted.

Oops, something went wrong.
@@ -7,6 +7,8 @@ targets:
- git
debian-8:
<<: *debian
debian-9:
<<: *debian
ubuntu-12.04:
<<: *debian
ubuntu-14.04:
@@ -4,6 +4,7 @@ go:
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- master
before_install:
@@ -0,0 +1,44 @@
FROM arm64v8/alpine:3.6
ENV GOGS_CUSTOM /data/gogs
ENV QEMU_EXECVE 1
# For cross compile on dockerhub
################################
COPY ./docker/aarch64/qemu-aarch64-static /usr/bin/
COPY ./docker/aarch64/resin-xbuild /usr/bin/
RUN [ "/usr/bin/qemu-aarch64-static", "/bin/sh", "-c", "ln -s resin-xbuild /usr/bin/cross-build-start; ln -s resin-xbuild /usr/bin/cross-build-end; ln /bin/sh /bin/sh.real" ]
RUN [ "cross-build-start" ]
# Prepare the container
#######################
# Install system utils & Gogs runtime dependencies
ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-arm64 /usr/sbin/gosu
RUN chmod +x /usr/sbin/gosu \
&& apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh socat tzdata go
COPY . /app/gogs/build
WORKDIR /app/gogs/build
RUN ./docker/build.sh \
&& ./docker/finalize.sh
# Configure LibC Name Service
COPY docker/nsswitch.conf /etc/nsswitch.conf
# For cross compile on dockerhub
################################
RUN [ "cross-build-end" ]
# Configure Docker Container
############################
VOLUME ["/data"]
EXPOSE 22 3000
ENTRYPOINT ["/app/gogs/docker/start.sh"]
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]
@@ -56,7 +56,7 @@ release: build pack
bindata: pkg/bindata/bindata.go
pkg/bindata/bindata.go: $(DATA_FILES)
go-bindata -o=$@ -ignore="\\.DS_Store|README.md|TRANSLATORS" -pkg=bindata conf/...
go-bindata -o=$@ -ignore="\\.DS_Store|README.md|TRANSLATORS|auth.d" -pkg=bindata conf/...
less: public/css/gogs.css
@@ -24,7 +24,7 @@ Gogs [![Build Status](https://travis-ci.org/gogits/gogs.svg?branch=master)](http
## Purpose
The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. With Go, this can be done with an independent binary distribution across **ALL platforms** that Go supports, including Linux, Mac OS X, Windows and ARM.
The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. With Go, this can be done with an independent binary distribution across **ALL platforms** that Go supports, including Linux, macOS, Windows and ARM.
## Overview
@@ -52,7 +52,7 @@ The goal of this project is to make the easiest, fastest, and most painless way
- Mail service
- Administration panel
- Supports MySQL, PostgreSQL, SQLite3, MSSQL and [TiDB](https://github.com/pingcap/tidb) (via MySQL protocol)
- Multi-language support ([26 languages](https://crowdin.com/project/gogs))
- Multi-language support ([29 languages](https://crowdin.com/project/gogs))
## Hardware Requirements
@@ -124,9 +124,9 @@ There are 5 ways to install Gogs:
## Acknowledgments
- 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.
- Thanks [KeyCDN](https://www.keycdn.com/) and [QiNiu](http://www.qiniu.com/) for providing CDN service.
- Thanks [Crowdin](https://crowdin.com/project/gogs) for sponsoring open source translation plan.
- Thanks [DigitalOcean](https://www.digitalocean.com) for sponsoring VPS service.
- Thanks [KeyCDN](https://www.keycdn.com/) for sponsoring CDN service.
## Contributors
@@ -5,7 +5,7 @@ Gogs 是一款极易搭建的自助 Git 服务。
## 开发目的
Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自助 Git 服务。使用 Go 语言开发使得 Gogs 能够通过独立的二进制分发,并且支持 Go 语言支持的 **所有平台**,包括 Linux、Mac OS X、Windows 以及 ARM 平台。
Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自助 Git 服务。使用 Go 语言开发使得 Gogs 能够通过独立的二进制分发,并且支持 Go 语言支持的 **所有平台**,包括 Linux、macOS、Windows 以及 ARM 平台。
## 项目概览
@@ -33,7 +33,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
- 支持邮件服务
- 支持后台管理面板
- 支持 MySQL、PostgreSQL、SQLite3、MSSQL 和 [TiDB](https://github.com/pingcap/tidb)(通过 MySQL 协议)数据库
- 支持多语言本地化([26 种语言]([more](https://crowdin.com/project/gogs)))
- 支持多语言本地化([29 种语言]([more](https://crowdin.com/project/gogs)))
## 硬件要求
@@ -95,7 +95,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
- 感谢 [Egon Elbre](https://twitter.com/egonelbre) 设计的 Logo。
- 感谢 [Crowdin](https://crowdin.com/project/gogs) 提供免费的开源项目本地化支持。
- 感谢 [DigitalOcean](https://www.digitalocean.com) 提供主站和体验站点的服务器赞助。
- 感谢 [KeyCDN](https://www.keycdn.com/) 和 [七牛云存储](http://www.qiniu.com/) 提供 CDN 服务赞助。
- 感谢 [KeyCDN](https://www.keycdn.com/) 提供 CDN 服务赞助。
## 贡献成员
@@ -27,7 +27,7 @@ to make automatic initialization process more smoothly`,
subcmdDeleteRepositoryArchives,
subcmdDeleteMissingRepositories,
subcmdGitGcRepos,
subcmdRewriteAllPublicKeys,
subcmdRewriteAuthorizedKeys,
subcmdSyncRepositoryHooks,
subcmdReinitMissingRepositories,
},
@@ -94,11 +94,11 @@ to make automatic initialization process more smoothly`,
},
}
subcmdRewriteAllPublicKeys = cli.Command{
Name: "rewrite-public-keys",
subcmdRewriteAuthorizedKeys = cli.Command{
Name: "rewrite-authorized-keys",
Usage: "Rewrite '.ssh/authorized_keys' file (caution: non-Gogs keys will be lost)",
Action: adminDashboardOperation(
models.RewriteAllPublicKeys,
models.RewriteAuthorizedKeys,
"All public keys have been rewritten successfully",
),
Flags: []cli.Flag{
@@ -22,6 +22,7 @@ import (
"github.com/gogits/git-module"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/pkg/httplib"
"github.com/gogits/gogs/pkg/mailer"
"github.com/gogits/gogs/pkg/setting"
@@ -94,7 +95,7 @@ func runHookPreReceive(c *cli.Context) error {
repoID := com.StrTo(os.Getenv(http.ENV_REPO_ID)).MustInt64()
protectBranch, err := models.GetProtectBranchOfRepoByName(repoID, branchName)
if err != nil {
if models.IsErrBranchNotExist(err) {
if errors.IsErrBranchNotExist(err) {
continue
}
fail("Internal error", "GetProtectBranchOfRepoByName [repo_id: %d, branch: %s]: %v", repoID, branchName, err)
@@ -235,9 +236,9 @@ func runHookPostReceive(c *cli.Context) error {
log.Error(2, "PushUpdate: %v", err)
}
// Ask for running deliver hook and test pull request tasks.
// Ask for running deliver hook and test pull request tasks
reqURL := setting.LocalURL + options.RepoUserName + "/" + options.RepoName + "/tasks/trigger?branch=" +
strings.TrimPrefix(options.RefFullName, git.BRANCH_PREFIX) +
template.EscapePound(strings.TrimPrefix(options.RefFullName, git.BRANCH_PREFIX)) +
"&secret=" + os.Getenv(http.ENV_REPO_OWNER_SALT_MD5) +
"&pusher=" + os.Getenv(http.ENV_AUTH_USER_ID)
log.Trace("Trigger task: %s", reqURL)
@@ -172,6 +172,8 @@ func runWeb(c *cli.Context) error {
bindIgnErr := binding.BindIgnErr
m.SetAutoHead(true)
// FIXME: not all routes need go through same middlewares.
// Especially some AJAX requests, we can reduce middleware number to improve performance.
// Routers.
@@ -635,8 +637,10 @@ func runWeb(c *cli.Context) error {
// e.g. with or without ".git" suffix.
m.Group("/:reponame([\\d\\w-_\\.]+\\.git$)", func() {
m.Get("", ignSignIn, context.RepoAssignment(), context.RepoRef(), repo.Home)
m.Options("/*", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP)
m.Route("/*", "GET,POST", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP)
})
m.Options("/:reponame/*", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP)
m.Route("/:reponame/*", "GET,POST", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP)
})
// ***** END: Repository *****
@@ -723,7 +727,7 @@ func runWeb(c *cli.Context) error {
}
if err != nil {
log.Fatal(4, "Fail to start server: %v", err)
log.Fatal(4, "Failed to start server: %v", err)
}
return nil
@@ -35,6 +35,8 @@ SSH_LISTEN_HOST = 0.0.0.0
SSH_LISTEN_PORT = %(SSH_PORT)s
; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
SSH_ROOT_PATH =
; Indicate whether to rewrite authorized_keys at start, ignored when use builtin SSH server
REWRITE_AUTHORIZED_KEYS_AT_START = false
; Choose the ciphers to support for SSH connections
SSH_SERVER_CIPHERS = aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128
; Directory to create temporary files when test publick key using ssh-keygen,
@@ -224,8 +226,8 @@ PAGING_NUM = 10
ENABLED = false
; Buffer length of channel, keep it as it is if you don't know what it is.
SEND_BUFFER_LEN = 100
; Name displayed in mail title
SUBJECT = %(APP_NAME)s
; Prefix prepended to the subject line
SUBJECT_PREFIX = `[%(APP_NAME)s] `
; Mail server
; Gmail: smtp.gmail.com:587
; QQ: smtp.qq.com:465
@@ -292,7 +294,7 @@ DISABLE_GRAVATAR = false
; Federated avatar lookup uses DNS to discover avatar associated
; with emails, see https://www.libravatar.org
; This value will be forced to be false in offline mode or Gravatar is disbaled.
ENABLE_FEDERATED_AVATAR = true
ENABLE_FEDERATED_AVATAR = false
; Attachment settings for issues
[attachment]
@@ -351,6 +353,14 @@ LEVEL =
; Webhook URL
URL =
[log.discord]
; leave empty to inherit
LEVEL =
; Webhook URL
URL =
; Username displayed in webhook
USERNAME = %(APP_NAME)s
[log.xorm]
; Enable file rotation
ROTATE = true
@@ -453,8 +463,8 @@ NEWS_FEED_PAGING_NUM = 20
COMMITS_PAGING_NUM = 30
[i18n]
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,gl-ES,uk-UA,en-GB,hu-HU,sk-SK
NAMES = English,简体中文,繁體中文(香港),繁體中文(臺灣),Deutsch,français,Nederlands,latviešu,русский,日本語,español,português do Brasil,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어,galego,українська,English (United Kingdom),Magyar,slovenský
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,en-GB,hu-HU,sk-SK,id-ID,fa-IR,vi-VN
NAMES = English,简体中文,繁體中文(香港),繁體中文(臺灣),Deutsch,français,Nederlands,latviešu,русский,日本語,español,português do Brasil,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어,galego,українська,English (United Kingdom),Magyar,Slovenčina,Indonesian,Persian,Vietnamese
; Used for datetimepicker
[i18n.datelang]
@@ -481,6 +491,12 @@ sv-SE = sv
ko-KR = ko
gl-ES = gl
uk-UA = uk
en-GB = en-GB
hu-HU = hu
sk-SK = sk
id-ID = id
fa-IR = fa
vi-VN = vi
; Extension mapping to highlight class
; e.g. .toml=ini
Oops, something went wrong.

0 comments on commit 7ecf5f7

Please sign in to comment.