You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/common
Bo-Yi Wu c70e442ce4
feat(api): implement branch/commit comparison API (#30349)
- Add new `Compare` struct to represent comparison between two commits
- Introduce new API endpoint `/compare/*` to get commit comparison
information
- Create new file `repo_compare.go` with the `Compare` struct definition
- Add new file `compare.go` in `routers/api/v1/repo` to handle
comparison logic
- Add new file `compare.go` in `routers/common` to define `CompareInfo`
struct
- Refactor `ParseCompareInfo` function to use `common.CompareInfo`
struct
- Update Swagger documentation to include the new API endpoint for
commit comparison
- Remove duplicate `CompareInfo` struct from
`routers/web/repo/compare.go`
- Adjust base path in Swagger template to be relative (`/api/v1`)

GitHub API
https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#compare-two-commits

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
10 months ago
..
auth.go Move context from modules to services (#29440) 11 months ago
compare.go feat(api): implement branch/commit comparison API (#30349) 10 months ago
db.go Avoid cycle-redirecting user/login page (#28636) 1 year ago
errpage.go Move context from modules to services (#29440) 11 months ago
errpage_test.go
markup.go Use relative links for commits, mentions, and issues in markdown (#29427) 11 months ago
middleware.go Fix incorrect cookie path for AppSubURL (#29534) 11 months ago
middleware_test.go
redirect.go Refactor URL detection (#29960) 11 months ago
serve.go Move context from modules to services (#29440) 11 months ago