Take into account legacy config

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2024-04-17 13:45:56 +00:00
parent 4610f83209
commit 257fb0b09a
2 changed files with 14 additions and 3 deletions

View file

@ -299,6 +299,13 @@ type Github struct {
App GithubApp `toml:"app" json:"app"`
}
func (g *Github) GetAuthType() GithubAuthType {
if g.AuthType == "" {
return GithubAuthTypePAT
}
return g.AuthType
}
func (g *Github) APIEndpoint() string {
if g.APIBaseURL != "" {
return g.APIBaseURL