aboutsummaryrefslogtreecommitdiff
path: root/internal/route
Commit message (Collapse)AuthorAge
...
* http: fix non-sense `NotFound` call (#7003)Joe Chen2022-06-04
|
* webhook: revalidate local hostname before each delivery (#6988)Joe Chen2022-05-31
|
* webhook: add missing `%s` URL value for webhook description (#6478)Renzo Toma2022-04-04
| | | Co-authored-by: Joe Chen <jc@unknwon.io>
* conf: add allowlist for accessing local network (#6842)Joe Chen2022-03-14
|
* security: fix SSRF in repository migration (#6812)Michael Rowley2022-03-08
| | | Co-authored-by: Joe Chen <jc@unknwon.io>
* autofix: format code with gofumpt and gofmt (#6803)deepsource-autofix[bot]2022-03-06
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* autofix: fix unused method receiver (#6808)deepsource-autofix[bot]2022-03-06
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* autofix: function call can be replaced with helper function (#6805)deepsource-autofix[bot]2022-03-06
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* autofix: fix check for empty string (#6804)deepsource-autofix[bot]2022-03-06
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* autofix: types of function parameters can be combined (#6800)deepsource-autofix[bot]2022-03-06
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* autofix: unused parameter should be replaced by underscore (#6799)deepsource-autofix[bot]2022-03-06
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* chore: rename few consts to camel case (#6725)Joe Chen2022-01-13
|
* database: add PostgreSQL custom schema support (#6695)zvrh2022-01-05
| | | | | 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>
* api: support listing repository tags (#6656)Devops2021-12-14
| | | | Co-authored-by: zhouzhibo <zhouzhibo> Co-authored-by: Joe Chen <jc@unknwon.io>
* api: EditWiki implementation (#5860)Pavel M2021-11-10
| | | Co-authored-by: Joe Chen <jc@unknwon.io>
* api: add `GET /api/v1/{owner}/{repo}/commits` endpoint (#6574)Jordan Levin2021-09-24
| | | | | | | | | 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)`.
* ci: use new lint action and add custom config (#6562)ᴜɴᴋɴᴡᴏɴ2021-05-19
|
* chore: fix typos in code comments (#6556)Atin2021-05-19
|
* ssh: allow setting allowed MAC algorithms for built-in server (#6435)Eduardo Bacchi Kienetz2020-12-04
| | | Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
* db: migrate access table to use GORM (#6371)ᴜɴᴋɴᴡᴏɴ2020-10-06
|
* lfs: ask client to always send the same value for the HTTP header (#6369)ᴜɴᴋɴᴡᴏɴ2020-10-04
|
* Add git diff timeout in app config (#6348)Zhukov Roman2020-09-29
| | | Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
* auth: decouple types and functions from db (#6320)ᴜɴᴋɴᴡᴏɴ2020-09-20
|
* repo: support unlisted but publicly accessible repositories (#6176)Achilleas Koutsou2020-09-04
| | | Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
* install: remove MSSQL option (#6295)ᴜɴᴋɴᴡᴏɴ2020-08-29
|
* install: fix generating removed options (#6293)ᴜɴᴋɴᴡᴏɴ2020-08-29
|
* conf: remove legacy options (#6267)ᴜɴᴋɴᴡᴏɴ2020-08-22
| | | | | * conf: remove legacy options * Update tests
* organization: limit showing at most 12 members in profile page (#6254)ᴜɴᴋɴᴡᴏɴ2020-08-17
|
* lfs: show configs in admin ui (#6128)ᴜɴᴋɴᴡᴏɴ2020-04-21
| | | | | | | * Rename template consts * Display new DB options * Display LFS configs
* db: remove `db.User.LoginType` field (#6122)Kousik Mitra2020-04-19
|
* db: add tests for users (#6116)ᴜɴᴋɴᴡᴏɴ2020-04-18
| | | | | | | | | | | | | | | | | | | | | * 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
* db: add tests for repos (#6112)ᴜɴᴋɴᴡᴏɴ2020-04-17
| | | | | | | | | | | * 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
* api: add admin endpoint to get team members (#6101)Rui Santos2020-04-15
| | | fixes #5877
* db: add tests for two factors (#6099)ᴜɴᴋɴᴡᴏɴ2020-04-14
| | | | | | | | | | | | | | | * Rename to TwoFactors.Create * Use GORM to execute queries * TwoFactor.GetByUserID * Add tests * Fix failing tests * Add MD5 tests * Add tests for RandomChars
* login_source: migrate to GORM and add tests (#6090)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | | | | | | | | | | | | | * 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
* access_token: migrate to GORM and add tests (#6086)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | * access_token: migrate to GORM * Add tests * Fix tests * Fix test clock
* lfsutil: add `Storager` interface and local storage (#6083)ᴜɴᴋɴᴡᴏɴ2020-04-10
| | | | | | | | | | | * Add Storager interface * Add tests * Add back note * Add tests for basic protocol routes * Fix lint errors
* repo: disable public access option when using external wiki and issue ↵alpencrossi2020-04-09
| | | | tracker (#6081)
* route: bypass require signin check for trigger repo tasks (#6079)ᴜɴᴋɴᴡᴏɴ2020-04-08
| | | | | | | * route: bypass require signin check for trigger repo tasks * CHANGELOG * Fix lint errors
* lfs: add tests to batch endpoint (#6073)ᴜɴᴋɴᴡᴏɴ2020-04-06
|
* lfs: add unit test for middleware (#6070)ᴜɴᴋɴᴡᴏɴ2020-04-06
| | | | | | | | | | | * Add unit test for `authenticate` middleware * Add more cases * Add tests for verifyOID and internalServerError * Add tests for verifyHeader * Add tests for authroize
* route: no session for routes without UI (#6066)ᴜɴᴋɴᴡᴏɴ2020-04-05
| | | 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.
* lfs: support upload retry (#6061)ᴜɴᴋɴᴡᴏɴ2020-04-05
|
* lfs: run e2e and fix minor issues (#6059)ᴜɴᴋɴᴡᴏɴ2020-04-05
|
* lfs: implement HTTP routes (#6035)ᴜɴᴋɴᴡᴏɴ2020-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* template: better diff handling of rename and deleted files (#6048)ᴜɴᴋɴᴡᴏɴ2020-03-31
| | | | | * dep: bump github.com/gogs/git-module from 1.0.2 to 1.1.0 * template: better diff handling or rename and deleted files
* dep: bump github.com/gogs/git-module from 1.0.1 to 1.0.2 (#6030)ᴜɴᴋɴᴡᴏɴ2020-03-29
|
* api: support get releases endpoint (#6026)Philidor Green2020-03-28
|
* webhook: overhaul route handlers (#6002)ᴜɴᴋɴᴡᴏɴ2020-03-22
| | | | | | | | | | | | | | | * Overual route handlers and fixes #5366 * Merge routes for repo and org * Inject OrgRepoContext * DRY validateWebhook * DRY c.HasError * Add tests * Update CHANGELOG
* workflows: enable golangci-lint (#5998)ᴜɴᴋɴᴡᴏɴ2020-03-21
| | | | | | | | | | | | | * Create golint.yml * Update golint.yml * Update golint.yml * Fix errcheck * Fix gosimple * Fix staticcheck