Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --github-badge flag to core options #502

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/app/options/core_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

type CoreOptions struct {
ReadOnlyMode bool
GithubBadge bool
}

func NewCoreOptions() *CoreOptions {
Expand All @@ -33,6 +34,7 @@ func (o *CoreOptions) Validate() []error {

func (o *CoreOptions) ApplyTo(config *registry.ExtraConfig) error {
config.ReadOnlyMode = o.ReadOnlyMode
config.GithubBadge = o.GithubBadge
return nil
}

Expand All @@ -43,4 +45,5 @@ func (o *CoreOptions) AddFlags(fs *pflag.FlagSet) {
}

fs.BoolVar(&o.ReadOnlyMode, "read-only-mode", false, "turn on the read only mode")
fs.BoolVar(&o.GithubBadge, "github-badge", false, "whether to display the github badge")
}
1 change: 1 addition & 0 deletions pkg/kubernetes/registry/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ type ExtraConfig struct {
ElasticSearchUsername string
ElasticSearchPassword string
ReadOnlyMode bool
GithubBadge bool
}
Loading