0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2025-01-14 05:55:38 +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 Fix rename branch 500 when the target branch is deleted but exist in database (#30430) 2024-04-12 13:11:16 +03:00
activity.go
attachment.go
blame.go Refactor file view & render (#30227) 2024-04-01 21:11:30 +08:00
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.go Put an edit file button on pull request files to allow a quick operation (#29697) 2024-03-27 02:34:10 +00:00
editor_test.go
find.go
fork.go
githttp.go
githttp_test.go
helper.go
helper_test.go
issue.go Rewrite and restyle reaction selector and enable no-sizzle eslint rule (#30453) 2024-04-14 18:44:11 +08:00
issue_content_history.go Migrate margin and padding helpers to tailwind (#30043) 2024-03-24 17:42:49 +01:00
issue_dependency.go
issue_label.go
issue_label_test.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
main_test.go
middlewares.go
migrate.go
milestone.go
packages.go
patch.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
projects_test.go
pull.go Put an edit file button on pull request files to allow a quick operation (#29697) 2024-03-27 02:34:10 +00:00
pull_review.go Prevent re-review and dismiss review actions on closed and merged PRs (#30065) 2024-03-28 15:19:24 +00:00
pull_review_test.go
recent_commits.go
release.go
release_test.go
render.go Refactor render (#30136) 2024-03-27 13:14:34 +00:00
repo.go
search.go Render embedded code preview by permlink in markdown (#30234) 2024-04-02 17:48:27 +00:00
topic.go
treelist.go
view.go Refactor file view & render (#30227) 2024-04-01 21:11:30 +08:00
view_test.go
wiki.go
wiki_test.go Use raw Wiki links for non-renderable Wiki files (#30273) 2024-04-10 17:49:57 +00:00