File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ func FlattenReport(report *model.Report) *model.FlatReport {
18
18
changes = append (changes , change )
19
19
}
20
20
flatReport .Changes = changes
21
+
22
+ // Copy the Commit information from the report to the flatReport and then delete the changes
23
+ flatReport .Commit = & model.Commit {}
24
+ * flatReport .Commit = * report .Commit
25
+ flatReport .Commit .Changes = nil
26
+
21
27
return flatReport
22
28
}
23
29
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ type Report struct {
20
20
type FlatReport struct {
21
21
Summary map [string ]* reports.Changed `json:"reportSummary"`
22
22
Changes []* model.Change `json:"changes"`
23
+ Commit * Commit `gorm:"foreignKey:ID" json:"commitDetails"`
23
24
}
24
25
25
26
type FlatHistoricalReport struct {
You can’t perform that action at this time.
0 commit comments