Skip to content

Commit

Permalink
fix(checkpatch): Assume bot defaults for some variables
Browse files Browse the repository at this point in the history
Signed-off-by: Cezar Craciunoiu <[email protected]>
  • Loading branch information
craciunoiuc committed Apr 29, 2024
1 parent c981383 commit 30192f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions cmd/governctl/pr/check/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
)

type Patch struct {
CommitterEmail string `long:"committer-email" short:"e" env:"GOVERN_COMMITTER_EMAIL" usage:"Set the Git committer author's email"`
CommiterGlobal bool `long:"committer-global" env:"GOVERN_COMMITTER_GLOBAL" usage:"Set the Git committer author's email/name globally"`
CommitterName string `long:"committer-name" short:"n" env:"GOVERN_COMMITTER_NAME" usage:"Set the Git committer author's name"`
CommitterEmail string `long:"committer-email" short:"e" env:"GOVERN_COMMITTER_EMAIL" usage:"Set the Git committer author's email" default:"[email protected]"`
CommiterGlobal bool `long:"committer-global" env:"GOVERN_COMMITTER_GLOBAL" usage:"Set the Git committer author's email/name globally" default:"true"`
CommitterName string `long:"committer-name" short:"n" env:"GOVERN_COMMITTER_NAME" usage:"Set the Git committer author's name" default:"Unikraft Bot"`
Output string `long:"output" short:"o" env:"GOVERN_OUTPUT" usage:"Set the output format of choice [table, html, json, yaml]" default:"table"`
CheckpatchScript string `long:"checkpatch-script" env:"GOVERN_CHECKPATCH_SCRIPT" usage:"Use an existing checkpatch.pl script"`
CheckpatchConf string `long:"checkpatch-conf" env:"GOVERN_CHECKPATCH_CONF" usage:"Use an existing checkpatch.conf file"`
Expand Down Expand Up @@ -68,9 +68,6 @@ func NewPatch() *cobra.Command {
func (opts *Patch) Run(ctx context.Context, args []string) error {
var extraIgnores []string

fmt.Printf("opts: %v\n", opts)
fmt.Printf("%d\n", len(opts.CommitterName))

ghOrg, ghRepo, ghPrId, err := cmdutils.ParseOrgRepoAndPullRequestArgs(args)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package config

type Config struct {
DryRun bool `long:"dry-run" short:"D" env:"GOVERN_DRY_RUN" usage:"Do not perform any actual change."`
GithubUser string `long:"github-user" env:"GOVERN_GITHUB_USER" usage:"GitHub User account name"`
GithubUser string `long:"github-user" env:"GOVERN_GITHUB_USER" usage:"GitHub User account name" default:"unikraft-bot"`
GithubToken string `long:"github-token" env:"GOVERN_GITHUB_TOKEN" usage:"GitHub API token"`
GithubEndpoint string `long:"github-endpoint" env:"GOVERN_GITHUB_ENDPOINT" short:"E" usage:"Alternative GitHub API endpoint (usually GitHub enterprise)"`
GithubSkipSSL bool `long:"github-skip-ssl" short:"S" env:"GOVERN_GITHUB_SKIP_SSL" usage:"Skip SSL check with GitHub API endpoint"`
Expand Down

0 comments on commit 30192f7

Please sign in to comment.