From 635a169eca350771b66068d4cc97b12c7a532243 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Sat, 20 Apr 2024 05:18:18 +0900 Subject: [PATCH 1/7] fix typos --- vendor/github.com/bitrise-io/envman/env/expand.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/github.com/bitrise-io/envman/env/expand.go b/vendor/github.com/bitrise-io/envman/env/expand.go index 03894e991..d8a76be32 100644 --- a/vendor/github.com/bitrise-io/envman/env/expand.go +++ b/vendor/github.com/bitrise-io/envman/env/expand.go @@ -14,7 +14,7 @@ type Action int const ( // InvalidAction represents an unexpected state InvalidAction Action = iota + 1 - // SetAction is an environment variable assignement, like os.Setenv + // SetAction is an environment variable assignment, like os.Setenv SetAction // UnsetAction is an action to clear (if existing) an environment variable, like os.Unsetenv UnsetAction @@ -22,7 +22,7 @@ const ( SkipAction ) -// Command describes an action performed on an envrionment variable +// Command describes an action performed on an environment variable type Command struct { Action Action Variable Variable @@ -125,7 +125,7 @@ func GetDeclarationsSideEffects(newEnvs []models.EnvironmentItemModel, envSource delete(evaluatedNewEnvs, command.Variable.Key) case SkipAction: default: - return DeclarationSideEffects{}, fmt.Errorf("invalid case for environement declaration action: %#v", command) + return DeclarationSideEffects{}, fmt.Errorf("invalid case for environment declaration action: %#v", command) } } @@ -136,7 +136,7 @@ func GetDeclarationsSideEffects(newEnvs []models.EnvironmentItemModel, envSource }, nil } -// getDeclarationCommand maps a variable to be daclered (env) to an expanded env key and value. +// getDeclarationCommand maps a variable to be declared (env) to an expanded env key and value. // The current process environment is not changed. func getDeclarationCommand(env models.EnvironmentItemModel, envs map[string]string) (Command, error) { envKey, envValue, err := env.GetKeyValuePair() From 9c8a65ccb8f76a0e3e7e1b97acd06a9660dc4126 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Sat, 20 Apr 2024 05:47:44 +0900 Subject: [PATCH 2/7] fix typos --- cli/analytics.go | 2 +- vendor/gopkg.in/yaml.v2/scannerc.go | 2 +- vendor/gopkg.in/yaml.v2/yamlh.go | 2 +- vendor/gopkg.in/yaml.v3/scannerc.go | 2 +- vendor/gopkg.in/yaml.v3/yaml.go | 2 +- vendor/gopkg.in/yaml.v3/yamlh.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/analytics.go b/cli/analytics.go index 281a4976a..2a85face2 100644 --- a/cli/analytics.go +++ b/cli/analytics.go @@ -14,7 +14,7 @@ func redactStepInputs(environment map[string]string, inputs []models.Environment redactedStepInputs := make(map[string]string) redactedOriginalInputs := map[string]string{} - // Filter inputs from enviroments + // Filter inputs from environments for _, input := range inputs { inputKey, originalValue, err := input.GetKeyValuePair() if err != nil { diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go index 0b9bb6030..cbdbf5195 100644 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ b/vendor/gopkg.in/yaml.v2/scannerc.go @@ -1240,7 +1240,7 @@ func yaml_parser_fetch_key(parser *yaml_parser_t) bool { // In the block context, additional checks are required. if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not nessesary simple). + // Check if we are allowed to start a new key (not necessary simple). if !parser.simple_key_allowed { return yaml_parser_set_scanner_error(parser, "", parser.mark, "mapping keys are not allowed in this context") diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go index f6a9c8e34..702840589 100644 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ b/vendor/gopkg.in/yaml.v2/yamlh.go @@ -714,7 +714,7 @@ type yaml_emitter_t struct { scalar_data struct { value []byte // The scalar value. multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? + flow_plain_allowed bool // Can the scalar be expressed in the flow plain style? block_plain_allowed bool // Can the scalar be expressed in the block plain style? single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? block_allowed bool // Can the scalar be expressed in the literal or folded styles? diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go index ca0070108..72486f39a 100644 --- a/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/vendor/gopkg.in/yaml.v3/scannerc.go @@ -1332,7 +1332,7 @@ func yaml_parser_fetch_key(parser *yaml_parser_t) bool { // In the block context, additional checks are required. if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not nessesary simple). + // Check if we are allowed to start a new key (not necessary simple). if !parser.simple_key_allowed { return yaml_parser_set_scanner_error(parser, "", parser.mark, "mapping keys are not allowed in this context") diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go index 8cec6da48..b3cf0f437 100644 --- a/vendor/gopkg.in/yaml.v3/yaml.go +++ b/vendor/gopkg.in/yaml.v3/yaml.go @@ -387,7 +387,7 @@ type Node struct { // the implicit tag diverges from the provided one. Tag string - // Value holds the unescaped and unquoted represenation of the value. + // Value holds the unescaped and unquoted representation of the value. Value string // Anchor holds the anchor name for this node, which allows aliases to point to it. diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go index 7c6d00770..b9a9e55d8 100644 --- a/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/vendor/gopkg.in/yaml.v3/yamlh.go @@ -774,7 +774,7 @@ type yaml_emitter_t struct { scalar_data struct { value []byte // The scalar value. multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? + flow_plain_allowed bool // Can the scalar be expressed in the flow plain style? block_plain_allowed bool // Can the scalar be expressed in the block plain style? single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? block_allowed bool // Can the scalar be expressed in the literal or folded styles? From ebe9cae80b6a9882e6169309c59548eec7761ad8 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Tue, 7 May 2024 01:51:30 +0900 Subject: [PATCH 3/7] Revert "fix typos" This reverts commit 9c8a65ccb8f76a0e3e7e1b97acd06a9660dc4126. --- cli/analytics.go | 2 +- vendor/gopkg.in/yaml.v2/scannerc.go | 2 +- vendor/gopkg.in/yaml.v2/yamlh.go | 2 +- vendor/gopkg.in/yaml.v3/scannerc.go | 2 +- vendor/gopkg.in/yaml.v3/yaml.go | 2 +- vendor/gopkg.in/yaml.v3/yamlh.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/analytics.go b/cli/analytics.go index 2a85face2..281a4976a 100644 --- a/cli/analytics.go +++ b/cli/analytics.go @@ -14,7 +14,7 @@ func redactStepInputs(environment map[string]string, inputs []models.Environment redactedStepInputs := make(map[string]string) redactedOriginalInputs := map[string]string{} - // Filter inputs from environments + // Filter inputs from enviroments for _, input := range inputs { inputKey, originalValue, err := input.GetKeyValuePair() if err != nil { diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go index cbdbf5195..0b9bb6030 100644 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ b/vendor/gopkg.in/yaml.v2/scannerc.go @@ -1240,7 +1240,7 @@ func yaml_parser_fetch_key(parser *yaml_parser_t) bool { // In the block context, additional checks are required. if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not necessary simple). + // Check if we are allowed to start a new key (not nessesary simple). if !parser.simple_key_allowed { return yaml_parser_set_scanner_error(parser, "", parser.mark, "mapping keys are not allowed in this context") diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go index 702840589..f6a9c8e34 100644 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ b/vendor/gopkg.in/yaml.v2/yamlh.go @@ -714,7 +714,7 @@ type yaml_emitter_t struct { scalar_data struct { value []byte // The scalar value. multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expressed in the flow plain style? + flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? block_plain_allowed bool // Can the scalar be expressed in the block plain style? single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? block_allowed bool // Can the scalar be expressed in the literal or folded styles? diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go index 72486f39a..ca0070108 100644 --- a/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/vendor/gopkg.in/yaml.v3/scannerc.go @@ -1332,7 +1332,7 @@ func yaml_parser_fetch_key(parser *yaml_parser_t) bool { // In the block context, additional checks are required. if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not necessary simple). + // Check if we are allowed to start a new key (not nessesary simple). if !parser.simple_key_allowed { return yaml_parser_set_scanner_error(parser, "", parser.mark, "mapping keys are not allowed in this context") diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go index b3cf0f437..8cec6da48 100644 --- a/vendor/gopkg.in/yaml.v3/yaml.go +++ b/vendor/gopkg.in/yaml.v3/yaml.go @@ -387,7 +387,7 @@ type Node struct { // the implicit tag diverges from the provided one. Tag string - // Value holds the unescaped and unquoted representation of the value. + // Value holds the unescaped and unquoted represenation of the value. Value string // Anchor holds the anchor name for this node, which allows aliases to point to it. diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go index b9a9e55d8..7c6d00770 100644 --- a/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/vendor/gopkg.in/yaml.v3/yamlh.go @@ -774,7 +774,7 @@ type yaml_emitter_t struct { scalar_data struct { value []byte // The scalar value. multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expressed in the flow plain style? + flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? block_plain_allowed bool // Can the scalar be expressed in the block plain style? single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? block_allowed bool // Can the scalar be expressed in the literal or folded styles? From eef5572a550e689e662b9460828b0a2c99ce00f5 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Tue, 7 May 2024 01:51:45 +0900 Subject: [PATCH 4/7] Revert "fix typos" This reverts commit 635a169eca350771b66068d4cc97b12c7a532243. --- vendor/github.com/bitrise-io/envman/env/expand.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/github.com/bitrise-io/envman/env/expand.go b/vendor/github.com/bitrise-io/envman/env/expand.go index d8a76be32..03894e991 100644 --- a/vendor/github.com/bitrise-io/envman/env/expand.go +++ b/vendor/github.com/bitrise-io/envman/env/expand.go @@ -14,7 +14,7 @@ type Action int const ( // InvalidAction represents an unexpected state InvalidAction Action = iota + 1 - // SetAction is an environment variable assignment, like os.Setenv + // SetAction is an environment variable assignement, like os.Setenv SetAction // UnsetAction is an action to clear (if existing) an environment variable, like os.Unsetenv UnsetAction @@ -22,7 +22,7 @@ const ( SkipAction ) -// Command describes an action performed on an environment variable +// Command describes an action performed on an envrionment variable type Command struct { Action Action Variable Variable @@ -125,7 +125,7 @@ func GetDeclarationsSideEffects(newEnvs []models.EnvironmentItemModel, envSource delete(evaluatedNewEnvs, command.Variable.Key) case SkipAction: default: - return DeclarationSideEffects{}, fmt.Errorf("invalid case for environment declaration action: %#v", command) + return DeclarationSideEffects{}, fmt.Errorf("invalid case for environement declaration action: %#v", command) } } @@ -136,7 +136,7 @@ func GetDeclarationsSideEffects(newEnvs []models.EnvironmentItemModel, envSource }, nil } -// getDeclarationCommand maps a variable to be declared (env) to an expanded env key and value. +// getDeclarationCommand maps a variable to be daclered (env) to an expanded env key and value. // The current process environment is not changed. func getDeclarationCommand(env models.EnvironmentItemModel, envs map[string]string) (Command, error) { envKey, envValue, err := env.GetKeyValuePair() From 8f4314762df2ce05bc9bd464dc8cf28c034746d2 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Tue, 7 May 2024 01:58:08 +0900 Subject: [PATCH 5/7] fix typo --- cli/analytics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/analytics.go b/cli/analytics.go index 281a4976a..2a85face2 100644 --- a/cli/analytics.go +++ b/cli/analytics.go @@ -14,7 +14,7 @@ func redactStepInputs(environment map[string]string, inputs []models.Environment redactedStepInputs := make(map[string]string) redactedOriginalInputs := map[string]string{} - // Filter inputs from enviroments + // Filter inputs from environments for _, input := range inputs { inputKey, originalValue, err := input.GetKeyValuePair() if err != nil { From 81b25b1b2eb7d72eef5f70b5906777b12c371196 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Tue, 7 May 2024 03:16:29 +0900 Subject: [PATCH 6/7] fix typo timeout --- cli/run.go | 2 +- cli/run_config.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/run.go b/cli/run.go index 3b2b57aec..f3b5fab64 100644 --- a/cli/run.go +++ b/cli/run.go @@ -430,7 +430,7 @@ func processArgs(c *cli.Context) (*RunConfig, error) { return nil, fmt.Errorf("failed to check Secret Envs Filtering mode: %s", err) } - noOutputTimeout := readNoOutputTimoutConfiguration(inventoryEnvironments) + noOutputTimeout := readNoOutputTimeoutConfiguration(inventoryEnvironments) return &RunConfig{ Modes: models.WorkflowRunModes{ diff --git a/cli/run_config.go b/cli/run_config.go index 461f56daa..bf0f8078e 100644 --- a/cli/run_config.go +++ b/cli/run_config.go @@ -10,7 +10,7 @@ import ( envmanModels "github.com/bitrise-io/envman/models" ) -func getNoOutputTimoutValue(inventoryEnvironments []envmanModels.EnvironmentItemModel) (string, error) { +func getNoOutputTimeoutValue(inventoryEnvironments []envmanModels.EnvironmentItemModel) (string, error) { for _, env := range inventoryEnvironments { key, value, err := env.GetKeyValuePair() if err != nil { @@ -25,9 +25,9 @@ func getNoOutputTimoutValue(inventoryEnvironments []envmanModels.EnvironmentItem return os.Getenv(configs.NoOutputTimeoutEnvKey), nil } -func readNoOutputTimoutConfiguration(inventoryEnvironments []envmanModels.EnvironmentItemModel) time.Duration { +func readNoOutputTimeoutConfiguration(inventoryEnvironments []envmanModels.EnvironmentItemModel) time.Duration { const defaultTimeout = -1 - envVal, err := getNoOutputTimoutValue(inventoryEnvironments) + envVal, err := getNoOutputTimeoutValue(inventoryEnvironments) if err != nil { log.Errorf("Failed to read value of %s: %s", configs.NoOutputTimeoutEnvKey, err) return defaultTimeout From 4ee8b03e722cfde11ea87d4b1c6fc1b6320d4c86 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Tue, 7 May 2024 03:18:33 +0900 Subject: [PATCH 7/7] fix typo output --- cli/commands.go | 4 ++-- cli/flags.go | 10 +++++----- cli/run_trigger_params_test.go | 8 ++++---- cli/trigger_check.go | 2 +- cli/validate.go | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cli/commands.go b/cli/commands.go index 00a46a9ae..cd3c3d285 100644 --- a/cli/commands.go +++ b/cli/commands.go @@ -17,7 +17,7 @@ const ( ConfigKey = "config" InventoryKey = "inventory" - OuputFormatKey = "format" + OutputFormatKey = "format" ) var ( @@ -63,7 +63,7 @@ var ( cli.StringFlag{Name: PRReadyStateKey, Usage: "Git pull request ready state. Options: ready_for_review draft converted_to_ready_for_review"}, cli.StringFlag{Name: TagKey, Usage: "Git tag name."}, - cli.StringFlag{Name: OuputFormatKey, Usage: "Output format. Accepted: json, yml."}, + cli.StringFlag{Name: OutputFormatKey, Usage: "Output format. Accepted: json, yml."}, // cli params used in CI mode cli.StringFlag{Name: JSONParamsKey, Usage: "Specify command flags with json string-string hash."}, diff --git a/cli/flags.go b/cli/flags.go index 124dd69ad..088138a2c 100644 --- a/cli/flags.go +++ b/cli/flags.go @@ -31,8 +31,8 @@ const ( MinimalModeKey = "minimal" FullModeKey = "full" - ouputFormatKeyShort = "f" - OuputPathKey = "outpath" + outputFormatKeyShort = "f" + OutputPathKey = "outpath" PrettyFormatKey = "pretty" IDKey = "id" @@ -72,7 +72,7 @@ var ( } // Command flags flOutputFormat = cli.StringFlag{ - Name: OuputFormatKey + ", " + ouputFormatKeyShort, + Name: OutputFormatKey + ", " + outputFormatKeyShort, Usage: "Output format. Accepted: raw (default), json, yml", } flCollection = cli.StringFlag{ @@ -99,11 +99,11 @@ var ( // Export flFormat = cli.StringFlag{ - Name: OuputFormatKey, + Name: OutputFormatKey, Usage: "Output format. Accepted: json, yml.", } flOutputPath = cli.StringFlag{ - Name: OuputPathKey, + Name: OutputPathKey, Usage: "Output path, where the exported file will be saved.", } flPretty = cli.BoolFlag{ diff --git a/cli/run_trigger_params_test.go b/cli/run_trigger_params_test.go index 91e3fd8e6..efe64b9d0 100644 --- a/cli/run_trigger_params_test.go +++ b/cli/run_trigger_params_test.go @@ -33,7 +33,7 @@ func TestParseRunAndTriggerJSONParams(t *testing.T) { PRReadyStateKey: models.PullRequestReadyStateReadyForReview, TagKey: "0.9.0", - OuputFormatKey: "json", + OutputFormatKey: "json", ConfigKey: "bitrise.yml", ConfigBase64Key: toBase64("bitrise.yml"), @@ -163,7 +163,7 @@ func TestParseRunAndTriggerParams(t *testing.T) { PRTargetBranchKey: prTargetBranch, PRReadyStateKey: prReadyState, TagKey: tag, - OuputFormatKey: format, + OutputFormatKey: format, ConfigKey: bitriseConfigPath, ConfigBase64Key: bitriseConfigBase64Data, @@ -223,7 +223,7 @@ func TestParseRunAndTriggerParams(t *testing.T) { PRTargetBranchKey: prTargetBranch, PRReadyStateKey: prReadyState, TagKey: tag, - OuputFormatKey: format, + OutputFormatKey: format, ConfigKey: bitriseConfigPath, ConfigBase64Key: bitriseConfigBase64Data, @@ -283,7 +283,7 @@ func TestParseRunAndTriggerParams(t *testing.T) { PRTargetBranchKey: prTargetBranch, PRReadyStateKey: prReadyState, TagKey: tag, - OuputFormatKey: format, + OutputFormatKey: format, ConfigKey: bitriseConfigPath, ConfigBase64Key: bitriseConfigBase64Data, diff --git a/cli/trigger_check.go b/cli/trigger_check.go index b456260d2..8bb5ccc17 100644 --- a/cli/trigger_check.go +++ b/cli/trigger_check.go @@ -102,7 +102,7 @@ func triggerCheck(c *cli.Context) error { jsonParams := c.String(JSONParamsKey) jsonParamsBase64 := c.String(JSONParamsBase64Key) - format := c.String(OuputFormatKey) + format := c.String(OutputFormatKey) triggerParams, err := parseTriggerCheckParams( triggerPattern, diff --git a/cli/validate.go b/cli/validate.go index 7c1624085..695e019ce 100644 --- a/cli/validate.go +++ b/cli/validate.go @@ -225,7 +225,7 @@ func validate(c *cli.Context) error { inventoryBase64Data := c.String(InventoryBase64Key) inventoryPath := c.String(InventoryKey) - format := c.String(OuputFormatKey) + format := c.String(OutputFormatKey) if format == "" { format = output.FormatRaw }