Commit Graph

154 Commits (jc/exp/srcgraph-external-service)

Author SHA1 Message Date
Unknwon 512a900202
repo/editor: hide internal error detail
Prevent exposure of server path
2018-08-17 23:35:53 +08:00
Unknwon ac73d43444
repo_editor: able to trigger Git hooks (#4338) 2018-08-17 23:15:20 +08:00
Unknwon 844d69143f
pkg/markup: allow match SHA1 length 7-40 (#3321) 2018-08-17 20:02:43 +08:00
Unknwon 97fb9d283f
locale: sync from Crowdin 2018-07-16 06:14:54 +08:00
Unknwon f6bdefe3f3
public: minor fix for PR #5276 2018-06-26 21:16:29 +08:00
Unknwon 992ea5802a
locale: sync from Crowdin 2018-06-18 12:21:51 +08:00
Unknwon 376a629c9f
repo: add changes to repository avatar feature (#5221) 2018-06-17 22:18:41 +08:00
Sergey Dryabzhinsky 303fa37b60 repo: support avatars (#5221)
* First code for repository avatars

* Last code for repository avatars

- add new option for repo avatars location on filesystem
- add route catch in web
- add new fields to repo model
- add migration
- update settings handlers
- update repo header template

* Update locale messages

* Add repo avatars to home page

* Add repo avatars to organization right panel

* Show repo avatars in repo list

* Remove AvatarEamil field, remove Gravatar support, use generic locale messages

* Fix migration

* Fix seed and not used tool

* Revert public css changes, add them to less files

* Latest lessc (2.6.0) don't put result into file but output to stdout

So redirect output to file

* Simplify things:

- migration don't needed, and table changes too
- just upload file to repo avatar storage
- or generate random image

* Fix repo image seed - name not unique

* Get rid of not needed model fields

* Class value is enough, remove height attribute

* Don't generate random avatar for repository

- use html and semantic ui icons if no avatar found

* Update styles and templates for repo

- use repo icon as default avatar
- use globe icon for public repos
- add micro style for repo avatars at dashboard

* Remvoe redundant empty line

* Fix nl2br filter - must return string

* Fix css style for micro-repo-avatar in dashboard list

* Remove `|len`, works fine w/o it.

* Update after review 2:

- use static route for repository avatar
- format images settings block in settings

* Update after review 2:

- no random avatar for repo

* Update after review 2:

- no random avatar for repo 2
- update imports
- update UploadAvatar* functions

* Update after review 2:

- update templates

* Fix trace call

* Remove unused immport since we use static route for repo avatars.
2018-06-17 20:21:52 +08:00
Unknwon ef02414d7e
pkg/setting: ignore config inline comment by default 2018-06-17 09:10:18 +08:00
Unknwon 7856b1202d
*: fix wrong format type 2018-06-13 22:26:56 +08:00
oOOps f9bc980b0b api: correct pagination in repository search api (#5293) 2018-06-13 21:55:09 +08:00
Unknwon dfd494c113
repo: minor improve for PR #5219 and support UTF-8 byte count 2018-06-11 21:06:24 +08:00
Sergey Dryabzhinsky 57897cc8c2 repo: update repository description field to contain more than 256 symbols (#5219)
* Update repository description field to contain more than 256 symbols

- update repository model - description field now is `TEXT` and limited by 4000 symbols
- new migration
- add description to html forms - repo creation and repo settings
- add translation for description

* Update for description field, new features

- add autosize (height) for description textarea, new plugin
- set max description length to 512 symbols
- update locales

* Fix migration - typo in var

* Update repo description behaviour

- add textarea autosize for /repo/create
- add symbols counter under description testarea (create/edit)

* Fix function definition - it a var

* Revert ru-RU locale

* Update by review

- Use type `varchar(512)` in migration
- Remove unused files from autosize plugin

* Fix migration - new project paths

* Fixes after review 2

- copyright year
- format includes
- use switch instead of multi-if

* Remove unused `default:` option.
2018-06-11 20:34:26 +08:00
Unknwon fbecc18e2e
*: use jsoniter to replace encoding/json 2018-06-09 17:32:58 +08:00
Unknwon 91441c3fb2
locale: sync from Crowdin 2018-06-05 07:31:34 +08:00
Unknwon c08aab90ec
models/mirror: shot push webhook after synced commits (#4528) 2018-06-03 20:32:44 +08:00
Unknwon 0376e59520
pkg/setting: fix '[git] GC_ARGS' is not loaded 2018-06-03 16:02:17 +08:00
Unknwon e25fe22f9d
pkg/template: fix NewLine2br return type to string 2018-06-02 08:15:56 +08:00
Unknwon 775919c129
mirror: show sync feeds on dashboard (#2017) 2018-05-30 21:26:03 +08:00
Sergey Dryabzhinsky b5a1daa756 template: simple html filter for repository description (#5242)
* Add markdown renderer function to templates, use it for description in repo template

* Fix function call

* Define function Md2html in template namespace

* Change filter from Md2html to nl2br

* Change filter name to NewLine2br as suggested

* Update description output:

- just replace `\n` by `<br>`
- sanitize html after replace
2018-05-29 06:42:27 +08:00
Unknwon aff4208244
*: rename "gogits" to "gogs" 2018-05-27 08:53:48 +08:00
Unknwon 01ccc2cc96
security: prevent same passcode from being reused
Reported by @cezar97.
2018-05-21 14:24:06 +08:00
Unknwon 2fabcd0455
locale: sync from Crowdin 2018-05-02 20:46:54 -04:00
Unknwon 9127001f11
pkg/setting: support Discord logger 2018-04-25 22:13:01 -04:00
Unknwon f439df4441
locale: sync from Crowdin 2018-04-25 13:50:48 -04:00
rokuu c92e8940dc pkg/form: fix bad locale reference (#5196) 2018-04-24 09:57:42 -04:00
Cosmin Stroe 54b9311344 pkg/markup/markdown: Issue mentions should also render with square brackets (#4707)
* gofmt reformat of markdown.go
2018-04-21 12:08:11 -04:00
Unknwon 5c2de3a9ea
pkg/template: fix Gravatar URLs are badly generated (#5157) 2018-04-18 19:40:35 -04:00
Unknwon e6af6487e1
locale: sync from Crowdin
Add Vietnamese
2018-04-16 17:48:23 -04:00
Josef Kemetmüller c0b45fa36f ldap: return valid LDAP string if user input lacks "%s" (#5171)
If the user provides a string that does not contain "%s", fmt.Sprintf
silently appends "%!(EXTRA type=value)" instead of failing loudly.
This fixes #4375.
2018-04-16 17:19:45 -04:00
Unknwon f2ecfdc96a
auth: support authentication source config file (#3142) 2018-04-12 09:55:58 -04:00
Unknwon 717d409b72
templates/admin/auth/list: rename list title 2018-04-11 19:39:17 -04:00
Unknwon b69294b6d6
locale: sync from Crowdin 2018-04-09 12:38:39 -04:00
Unknwon 6cbaa4787b
MISC: update docker build script 2018-04-09 07:26:55 -04:00
Unknwon 0152e12172
locale: sync from Crowdin 2018-03-30 23:19:20 -04:00
Unknwon 34bd04f925
MISC: fix typo and grammar
Reference: 932490d7f1 (commitcomment-28344918)
2018-03-30 04:40:13 -04:00
Unknwon 17d789a785
pkg/mailer: support custom mail subject prefix (#4524) 2018-03-30 03:52:23 -04:00
Unknwon 63a263f542
templates/admin/config: show SSH.StartBuiltinServer 2018-03-30 01:42:35 -04:00
Unknwon 932490d7f1
conf: add option to rewrite authorized_keys file at start (#4435)
Added config option '[server] REWRITE_AUTHORIZED_KEYS_AT_START'.
2018-03-30 01:32:18 -04:00
Unknwon 0d2398aaff
bindata: update 2018-03-29 05:58:31 -04:00
Unknwon d7280f82ac
locale: sync from Crowdin 2018-03-12 09:23:29 -04:00
Unknwon 49bd893a77
bindata: update changes from pull requests 2018-03-06 17:22:27 -05:00
Drahoslav Bednář 7faa2356d8 pkg/context: add doctype to go-get=1 response (#4938) 2018-03-06 16:43:48 -05:00
Arnie97 2a8a293c7c pkg/tool: use identicon image as the default gravatar (#4934) 2018-03-06 16:43:00 -05:00
Unknwon ade8aab43f
locale: sync from Crowdin
Added Indonesian and Persian
2018-03-05 04:37:44 -05:00
Unknwon 6f2347fc71
locale: sync from Crowdin
Fixes #4811
2017-11-22 14:46:14 -05:00
Unknwon 114677b747
bindata: update 2017-11-19 12:49:46 -05:00
Unknwon 51e0eef11e
locale: sync from Crowdin 2017-11-18 01:27:56 -05:00
Unknwon 3b8b8a2ee3
pull_request: able to ignore whitespace when check conflict (#4834) 2017-11-16 22:22:38 -05:00
Unknwon 6f04ee879c
auth/ldap: allow placeholder %s for BindDN (#2526) 2017-11-16 19:32:33 -05:00
Unknwon e1e76d3f88
admin/config: add UI for [http] section (#3987) 2017-11-16 19:03:46 -05:00
Unknwon 86931f546f
repo: fix go-get meta tags (#4832)
The first part in go-import should be the root import path. It
included subpath when 'go get' with a subpath and was not correct.
2017-11-16 18:43:03 -05:00
Unknwon 34c2e52bd5
repo/pull: allow rebase before merging (#4805) 2017-11-15 23:28:31 -05:00
mharinder 5cd1fdeb9e
pull: add an option to use rebase for merging pull requests
For DVCS, either merge or rebase works for getting new code in a pull
request in the main branch.

The rebase workflow produces a linear history which is cleaner, and
more bisect-able.

This commit adds a repo-level option to enable the rebase workflow. Once
enabled, "Merge Pull Request" will be replaced by
"Rebase and Merge Pull Request" which does exactly what the user wants.
It's unlikely a project wants a mixed-use of both rebase and merge
workflows, therefore the feature is not implemented as a drop-down
button like what GitHub does
(https://github.com/blog/2243-rebase-and-merge-pull-requests).
2017-11-15 23:28:23 -05:00
Unknwon 9b4054f1fc
locale: sync from Crowdin 2017-11-05 23:59:12 -05:00
Unknwon c1507eda45
locale: sync from Crowdin 2017-10-14 04:19:24 -04:00
Unknwon 1b24e6ed76
locale: sync from Crowdin 2017-09-25 20:29:10 -04:00
Athurg Feng 52f3833811 Add Dingtalk webhook support (#4773)
* Add dingtalk webhook into html template

* Add Dingtalk's icon

* Insert dingtalk into repo's webhook page template

* Insert dingtalk into org's webhook page

* Add dingtalk into default webhook config

* Add locale string for add_dingtalk_hook_desc

* Update bindata

* Add dingtalk webhook form validator

* Add dingtalk hook task

* Add dingtalk hook create handler

* Add dingtalk hook edit handler

* Add dingtalk router

* Add dingtalk webhook task skeleton

* Add markdown link formatter

* Add Dingtalk ActionCard create wrapper

* Add support for dingtalk create event payload

* Add support for dingtalk delete event payload

* Add support for dingtalk fork event payload

* Add support for dingtalk push event payload

* Add support for dingtalk issue event payload

* Add support for dingtalk issue comment payload

* Add support for dingtalk pull event payload

* Add support for dingtalk release event payload
2017-09-21 14:32:48 -04:00
Unknwon b1100b5e34
locale: sync from Crowdin 2017-08-15 18:20:28 -04:00
Unknwon f2c3f4a944
locale: sync from Crowdin 2017-07-30 02:45:13 -04:00
Unknwon 6bc11c4450
hook: fix email not sent after push (#4430)
Turns out mail service was not initialized at all, also mail must
be sent in sync in hook mode before program exits.
2017-07-27 16:53:02 -04:00
Unknwon b18a2bdcd3
locale: sync from Crowdin 2017-07-14 16:48:41 -04:00
Unknwon d09eaef542
locale: sync from Crowdin 2017-07-09 21:38:11 -04:00
Unknwon ea03bee1b9
locale: sync from Crowdin 2017-06-27 14:45:10 -04:00
Unknwon f59500a90b
locale: sync from Crowdin 2017-06-20 00:10:10 -04:00
Unknwon 23b83cb736
pkg/process: fix potential race condition
Following conditions were not protected:
1. Use and increase next pid
2. Append and remove process from the list
2017-06-11 02:28:08 -04:00
Unknwon e16196124e
setting: disable SSH minimum key size check when not eligible (#4507) 2017-06-11 02:06:26 -04:00
Unknwon 6197a7639a
locale: sync from Crowdin 2017-06-10 01:43:18 -04:00
Unknwon 88791089ed
locale: sync from Crowdin 2017-06-08 14:11:25 -04:00
无闻 51d7f1264b api: GitHub compliance (#4549)
* Add undocumented endpoint for /repositories/:id

* GitHub API Compliance
2017-06-05 15:34:11 -04:00
Unknwon 36d6450977
repo/pull: detect case when no merge base found (#4434) 2017-06-05 00:10:53 -04:00
Unknwon 02a576a6a0
locale: update translations 2017-06-04 14:55:55 -04:00
Unknwon 2478b87432
Refactoring: rename ctx -> c 2017-06-03 07:26:09 -04:00
Unknwon e33c714073
repo: always response go-get meta when requested (#1878) 2017-06-03 06:54:06 -04:00
Unknwon 5c10eff67f
bindata: regenerate 2017-06-03 06:51:16 -04:00
Unknwon 239dd978ff
repo: support go get subpkg (#1878) 2017-06-03 06:50:09 -04:00
Peter Mescalchin 21c1b8d834 conf: rename attachment toggle from ENABLE to ENABLED (#4474) 2017-06-03 03:02:55 -04:00
Unknwon c407921644
orgmode: recover panic from third-party package 2017-06-02 17:19:06 -04:00
Unknwon 4cb01fe332
locale: add Hungarian 2017-06-01 23:41:58 -04:00
Unknwon a1d411a018
ldap: minor fix for PR #4398 2017-05-29 23:18:34 -04:00
aboron dbb7e5464b ldap: add check for group membership (#4398)
* Add standard LDAP group membership checking.

* Fix formatting, typo, grammer, and syntax errors

* Debugging done.
Gave up on locale file edits.
2017-05-29 22:33:50 -04:00
Unknwon a5bd095c30
locale: add en-GB 2017-05-25 12:53:28 -04:00
Unknwon ce6e8ed8fe
models: remove redundant tags for primary keys 2017-05-21 04:36:41 -04:00
spacetourist 0a6ceabb9b Allow configurable HTTPS SSL/TLS version(#4451) 2017-05-20 08:31:25 -04:00
Unknwon d71a8fece8
feature/org-mode: fix compile error 2017-05-17 18:50:14 -04:00
Unknwon 1b5a418fd3
modules/markup: initial support for org-mode (#4373) 2017-05-17 18:46:23 -04:00
Unknwon a11044f789
locale: sync from Crowdin 2017-05-17 18:37:25 -04:00
Unknwon 6500aafcb8
install: validate port in SMTP host address (#2243) 2017-04-07 23:23:39 -04:00
Unknwon 6ebdf91b32
templates/repo: fix README.ipynb not rendered (#4367) 2017-04-07 22:33:19 -04:00
Unknwon 91cd350b63
repo/editor: fix wrong context for subdirectory (#4368) 2017-04-07 21:44:55 -04:00
Unknwon 809db853fa
locale: fix zh-CN 2017-04-07 15:41:54 -04:00
Unknwon d0612be402
user/setting: improve UI 2017-04-07 15:08:53 -04:00
Unknwon fda4b1106e
user/setting: simplify code 2017-04-07 00:49:30 -04:00
Unknwon ac43eab51f
Refactoring: rename Signed -> Logged 2017-04-06 23:48:49 -04:00
Unknwon 90b9f7e08c
pkg/setting: rename {AppUrl, AppSubUrl} -> {AppURL, AppSubURL} 2017-04-06 17:27:57 -04:00
Unknwon 2c404daca6
pkg/context: rename {CsrfToken, CsrfTokenHtml} -> {CSRFToken, CSRFTokenHTML} 2017-04-06 17:20:38 -04:00
Unknwon 0e271799f2
Refactoring: rename and simplify pkg/tool functions 2017-04-06 17:13:53 -04:00
Unknwon bd1f2ccaf8
user/settings/security: add token description about 2FA 2017-04-06 16:27:31 -04:00
Unknwon a617d52374
2fa: initial support (#945) 2017-04-06 00:14:30 -04:00
Unknwon e0a787b5ee
Update locales 2017-04-05 13:26:53 -04:00