Fix ordering of secrets within merge
This commit is contained in:
parent
58f84ced84
commit
d58fcc9372
1 changed files with 4 additions and 4 deletions
|
@ -271,13 +271,13 @@ func GetMergedSecretList(c context.Context, r *model.Repo) ([]*model.Secret, err
|
||||||
secrets []*model.Secret
|
secrets []*model.Secret
|
||||||
)
|
)
|
||||||
|
|
||||||
repoSecs, err := GetSecretList(c, r)
|
globalSecs, err := GetGlobalSecretList(c)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, secret := range repoSecs {
|
for _, secret := range globalSecs {
|
||||||
secrets = append(secrets, secret.Secret())
|
secrets = append(secrets, secret.Secret())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,13 +291,13 @@ func GetMergedSecretList(c context.Context, r *model.Repo) ([]*model.Secret, err
|
||||||
secrets = append(secrets, secret.Secret())
|
secrets = append(secrets, secret.Secret())
|
||||||
}
|
}
|
||||||
|
|
||||||
globalSecs, err := GetGlobalSecretList(c)
|
repoSecs, err := GetSecretList(c, r)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, secret := range globalSecs {
|
for _, secret := range repoSecs {
|
||||||
secrets = append(secrets, secret.Secret())
|
secrets = append(secrets, secret.Secret())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue