0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-01 20:00:14 +01:00
gitea/routers/web/repo
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
..
actions
setting
activity.go
attachment.go
blame.go
branch.go
cherry_pick.go
code_frequency.go
commit.go
compare.go feat(api): implement branch/commit comparison API (#30349) 2024-04-16 11:45:04 +08:00
contributors.go
download.go
editor_test.go
editor.go
find.go
fork.go
githttp_test.go
githttp.go
helper_test.go
helper.go
issue_content_history.go
issue_dependency.go
issue_label_test.go
issue_label.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
issue.go Rewrite and restyle reaction selector and enable no-sizzle eslint rule (#30453) 2024-04-14 18:44:11 +08:00
main_test.go
middlewares.go
migrate.go
milestone.go
packages.go
patch.go
projects_test.go
projects.go Fix network error when open/close organization/individual projects and redirect to project page (#30387) 2024-04-13 16:17:01 +00:00
pull_review_test.go
pull_review.go
pull.go
recent_commits.go
release_test.go
release.go
render.go
repo.go
search.go
topic.go
treelist.go
view_test.go
view.go
wiki_test.go
wiki.go