mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-03-13 23:00:35 +00:00
feat: simplify theme management (#136)
This commit is contained in:
@@ -25,9 +25,10 @@ type AppConfig struct {
|
||||
GitHubToken string `mapstructure:"github_token" yaml:"github_token,omitempty"` // Only in global config
|
||||
|
||||
// Repository Information (auto-detected, overridable)
|
||||
Organization string `mapstructure:"organization" yaml:"organization,omitempty"`
|
||||
Repository string `mapstructure:"repository" yaml:"repository,omitempty"`
|
||||
Version string `mapstructure:"version" yaml:"version,omitempty"`
|
||||
Organization string `mapstructure:"organization" yaml:"organization,omitempty"`
|
||||
Repository string `mapstructure:"repository" yaml:"repository,omitempty"`
|
||||
Version string `mapstructure:"version" yaml:"version,omitempty"`
|
||||
UseDefaultBranch bool `mapstructure:"use_default_branch" yaml:"use_default_branch"`
|
||||
|
||||
// Template Settings
|
||||
Theme string `mapstructure:"theme" yaml:"theme"`
|
||||
@@ -214,9 +215,10 @@ func resolveThemeTemplate(theme string) string {
|
||||
func DefaultAppConfig() *AppConfig {
|
||||
return &AppConfig{
|
||||
// Repository Information (will be auto-detected)
|
||||
Organization: "",
|
||||
Repository: "",
|
||||
Version: "",
|
||||
Organization: "",
|
||||
Repository: "",
|
||||
Version: "",
|
||||
UseDefaultBranch: true, // Use detected default branch (main/master) in usage examples
|
||||
|
||||
// Template Settings
|
||||
Theme: "default", // default, github, gitlab, minimal, professional
|
||||
@@ -340,6 +342,9 @@ func mergeBooleanFields(dst *AppConfig, src *AppConfig) {
|
||||
if src.Quiet {
|
||||
dst.Quiet = src.Quiet
|
||||
}
|
||||
if src.UseDefaultBranch {
|
||||
dst.UseDefaultBranch = src.UseDefaultBranch
|
||||
}
|
||||
}
|
||||
|
||||
// mergeSecurityFields merges security-sensitive fields if allowed.
|
||||
|
||||
Reference in New Issue
Block a user