summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAngel Nunez Mencias <git@angelnu.com>2025-01-05 03:32:46 +0100
committerGusted <gusted@noreply.codeberg.org>2025-01-05 03:32:46 +0100
commita2eb249766fbd69f49f85759b08066b977ce3bb7 (patch)
tree13ff6b6d5d45e0787ba66e81131488219370596f /modules
parentfix(ui): show oauth divider on signup page (#6463) (diff)
downloadforgejo-a2eb249766fbd69f49f85759b08066b977ce3bb7.tar.xz
forgejo-a2eb249766fbd69f49f85759b08066b977ce3bb7.zip
feat: add files to compare (#6461)
Add the changed files between two commits to the response of the compare API, part of forgejo/forgejo#6460 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6461 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Angel Nunez Mencias <git@angelnu.com> Co-committed-by: Angel Nunez Mencias <git@angelnu.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/structs/repo_compare.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/structs/repo_compare.go b/modules/structs/repo_compare.go
index 8a12498705..6e77a813d3 100644
--- a/modules/structs/repo_compare.go
+++ b/modules/structs/repo_compare.go
@@ -5,6 +5,7 @@ package structs
// Compare represents a comparison between two commits.
type Compare struct {
- TotalCommits int `json:"total_commits"` // Total number of commits in the comparison.
- Commits []*Commit `json:"commits"` // List of commits in the comparison.
+ TotalCommits int `json:"total_commits"` // Total number of commits in the comparison.
+ Commits []*Commit `json:"commits"` // List of commits in the comparison.
+ Files []*CommitAffectedFiles `json:"files"` // Total files modified in this comparison.
}