mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 10:21:00 +00:00
Merge pull request #1833 from donny-dont/fix/secret_ordering
Fix ordering of secrets within merge
This commit is contained in:
commit
655cbf0f30
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
|
||||
)
|
||||
|
||||
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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue