refactor(stacks): extract auto update logic [EE-4945] (#8545)
This commit is contained in:
13
api/git/credentials.go
Normal file
13
api/git/credentials.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
gittypes "github.com/portainer/portainer/api/git/types"
|
||||
)
|
||||
|
||||
func GetCredentials(auth *gittypes.GitAuthentication) (string, string, error) {
|
||||
if auth == nil {
|
||||
return "", "", nil
|
||||
}
|
||||
|
||||
return auth.Username, auth.Password, nil
|
||||
}
|
||||
Reference in New Issue
Block a user