Commit Graph

308 Commits (main)

Author SHA1 Message Date
Joe Chen 740eba4f70
session: support TLS for Redis provider (#7860) 2024-12-14 23:18:46 -05:00
Joe Chen b34ee73497
feat(ssh): support dynamic list of algorithms (#7345) 2023-02-12 13:10:41 +08:00
Vamsi Atluri ef1fe1bb3b
conf: add new config option for default branch name (#7291)
Co-authored-by: Vamsi Atluri <me@vamc19.dev>
Co-authored-by: Joe Chen <jc@unknwon.io>
2023-02-11 16:37:24 +08:00
Joe Chen db82024fc7
netutil: allow using `*` to match any hostname (#7111) 2022-07-25 21:38:15 +08:00
Joe Chen a8e43f63a1
locale: sync from Crowdin (#7082) 2022-06-26 11:09:33 +08:00
Joe Chen 714383a063
conf: add allowlist for accessing local network (#6842) 2022-03-14 22:06:08 +08:00
zvrh a9be4de5a5
database: add PostgreSQL custom schema support (#6695)
Co-authored-by: Homura37 <git@gvip.xyz>
Co-authored-by: Homura <16538800+Homura37@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-01-05 22:02:33 +08:00
ᴜɴᴋɴᴡᴏɴ 509a392272
locale: sync from Crowdin (#6510)
* locale: sync from Crowdin

* Fix tests
2021-02-27 18:48:10 +08:00
Eduardo Bacchi Kienetz c875950c43
ssh: allow setting allowed MAC algorithms for built-in server (#6435)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-12-04 21:52:26 +08:00
Zhukov Roman be86d67e81
Add git diff timeout in app config (#6348)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-09-29 23:12:17 +08:00
David Refoua 90b1ee1dfa
conf: fix some typos in comments (app.ini) (#6237) 2020-08-22 01:36:29 +08:00
ᴜɴᴋɴᴡᴏɴ 9a5b227f3e
lfsutil: add `Storager` interface and local storage (#6083)
* Add Storager interface

* Add tests

* Add back note

* Add tests for basic protocol routes

* Fix lint errors
2020-04-10 22:13:42 +08:00
alpencrossi 083ecb7244
conf: clearer doc comments for mirror config options (#6058)
* conf: clearer doc comments for mirror config options

* conf: apply suggestions from code review

Co-Authored-By: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>

* conf: clearer doc comments for mirror config options - added bindata

Co-authored-by: Gogs <gogs@fake.local>
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
Co-authored-by: gkuehn001 <gkuehn@gmail.com>
2020-04-06 14:48:25 +08:00
ᴜɴᴋɴᴡᴏɴ 34145c990d
lfs: implement HTTP routes (#6035)
* Bootstrap with GORM

* Fix lint error

* Set conn max lifetime to one minute

* Fallback to use gorm v1

* Define HTTP routes

* Finish authentication

* Save token updated

* Add docstring

* Finish authorization

* serveBatch rundown

* Define types in lfsutil

* Finish Batch

* authutil

* Finish basic

* Formalize response error

* Fix lint errors

* authutil: add tests

* dbutil: add tests

* lfsutil: add tests

* strutil: add tests

* Formalize 401 response
2020-04-04 21:14:15 +08:00
ᴜɴᴋɴᴡᴏɴ 6437d0180b
git: migrate to github.com/gogs/git-module@v1.0.0 (#5958)
* WIP

* Finish `internal/db/git_diff.go`

* FInish internal/db/mirror.go

* Finish internal/db/pull.go

* Finish internal/db/release.go

* Finish internal/db/repo.go

* Finish internal/db/repo_branch.go

* Finish internal/db/repo_editor.go

* Finish internal/db/update.go

* Save my work

* Add license header

* Compile!

* Merge master

* Finish internal/cmd/hook.go

* Finish internal/conf/static.go

* Finish internal/context/repo.go

* Finish internal/db/action.go

* Finish internal/db/git_diff.go

* Fix submodule URL inferring

* Finish internal/db/mirror.go

* Updat to beta.4

* css: update fonts

* Finish internal/db/pull.go

* Finish internal/db/release.go

* Finish internal/db/repo_branch.go

* Finish internal/db/wiki.go

* gitutil: enhance infer submodule UR

* Finish internal/route/api/v1/repo/commits.go

* mirror: only collect branch commits after sync

* mirror: fix tag support

* Finish internal/db/repo.go

* Finish internal/db/repo_editor.go

* Finish internal/db/update.go

* Finish internal/gitutil/pull_request.go

* Make it compile

* Finish internal/route/repo/setting.go

* Finish internal/route/repo/branch.go

* Finish internal/route/api/v1/repo/file.go

* Finish internal/route/repo/download.go

* Finish internal/route/repo/editor.go

* Use helper

* Finish internal/route/repo/issue.go

* Finish internal/route/repo/pull.go

* Finish internal/route/repo/release.go

* Finish internal/route/repo/repo.go

* Finish internal/route/repo/wiki.go

* Finish internal/route/repo/commit.go

* Finish internal/route/repo/view.go

* Finish internal/gitutil/tag.go

* go.sum
2020-03-08 19:09:31 +08:00
ᴜɴᴋɴᴡᴏɴ 8df3350252
auth: redirect landing URL with subpath prepended (#5964) 2020-03-04 02:02:12 +08:00
ᴜɴᴋɴᴡᴏɴ 9c65798902
conf: enhance app.ini comments 2020-03-01 13:23:59 +08:00
ᴜɴᴋɴᴡᴏɴ 18e45aab98
template: improve admin config page 2020-03-01 03:21:13 +08:00
ᴜɴᴋɴᴡᴏɴ 17ae0ed3ee
conf: overhaul settings (#5953)
* Overhaul cache settings

* Overhaul HTTP settings

* conf: overhaul more settings

* log: make LGTM happy

* travis: upload report to Codecov

* Add codecov.yml
2020-02-29 16:29:17 +08:00
ᴜɴᴋɴᴡᴏɴ d59b0f6ff7
conf: overhaul sessions settings (#5952) 2020-02-29 00:26:03 +08:00
ᴜɴᴋɴᴡᴏɴ 7950f2d17d
conf: overhaul auth and user settings (#5942)
* conf: overhaul auth and user settings

* ci: update travis Go versions
2020-02-27 18:06:38 +08:00
ᴜɴᴋɴᴡᴏɴ 52ffb67b33
conf: overhaul email settings (#5940) 2020-02-25 00:35:35 +08:00
ᴜɴᴋɴᴡᴏɴ 286fbc07e9
conf: overhaul security settings 2020-02-22 20:46:16 +08:00
ᴜɴᴋɴᴡᴏɴ 5efbde4fe9
conf: overhaul database settings 2020-02-22 18:58:16 +08:00
ᴜɴᴋɴᴡᴏɴ c4a0a40473
conf: overhaul repository settings (#5932) 2020-02-22 15:22:32 +08:00
ᴜɴᴋɴᴡᴏɴ 5282699f19
admin/config: show all server and SSH options 2020-02-22 11:40:23 +08:00
ᴜɴᴋɴᴡᴏɴ 648d9e253c
conf: overhaul server settings (#5928)
* conf: rename package

* Requires Go 1.12

* Fix lint

* Fix lint

* Overhaul

* db: fix tests

* Save my work

* Fix tests

* Server.UnixSocketPermission

* Server.LocalRootURL

* SSH settings

* Server.OfflineMode

* Save my work

* App.Version

* Remove [server] STATIC_ROOT_PATH

* Server.LandingURL
2020-02-22 09:05:26 +08:00
ᴜɴᴋɴᴡᴏɴ 422a206484
conf: remove unused config option SHOW_FOOTER_VERSION 2020-02-20 00:20:42 +08:00
Michael Li 4d83fd4238
Use go-bindata to embed `public` and `templates` files into binary (#5920)
* fixed private repositories are hidden in the organization's view

* use go-bindata integrate public and templates files to gogs binary

* optimize Dockerfile don't COPY public and templates files

* use kevinburke's go-bindata to generate assets code

* reset develepment as default run mode in configure file

* optimize generated assets code relayout and help function

* fixed code format

* Update conf/app.ini

* assets: add LICENSE headers

* Some housekeeping

* assets/public: simplify code logic

* assets/templates: simplify code logic

* cmd/web: more concise variable names

* Minor changes

* Add custom public and templates support back

Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-02-17 22:48:24 +08:00
Unknwon 8b7fa6627f
conf: fix wrong default example value 2020-01-29 16:42:07 +08:00
Unknwon 06b6eaba06
locale: sync from Crowdin
- Add Portuguese
2019-01-30 21:59:10 -05:00
Guy Smoilov 5702e4bc24 pkg/mailer: support plaintext alt for HTML emails (#5568)
* Added option to use plain text alt to HTML emails. Should make the messages friendlier for spam filters.

* Check that plaintext conversion worked before adding the HTML alt

* Add description of ADD_PLAIN_TEXT_ALT to app.ini

* Added comment clarifying html AddAlternative
2018-12-25 10:08:00 -05:00
Unknwon a91d9054ad
conf: fix unexpected behavior of config inheritance (#5007) 2018-11-26 06:44:06 -05:00
Unknwon 3058f8fd69
conf: change default session cookie name
[CI SKIP]
2018-10-24 10:05:35 -04:00
Unknwon aff0bbcc32
pkg/ssh: print actual error in panic (#5435) 2018-09-28 15:37:34 -04:00
Unknwon 520530dfcf
metrics: add initial Prometheus support (#4141) 2018-09-14 22:29:43 -04: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 9127001f11
pkg/setting: support Discord logger 2018-04-25 22:13:01 -04:00
Unknwon e6af6487e1
locale: sync from Crowdin
Add Vietnamese
2018-04-16 17:48:23 -04:00
Unknwon 17d789a785
pkg/mailer: support custom mail subject prefix (#4524) 2018-03-30 03:52:23 -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
Rebecca Turner c3c7944d79 conf: default to disabling federated avatar lookup (#5126)
It's a fun feature but `ENABLE_FEDERATED_AVATAR` being true by default
leads to confusion and huge slowdowns (see #2838, #980, #914) --- it's
unexpected that Gogs requires DNS configured (?) for avatars.

Avatar lookup is a niche feature that I don't believe should be enabled
by default given how prone it is to causing problems.
2018-03-29 05:48:53 -04:00
Unknwon ade8aab43f
locale: sync from Crowdin
Added Indonesian and Persian
2018-03-05 04:37:44 -05:00
Unknwon 51e0eef11e
locale: sync from Crowdin 2017-11-18 01:27:56 -05:00
Yen Chi Hsuan f1465b6847 locale: fix the language name for zh_TW (#4807) 2017-11-18 00:48:07 -05: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
Peter Mescalchin 21c1b8d834 conf: rename attachment toggle from ENABLE to ENABLED (#4474) 2017-06-03 03:02:55 -04:00
Unknwon 4cb01fe332
locale: add Hungarian 2017-06-01 23:41:58 -04:00
BartWillems 306ba917ea conf: made the default webhook timeout duration longer. (#4423)
A 5 seconds timeout is too low and can cause random timeouts in certain setups.
2017-05-29 23:27:02 -04:00
Unknwon a5bd095c30
locale: add en-GB 2017-05-25 12:53:28 -04:00