Commit Graph

17 Commits (main)

Author SHA1 Message Date
TheDarkUndoing 5483d97f73
gitutil: strip SSH port from submodule URL when rendering for HTML link (#7383)
Co-authored-by: Joe Chen <jc@unknwon.io>
2023-03-05 20:00:56 +08:00
Joe Chen 8350daf505
refactor(db): merge relation stores into entity stores (#7341) 2023-02-08 13:55:54 +08:00
Joe Chen 44333afd20
chore: consistently use `errors.Cause` for identifying error types (#7264) 2022-11-27 15:53:26 +08:00
dependabot[bot] 3c49a6173d
mod: bump github.com/gogs/git-module from 1.2.0 to 1.4.0 (#6866)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-03-22 00:55:36 +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
ᴜɴᴋɴᴡᴏɴ dda1092e74
gitutil: infer submodule with baseURL when it is a relative path (#6337) 2020-09-18 16:19:31 +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
ᴜɴᴋɴᴡᴏɴ 559af54e66
build: require Go 1.14 for using `t.Cleanup` (#6069) 2020-04-06 15:15:03 +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
ᴜɴᴋɴᴡᴏɴ 4cbb43b860
gitutil: simplify mock with `t.Cleanup` (#6033)
* gitutil: simplify mock with t.Cleanup

* Scope mock to tests only
2020-03-29 20:15:42 +08:00
ᴜɴᴋɴᴡᴏɴ 933206f1fe
gitutil: refactor the way to mock (#6032)
* Refactor the mock module store

* Only test on 1.14.x
2020-03-29 19:37:28 +08:00
ᴜɴᴋɴᴡᴏɴ a4de85dc80
util: add tests (#5989) 2020-03-16 01:54:08 +08:00
ᴜɴᴋɴᴡᴏɴ 9e9ca66467
refactor: unify error handling in routing layer 2020-03-16 01:22:27 +08:00
ᴜɴᴋɴᴡᴏɴ 880d0ec19f
api: overhaul `/repos/owner/repos/contents` (#5980)
* Fix import path renaming

* api: overhaul /repos/owner/repos/contents
2020-03-10 22:15:55 +08:00
ᴜɴᴋɴᴡᴏɴ e87f1107ca
commit: fix unexpected truncation in title
The commit message should not be treated as locale at all.
2020-03-09 02:08:53 +08:00
ᴜɴᴋɴᴡᴏɴ bebaf4c112
diff: remove misaligned space 2020-03-09 02:06:45 +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