75 Commits

Author SHA1 Message Date
dependabot[bot]
139ea3ce7d
mod: bump modernc.org/sqlite from 1.36.0 to 1.37.0 (#7947)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
2025-04-14 18:00:07 -04:00
宋子桓🌈
46a84fdad5
email: fix unable to override templates in custom directory (#7905)
Co-authored-by: Joe Chen <jc@unknwon.io>
2025-02-12 21:52:18 -05:00
Joe Chen
f1e64008fb
cmd: always build with "cert" subcommand (#7883) 2024-12-23 12:10:43 -05:00
idnandre
6cb018df2f
chore: remove duplicate error and fix typo error message (#7763) 2024-06-28 23:03:32 -04:00
Joe Chen
d9ecdcaef0
all: unwrap database.UsersStore interface (#7708) 2024-03-27 23:18:59 -04:00
Joe Chen
5cf0189df1
all: unwrap database.PermissionsStore interface (#7701) 2024-03-23 20:46:32 -04:00
Joe Chen
8054ffc12f
all: unwrap database.AccessTokensStore interface (#7670) 2024-02-20 21:47:32 -05:00
Joe Chen
3650b32ec5
chore: rename internal/db to internal/database (#7665) 2024-02-18 19:39:41 -05:00
Joe Chen
b34ee73497
feat(ssh): support dynamic list of algorithms (#7345) 2023-02-12 13:10:41 +08:00
Joe Chen
3a28168d41
fix(backup): skip "data" in the custom directory (#7343) 2023-02-12 00:14:51 +08:00
Joe Chen
133b9d9044
refactor(db): finish migrate methods off user.go (#7337) 2023-02-07 23:39:00 +08:00
Zachary Walters
5887bc116f
chore: remove usages of the deprecated ioutil (#7332)
Co-authored-by: Joe Chen <jc@unknwon.io>
2023-02-04 13:43:36 +08:00
Joe Chen
c53a1998c5
all: replace interface{} with any (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2023-02-02 21:25:25 +08:00
Joe Chen
614382fec0
refactor(db): migrate methods off user.go (#7329) 2023-02-02 21:14:27 +08:00
Joe Chen
5fb29db2db
refactor(db): migrate methods off and delete deprecated methods from user.go (#7231) 2022-11-05 23:33:05 +08:00
Joe Chen
b5d47b9692
refactor(db): migrate methods off user.go (#7230) 2022-11-05 18:56:48 +08:00
Joe Chen
ce25881c88
refactor(db): move some methods off user.go (#7199) 2022-10-22 20:01:38 +08:00
Joe Chen
7cbd84d5b3
refactor(db): rename User.Passwd to User.Password (#7196) 2022-10-22 14:56:25 +08:00
Joe Chen
c502dc6ed8
refactor(db): move some methods from user.go to users.go (#7195) 2022-10-22 14:41:40 +08:00
Joe Chen
50e5766867
build: remove support of Go 1.17 (#7177) 2022-10-09 23:12:03 +08:00
Joe Chen
75fbb82440
db: use context for backup and restore (#7044) 2022-06-11 11:10:25 +08:00
shlande
318fb25761
web: enable ETag to improve loading speed of static resources (#7035)
Co-authored-by: shlande <shlandeme@icloud.com>
2022-06-09 09:48:03 +08:00
Joe Chen
7229dd893f
db: use context and go-mockgen for PermsStore (#7033) 2022-06-08 19:26:20 +08:00
Joe Chen
04d3946511
web: print accessible URL on startup (#6979) 2022-05-29 19:45:40 +08:00
Joe Chen
cb35b73048
attachment: set CSP header in the serving endpoint (#6926) 2022-05-03 17:51:28 +08:00
4e4o
f2c3027f50
restore: fix incorrect existence checking of "repositories.zip" (#6914) 2022-04-27 10:32:13 +08:00
Joe Chen
f37cd9672c
restore: clean up leftover and invalid chars (#6875) 2022-03-26 15:10:39 +08:00
Michael Li
32c454ba5f
assets: convert usage of go-bindata to Go embed (#6851)
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-03-17 14:05:09 +08:00
deepsource-autofix[bot]
e452d94fc8
autofix: format code with gofumpt and gofmt (#6803)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 17:55:17 +08:00
deepsource-autofix[bot]
5afca6ca8e
autofix: function call can be replaced with helper function (#6805)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 16:33:55 +08:00
deepsource-autofix[bot]
deec3516d5
autofix: fix check for empty string (#6804)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 16:33:45 +08:00
deepsource-autofix[bot]
3acc13038d
autofix: unused parameter should be replaced by underscore (#6799)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 15:46:21 +08:00
Joe Chen
fa3d011415
chore: fix lint errors (#6620) 2021-09-24 00:44:09 +08:00
James-REANNZ
8f6757cc7b
web: correctly handle go-get pages for repository roots (#6598)
Fixes regression in go-get handling introduced in #6318.
2021-08-26 13:12:51 +08:00
Atin
d6987ee05b
chore: fix typos in code comments (#6556) 2021-05-19 13:12:09 +08:00
ᴜɴᴋɴᴡᴏɴ
2eaf1d693a
db: migrate access table to use GORM (#6371) 2020-10-06 15:43:28 +08:00
ᴜɴᴋɴᴡᴏɴ
7bc3ee49aa
cmd/serv: use different log files for ORMs in hook mode (#6361) 2020-09-29 22:26:07 +08:00
ᴜɴᴋɴᴡᴏɴ
594a2dc41f
web: correctly serving go-get pages for subdirs (#6318)
* web: correctly serving go-get page for subdirs

* Update CHANGELOG

* Fix golint error
2020-09-09 20:14:48 +08:00
ᴜɴᴋɴᴡᴏɴ
9fd4f5562d
all: use semver to compare versions (#6147) 2020-05-04 18:48:23 +08:00
ᴜɴᴋɴᴡᴏɴ
9bb218734c
db: use GORM to backup and restore non-legacy tables (#6142) 2020-05-04 16:25:57 +08:00
ᴜɴᴋɴᴡᴏɴ
e79aebb3e1
route: bypass require signin check for trigger repo tasks (#6079)
* route: bypass require signin check for trigger repo tasks

* CHANGELOG

* Fix lint errors
2020-04-08 20:55:15 +08:00
ᴜɴᴋɴᴡᴏɴ
07818d5fa5
route: no session for routes without UI (#6066)
Not all routes need session, register session and CSRF middleware as global is a waste of resource, and creating a lot one-time off yet never used session records.
2020-04-05 06:36:08 +08:00
ᴜɴᴋɴᴡᴏɴ
53b91ef306
lfs: run e2e and fix minor issues (#6059) 2020-04-05 00:14:22 +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
ᴜɴᴋɴᴡᴏɴ
af0cfe112b
web: rename CSRF header (#6027) 2020-03-28 19:17:15 +08:00
ᴜɴᴋɴᴡᴏɴ
14cd16f1f8
csrf: set cookie HttpOnly and Secure (#6013) 2020-03-27 00:08:46 +08:00
Philidor Green
87053c5369
cmd: backup support exclude mirror repositories (#6003)
* cmd: backup support exclude mirror repositories

* Apply suggestions from code review

Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-03-24 22:03:05 +08:00
ᴜɴᴋɴᴡᴏɴ
22717a1c06
webhook: overhaul route handlers (#6002)
* Overual route handlers and fixes #5366

* Merge routes for repo and org

* Inject OrgRepoContext

* DRY validateWebhook

* DRY c.HasError

* Add tests

* Update CHANGELOG
2020-03-22 22:07:22 +08:00
ᴜɴᴋɴᴡᴏɴ
82e511ddb1
cmd: init logging before SetEngine (#6001) 2020-03-22 14:11:52 +08:00
ᴜɴᴋɴᴡᴏɴ
5843038a08
workflows: enable golangci-lint (#5998)
* Create golint.yml

* Update golint.yml

* Update golint.yml

* Fix errcheck

* Fix gosimple

* Fix staticcheck
2020-03-21 13:39:32 +08:00