Allow inserting env variables anywhere in the config

This commit is contained in:
Svilen Markov
2024-12-16 23:59:25 +00:00
parent 8d2639b349
commit dbcc13a5cf
13 changed files with 90 additions and 101 deletions

View File

@@ -20,8 +20,8 @@ type releasesWidget struct {
Releases appReleaseList `yaml:"-"`
releaseRequests []*releaseRequest `yaml:"-"`
Repositories []string `yaml:"repositories"`
Token optionalEnvField `yaml:"token"`
GitLabToken optionalEnvField `yaml:"gitlab-token"`
Token string `yaml:"token"`
GitLabToken string `yaml:"gitlab-token"`
Limit int `yaml:"limit"`
CollapseAfter int `yaml:"collapse-after"`
ShowSourceIcon bool `yaml:"show-source-icon"`
@@ -38,8 +38,8 @@ func (widget *releasesWidget) initialize() error {
widget.CollapseAfter = 5
}
var tokenAsString = widget.Token.String()
var gitLabTokenAsString = widget.GitLabToken.String()
var tokenAsString = widget.Token
var gitLabTokenAsString = widget.GitLabToken
for _, repository := range widget.Repositories {
parts := strings.SplitN(repository, ":", 2)