1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

Merge pull request #1833 from donny-dont/fix/secret_ordering

Fix ordering of secrets within merge
This commit is contained in:
Brad Rydzewski 2016-10-25 00:36:19 +02:00 committed by GitHub
commit 655cbf0f30

View File

@ -271,13 +271,13 @@ func GetMergedSecretList(c context.Context, r *model.Repo) ([]*model.Secret, err
secrets []*model.Secret
)
repoSecs, err := GetSecretList(c, r)
globalSecs, err := GetGlobalSecretList(c)
if err != nil {
return nil, err
}
for _, secret := range repoSecs {
for _, secret := range globalSecs {
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())
}
globalSecs, err := GetGlobalSecretList(c)
repoSecs, err := GetSecretList(c, r)
if err != nil {
return nil, err
}
for _, secret := range globalSecs {
for _, secret := range repoSecs {
secrets = append(secrets, secret.Secret())
}