gitea/routers/api/v1
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>
2024-04-16 11:45:04 +08:00
..
activitypub Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
admin Add a warning for disallowed email domains (#29658) 2024-03-11 06:07:36 +00:00
misc Refactor cache and disable go-chi cache (#30417) 2024-04-13 08:38:44 +00:00
notify Clean up log messages (#30313) 2024-04-07 19:17:06 +08:00
org Add API for Variables (#29520) 2024-03-28 20:40:35 +00:00
packages remove util.OptionalBool and related functions (#29513) 2024-03-02 16:42:31 +01:00
repo feat(api): implement branch/commit comparison API (#30349) 2024-04-16 11:45:04 +08:00
settings Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
shared Add user blocking (#29028) 2024-03-04 08:16:03 +00:00
swagger feat(api): implement branch/commit comparison API (#30349) 2024-04-16 11:45:04 +08:00
user Add setting to disable user features when user login type is not plain (#29615) 2024-03-29 16:05:41 +01:00
utils Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
api.go feat(api): implement branch/commit comparison API (#30349) 2024-04-16 11:45:04 +08:00