mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 01:24:10 +01:00
e025ec0131
- 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> (cherry picked from commit c70e442ce4b99e2a1f1bf216afcfa1ad78d1925a) Conflicts: - routers/api/v1/swagger/repo.go Conflict resolved by manually adding the lines from the Gitea PR. |
||
---|---|---|
.. | ||
activity.go | ||
activitypub.go | ||
admin_user.go | ||
attachment.go | ||
commit_status.go | ||
commit_status_test.go | ||
cron.go | ||
doc.go | ||
fork.go | ||
git_blob.go | ||
git_hook.go | ||
hook.go | ||
issue.go | ||
issue_comment.go | ||
issue_label.go | ||
issue_milestone.go | ||
issue_reaction.go | ||
issue_stopwatch.go | ||
issue_test.go | ||
issue_tracked_time.go | ||
lfs_lock.go | ||
mirror.go | ||
miscellaneous.go | ||
moderation.go | ||
nodeinfo.go | ||
notifications.go | ||
org.go | ||
org_member.go | ||
org_team.go | ||
package.go | ||
pull.go | ||
pull_review.go | ||
release.go | ||
repo.go | ||
repo_branch.go | ||
repo_collaborator.go | ||
repo_commit.go | ||
repo_compare.go | ||
repo_file.go | ||
repo_flags.go | ||
repo_key.go | ||
repo_note.go | ||
repo_refs.go | ||
repo_tag.go | ||
repo_topic.go | ||
repo_tree.go | ||
repo_watch.go | ||
repo_wiki.go | ||
secret.go | ||
settings.go | ||
status.go | ||
task.go | ||
user.go | ||
user_app.go | ||
user_email.go | ||
user_gpgkey.go | ||
user_key.go | ||
variable.go | ||
visible_type.go |