fix: ImageSummary should have author information (#976)

Signed-off-by: Ana-Roberta Lisca <ana.kagome@yahoo.com>
This commit is contained in:
Lisca Ana-Roberta
2022-11-11 01:02:17 +02:00
committed by GitHub
parent 97e7f7f756
commit 5eeba938ab
7 changed files with 247 additions and 1 deletions
+12
View File
@@ -205,6 +205,11 @@ func repoListWithNewestImage(
}
}
authors := annotations.Authors
if authors == "" {
authors = imageConfigInfo.Author
}
tag := manifestTag
size := strconv.Itoa(int(imageSize))
manifestDigest := manifest.Digest.String()
@@ -234,6 +239,7 @@ func repoListWithNewestImage(
MaxSeverity: &imageCveSummary.MaxSeverity,
Count: &imageCveSummary.Count,
},
Authors: &authors,
}
if manifest.Digest.String() == lastUpdatedTag.Digest.String() {
@@ -402,6 +408,11 @@ func globalSearch(repoList []string, name, tag string, olu common.OciLayoutUtils
}
}
authors := annotations.Authors
if authors == "" {
authors = imageConfigInfo.Author
}
imageSummary := gql_generated.ImageSummary{
RepoName: &repo,
Tag: &manifestTag,
@@ -423,6 +434,7 @@ func globalSearch(repoList []string, name, tag string, olu common.OciLayoutUtils
MaxSeverity: &imageCveSummary.MaxSeverity,
Count: &imageCveSummary.Count,
},
Authors: &authors,
}
if manifest.Digest.String() == lastUpdatedTag.Digest.String() {