Added github branch fetching
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
)
|
||||
|
||||
type GlobalConfig struct {
|
||||
Token string `yaml:"token"`
|
||||
GithubPat string `yaml:"github_pat"`
|
||||
StoragePath string `yaml:"storage_path"`
|
||||
}
|
||||
@@ -20,6 +19,7 @@ type SiteConfig struct {
|
||||
Domain string `yaml:"domain"`
|
||||
SPA bool `yaml:"spa"`
|
||||
NotFoundFile string `yaml:"not_found_file"`
|
||||
DeployToken string `yaml:"deploy_token"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
@@ -37,9 +37,6 @@ func (c Error) Error() string {
|
||||
}
|
||||
|
||||
func validateConfig(config *Config) error {
|
||||
if config.Global.Token == "" {
|
||||
return &Error{Field: "global.token", Message: "Token is required"}
|
||||
}
|
||||
if config.Global.GithubPat == "" {
|
||||
return &Error{Field: "global.github_pat", Message: "GitHub PAT is required"}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user