Joe Chen
5e32058c13
db: use `context` and go-mockgen for `TwoFactorsStore` ( #7045 )
2022-06-11 11:54:11 +08:00
Joe Chen
f837ea6346
db: use `context` and go-mockgen for `UsersStore` ( #7042 )
2022-06-11 09:42:17 +08:00
Joe Chen
9776bdc9b8
db: use `context` and go-mockgen for login sources ( #7041 )
2022-06-10 19:54:36 +08:00
Joe Chen
94059f291d
db: use `context` and go-mockgen for `LFSStore` ( #7038 )
2022-06-10 11:27:06 +08:00
Joe Chen
7229dd893f
db: use `context` and go-mockgen for `PermsStore` ( #7033 )
2022-06-08 19:26:20 +08:00
Joe Chen
fe1d07f29c
db: rename `AccessTokensStore.Save` to `Touch` ( #7029 )
2022-06-08 13:34:10 +08:00
Joe Chen
9bf748b6c4
http: clean request path from Git endpoints ( #7022 )
2022-06-07 21:11:36 +08:00
Joe Chen
0a92ad27ef
db: use `context` and go-mockgen for `AccessTokensStore` ( #7013 )
2022-06-06 12:10:36 +08:00
E99p1ant
a328e7ccc4
access_token: encrypt access token with SHA256 ( #7008 )
...
* access_token: encrypt access token with SHA256
* revert list access token
* fix lint
* generate schemadoc
* add database migrations
* fix tests
* fix tests
* add test case for access token golden
* fix test in postgres
* `Sha256` -> `SHA256`
* Use GORM for migration
* task generate-schemadoc
* Use unique
* change migration name
* allow read
* task generate-schemadoc
* add changelog
* fix lint error
* update changelog
* remove Debug
* add comments
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-06-05 13:34:21 +08:00
Joe Chen
75e10445ca
http: fix non-sense `NotFound` call ( #7003 )
2022-06-04 10:44:54 +08:00
Joe Chen
7885f454a4
webhook: revalidate local hostname before each delivery ( #6988 )
2022-05-31 15:17:17 +08:00
Renzo Toma
efa572162f
webhook: add missing `%s` URL value for webhook description ( #6478 )
...
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-04-04 17:40:34 +08:00
Joe Chen
714383a063
conf: add allowlist for accessing local network ( #6842 )
2022-03-14 22:06:08 +08:00
Michael Rowley
242deca524
security: fix SSRF in repository migration ( #6812 )
...
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-03-08 11:34:53 +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]
09dbbf9a69
autofix: fix unused method receiver ( #6808 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 16:37:41 +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]
2d609b8b31
autofix: types of function parameters can be combined ( #6800 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 15:59: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
9ae80a6173
chore: rename few consts to camel case ( #6725 )
2022-01-13 11:27:16 +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
Devops
d60d9cf985
api: support listing repository tags ( #6656 )
...
Co-authored-by: zhouzhibo <zhouzhibo>
Co-authored-by: Joe Chen <jc@unknwon.io>
2021-12-14 20:41:12 +08:00
Pavel M
de3161155b
api: EditWiki implementation ( #5860 )
...
Co-authored-by: Joe Chen <jc@unknwon.io>
2021-11-10 13:29:27 +08:00
Jordan Levin
b9a3626cad
api: add `GET /api/v1/{owner}/{repo}/commits` endpoint ( #6574 )
...
This pull request targets issue #6573 .
It provides a new API endpoint: `/api/v1/repos/{org}/{repo}/commits?pageSize=<int>` with a default page size of 30 commits (the same as the UI).
This implementation currently only focuses on the main/master branch of the repository, and does not provide the ability to return commit history for other branches.
- Note: Since the logic for converting a git.Commit to api.Commit had to be used in `GetAllCommits` and `GetSingleCommit`, I decided to pull the code out into a helper function, ` gitCommitToAPICommit(commit, context)`.
2021-09-24 00:33:52 +08:00
ᴜɴᴋɴᴡᴏɴ
1a1a01a842
ci: use new lint action and add custom config ( #6562 )
2021-05-19 13:38:13 +08:00
Atin
d6987ee05b
chore: fix typos in code comments ( #6556 )
2021-05-19 13:12:09 +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
ᴜɴᴋɴᴡᴏɴ
2eaf1d693a
db: migrate access table to use GORM ( #6371 )
2020-10-06 15:43:28 +08:00
ᴜɴᴋɴᴡᴏɴ
ca3330cecd
lfs: ask client to always send the same value for the HTTP header ( #6369 )
2020-10-04 18:40:39 +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
ᴜɴᴋɴᴡᴏɴ
3af91d7cfd
auth: decouple types and functions from db ( #6320 )
2020-09-20 11:19:02 +08:00
Achilleas Koutsou
c4360747a3
repo: support unlisted but publicly accessible repositories ( #6176 )
...
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-09-04 03:04:22 +08:00
ᴜɴᴋɴᴡᴏɴ
cb88caa2d2
install: remove MSSQL option ( #6295 )
2020-08-29 14:49:54 +08:00
ᴜɴᴋɴᴡᴏɴ
a22fd01959
install: fix generating removed options ( #6293 )
2020-08-29 13:39:32 +08:00
ᴜɴᴋɴᴡᴏɴ
f0761eb7ec
conf: remove legacy options ( #6267 )
...
* conf: remove legacy options
* Update tests
2020-08-22 22:25:21 +08:00
ᴜɴᴋɴᴡᴏɴ
f3993b9cdb
organization: limit showing at most 12 members in profile page ( #6254 )
2020-08-17 21:09:22 +08:00
ᴜɴᴋɴᴡᴏɴ
4e1f38ce28
lfs: show configs in admin ui ( #6128 )
...
* Rename template consts
* Display new DB options
* Display LFS configs
2020-04-21 18:07:17 +08:00
Kousik Mitra
5a52ee75e3
db: remove `db.User.LoginType` field ( #6122 )
2020-04-19 04:32:53 +08:00
ᴜɴᴋɴᴡᴏɴ
9d64d222a8
db: add tests for users ( #6116 )
...
* Add new methods
* Use Users.Create to replace previous hack
* Reduce side effect
* Do not clear tables when test failed
* test_users_Authenticate
* Rename constant
* test_users_Create
* test_users_GetByEmail
* test_users_GetByID
* test_users_GetByUsername
2020-04-18 12:07:30 +08:00
ᴜɴᴋɴᴡᴏɴ
fa497b1633
db: add tests for repos ( #6112 )
...
* Add Repos.create method
* Fix repo name error handling
* Fix all compile errors
* Update github.com/go-macaron/captcha to fix http issue
* Add repos tests
2020-04-17 10:14:18 +08:00
Rui Santos
440b1ecbfd
api: add admin endpoint to get team members ( #6101 )
...
fixes #5877
2020-04-15 06:00:44 +08:00
ᴜɴᴋɴᴡᴏɴ
cb439a126a
db: add tests for two factors ( #6099 )
...
* Rename to TwoFactors.Create
* Use GORM to execute queries
* TwoFactor.GetByUserID
* Add tests
* Fix failing tests
* Add MD5 tests
* Add tests for RandomChars
2020-04-14 09:41:54 +08:00
ᴜɴᴋɴᴡᴏɴ
41f56ad05d
login_source: migrate to GORM and add tests ( #6090 )
...
* Use GORM in all write paths
* Migrate to GORM
* Fix lint errors
* Use GORM to init table
* dbutil: make writer detect error
* Add more tests
* Rename to clearTables
* db: finish adding tests
* osutil: add tests
* Fix load source files path
2020-04-11 20:18:05 +08:00
ᴜɴᴋɴᴡᴏɴ
62dda96159
access_token: migrate to GORM and add tests ( #6086 )
...
* access_token: migrate to GORM
* Add tests
* Fix tests
* Fix test clock
2020-04-11 01:25:19 +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
3e055e329c
repo: disable public access option when using external wiki and issue tracker ( #6081 )
2020-04-09 04:13:50 +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
ᴜɴᴋɴᴡᴏɴ
2b3655fa11
lfs: add tests to batch endpoint ( #6073 )
2020-04-06 23:53:55 +08:00
ᴜɴᴋɴᴡᴏɴ
ee0ea2c5fc
lfs: add unit test for middleware ( #6070 )
...
* Add unit test for `authenticate` middleware
* Add more cases
* Add tests for verifyOID and internalServerError
* Add tests for verifyHeader
* Add tests for authroize
2020-04-06 18:35:10 +08:00