1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-15 22:54:24 +00:00
gitea/routers/api/v1/swagger
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
..
action.go Add API for Variables (#29520) 2024-03-28 20:40:35 +00:00
activity.go Add activity feeds API (#23494) 2023-04-04 21:35:31 +08:00
activitypub.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
app.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
cron.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
key.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
misc.go Add API for Label templates (#24602) 2023-05-23 18:10:23 +08:00
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
notify.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
options.go Add API for Variables (#29520) 2024-03-28 20:40:35 +00:00
org.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
package.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo.go feat(api): implement branch/commit comparison API (#30349) 2024-04-16 11:45:04 +08:00
settings.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user.go Fix lint-swagger warning (#29787) 2024-03-14 04:59:52 +00:00