Fix official badge
This commit is contained in:
Родитель
f16efa4809
Коммит
ba294b2805
|
@ -246,8 +246,8 @@ func ForBaseImageInGraphQL(cfg *v1.ConfigFile, excludeSelf bool) (*types.BaseIma
|
|||
for ii, _ := range q.ImagesByDiffIds {
|
||||
for bi, _ := range q.ImagesByDiffIds[ii].Images {
|
||||
count++
|
||||
if q.ImagesByDiffIds[ii].Images[bi].Repository.Badge == "" && q.ImagesByDiffIds[ii].Images[bi].Repository.Host == "hub.docker.com" && strings.Index(q.ImagesByDiffIds[ii].Images[bi].Repository.Repo, "/") < 0 {
|
||||
q.ImagesByDiffIds[ii].Images[bi].Repository.Badge = "OFFICIAL_IMAGE"
|
||||
if q.ImagesByDiffIds[ii].Images[bi].Repository.Host == "hub.docker.com" && strings.Index(q.ImagesByDiffIds[ii].Images[bi].Repository.Repo, "/") < 0 {
|
||||
q.ImagesByDiffIds[ii].Images[bi].Repository.Badge = "OFFICIAL"
|
||||
}
|
||||
if q.ImagesByDiffIds[ii].Images[bi].Repository.Badge != "" {
|
||||
q.ImagesByDiffIds[ii].Images[bi].Repository.Badge = strings.ToLower(q.ImagesByDiffIds[ii].Images[bi].Repository.Badge)
|
||||
|
|
Загрузка…
Ссылка в новой задаче