aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo
Commit message (Collapse)AuthorAge
* refactor(db): migrate methods off and delete deprecated methods from ↵Joe Chen2022-11-05
| | | | `user.go` (#7231)
* refactor(db): migrate methods off `user.go` (#7228)Joe Chen2022-11-05
|
* refactor(db): migrate methods off `user.go` and `org.go` (#7219) (#7227)Joe Chen2022-11-05
|
* refactor(db): migrate perms methods off `user.go` (#7207)Joe Chen2022-10-23
|
* refactor(db): migrate password methods off `user.go` (#7205)Joe Chen2022-10-23
|
* chore(db): remove unused field (#7202)Joe Chen2022-10-23
|
* refactor: replace `ioutil.ReadAll` with `io.ReadAll` (#7200)Joe Chen2022-10-22
|
* auth: enable authentication by token from password (#7198)Yang Liu2022-10-22
| | | Co-authored-by: Joe Chen <jc@unknwon.io>
* refactor(db): move some methods from `user.go` to `users.go` (#7195)Joe Chen2022-10-22
|
* refactor(db): move `User.HasForkedRepository` to `users.HasForkedRepository` ↵Joe Chen2022-10-09
| | | | | (#7176) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* db: refactor "action" table to use GORM (#7054)Joe Chen2022-06-25
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* db: use `context` and go-mockgen for `ReposStore` (#7046)Joe Chen2022-06-11
|
* db: use `context` and go-mockgen for `UsersStore` (#7042)Joe Chen2022-06-11
|
* db: use `context` and go-mockgen for `PermsStore` (#7033)Joe Chen2022-06-08
|
* db: rename `AccessTokensStore.Save` to `Touch` (#7029)Joe Chen2022-06-08
|
* http: clean request path from Git endpoints (#7022)Joe Chen2022-06-07
|
* db: use `context` and go-mockgen for `AccessTokensStore` (#7013)Joe Chen2022-06-06
|
* access_token: encrypt access token with SHA256 (#7008)E99p1ant2022-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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: 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
|
* ci: use new lint action and add custom config (#6562)ᴜɴᴋɴᴡᴏɴ2021-05-19
|
* chore: fix typos in code comments (#6556)Atin2021-05-19
|
* db: migrate access table to use GORM (#6371)ᴜɴᴋɴᴡᴏɴ2020-10-06
|
* 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>
* 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
* 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
* access_token: migrate to GORM and add tests (#6086)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | * access_token: migrate to GORM * Add tests * Fix tests * Fix test clock
* 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 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: 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
|
* 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
* refactor: unify error handling in routing layerᴜɴᴋɴᴡᴏɴ2020-03-16
|
* commit: fix unexpected truncation in titleᴜɴᴋɴᴡᴏɴ2020-03-09
| | | | The commit message should not be treated as locale at all.
* git: migrate to github.com/gogs/git-module@v1.0.0 (#5958)ᴜɴᴋɴᴡᴏɴ2020-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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