From 591931a81cf2f422e7cee6ec780fc5f27a672800 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 28 Dec 2024 17:50:53 -0500 Subject: [PATCH] chore: fix typos (#5202) Signed-off-by: Rui Chen --- CHANGELOG.md | 4 ++-- ...-over-ssl-with-s3-acm-cloudfront-and-terraform.md | 2 +- runatlantis.io/docs/custom-workflows.md | 4 ++-- runatlantis.io/docs/post-workflow-hooks.md | 2 +- runatlantis.io/docs/pre-workflow-hooks.md | 2 +- runatlantis.io/docs/repo-and-project-permissions.md | 2 +- runatlantis.io/docs/repo-level-atlantis-yaml.md | 2 +- runatlantis.io/docs/server-configuration.md | 6 +++--- .../controllers/events/events_controller_e2e_test.go | 4 ++-- server/core/config/raw/global_cfg.go | 4 ++-- server/core/config/raw/repo_cfg.go | 2 +- server/core/config/raw/step_test.go | 2 +- server/core/config/raw/workflow_step_test.go | 2 +- server/core/config/valid/global_cfg.go | 4 ++-- server/core/locking/apply_locking.go | 4 ++-- server/core/runtime/plan_step_runner.go | 2 +- .../core/runtime/post_workflow_hook_runner_test.go | 4 ++-- server/core/runtime/pre_workflow_hook_runner_test.go | 4 ++-- server/core/terraform/terraform_client_test.go | 8 ++++---- server/events/markdown_renderer.go | 2 +- server/events/models/models.go | 2 +- server/events/project_command_builder.go | 4 ++-- server/events/project_command_runner.go | 2 +- server/events/project_command_runner_test.go | 2 +- server/events/vcs/git_cred_writer_test.go | 12 ++++++------ server/events/vcs/github_client_test.go | 6 +++--- 26 files changed, 47 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59a28de5f6..8a5e761104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -200,7 +200,7 @@ Maintenance release for security patches with atlantis-base image * docker: bump git-lfs and gosu dependencies by @hi-artem in https://github.com/runatlantis/atlantis/pull/2096 * fix(docker): fix base image for multi-platform build by @Tenzer in https://github.com/runatlantis/atlantis/pull/2099 * fix(docker): fix installation of git-lfs in armv7 image by @Tenzer in https://github.com/runatlantis/atlantis/pull/2100 -* fix(docker): download Terraform and conftest versions maching image architecture by @Tenzer in https://github.com/runatlantis/atlantis/pull/2101 +* fix(docker): download Terraform and conftest versions matching image architecture by @Tenzer in https://github.com/runatlantis/atlantis/pull/2101 # v0.18.3 @@ -237,7 +237,7 @@ Maintenance release for security patches with atlantis-base image * build(deps): bump github.com/hashicorp/go-version from 1.3.0 to 1.4.0 by @dependabot in https://github.com/runatlantis/atlantis/pull/1987 * build(deps): bump go.uber.org/zap from 1.19.1 to 1.20.0 by @dependabot in https://github.com/runatlantis/atlantis/pull/1988 * docs: document `undiverged` apply requirement in more places by @fishpen0 in https://github.com/runatlantis/atlantis/pull/1992 -* fix: fix autoplan when .terraform.lock.hcl is modifed by @gezb in https://github.com/runatlantis/atlantis/pull/1991 +* fix: fix autoplan when .terraform.lock.hcl is modified by @gezb in https://github.com/runatlantis/atlantis/pull/1991 * feat: add XTerm JS to the server static files by @Ka1wa in https://github.com/runatlantis/atlantis/pull/1985 * feat: post workflow hooks by @tim775 in https://github.com/runatlantis/atlantis/pull/1990 * docs: add colon to policy checking yaml by @williamlord-wise in https://github.com/runatlantis/atlantis/pull/1996 diff --git a/runatlantis.io/blog/2018/hosting-our-static-site-over-ssl-with-s3-acm-cloudfront-and-terraform.md b/runatlantis.io/blog/2018/hosting-our-static-site-over-ssl-with-s3-acm-cloudfront-and-terraform.md index a9506073f3..3e52f7e075 100644 --- a/runatlantis.io/blog/2018/hosting-our-static-site-over-ssl-with-s3-acm-cloudfront-and-terraform.md +++ b/runatlantis.io/blog/2018/hosting-our-static-site-over-ssl-with-s3-acm-cloudfront-and-terraform.md @@ -52,7 +52,7 @@ Because I'm going to host the site on AWS services, I need requests to and our website is available on the internet via its S3 url so can't we just CNAME to the S3 bucket and call it a day? Unfortunately not. -Since we generated our own certificate, we would need S3 to sign its responses using our certificiate. S3 doesn't support this and thus we need CloudFront. CloudFront supports using our own SSL cert and will just pull its data from the S3 bucket. +Since we generated our own certificate, we would need S3 to sign its responses using our certificate. S3 doesn't support this and thus we need CloudFront. CloudFront supports using our own SSL cert and will just pull its data from the S3 bucket. # Terraform Time diff --git a/runatlantis.io/docs/custom-workflows.md b/runatlantis.io/docs/custom-workflows.md index af655abf26..0a3ca5de89 100644 --- a/runatlantis.io/docs/custom-workflows.md +++ b/runatlantis.io/docs/custom-workflows.md @@ -298,7 +298,7 @@ workflows: name: TF_IN_AUTOMATION value: 'true' - run: - # Allow for targetted plans/applies as not supported for Terraform wrappers by default + # Allow for targeted plans/applies as not supported for Terraform wrappers by default command: terragrunt plan -input=false $(printf '%s' $COMMENT_ARGS | sed 's/,/ /g' | tr -d '\\') -no-color -out $PLANFILE output: hide - run: | @@ -727,7 +727,7 @@ Full: | multienv.command | string | none | yes | Name of the custom script to run | | multienv.shell | string | "sh" | no | Name of the shell to use for command execution | | multienv.shellArgs | string or []string | "-c" | no | Command line arguments to be passed to the shell. Cannot be set without `shell` | -| multienv.output | string | "show" | no | Setting output to "hide" will supress the message obout added environment variables | +| multienv.output | string | "show" | no | Setting output to "hide" will suppress the message obout added environment variables | The output of the command execution must have the following format: `EnvVar1Name=value1,EnvVar2Name=value2,EnvVar3Name=value3` diff --git a/runatlantis.io/docs/post-workflow-hooks.md b/runatlantis.io/docs/post-workflow-hooks.md index 91ba0b7aa7..c0361175e0 100644 --- a/runatlantis.io/docs/post-workflow-hooks.md +++ b/runatlantis.io/docs/post-workflow-hooks.md @@ -11,7 +11,7 @@ back to the PR as a comment. Post workflow hooks can only be specified in the Server-Side Repo Config under the `repos` key. -## Atlantis Command Targetting +## Atlantis Command Targeting By default, the workflow hook will run when any command is processed by Atlantis. This can be modified by specifying the `commands` key in the workflow hook containing a comma delimited list diff --git a/runatlantis.io/docs/pre-workflow-hooks.md b/runatlantis.io/docs/pre-workflow-hooks.md index dce3f2fe7d..9c1166bb58 100644 --- a/runatlantis.io/docs/pre-workflow-hooks.md +++ b/runatlantis.io/docs/pre-workflow-hooks.md @@ -21,7 +21,7 @@ behavior can be changed by setting the [fail-on-pre-workflow-hook-error](server- flag in the Atlantis server configuration. ::: -## Atlantis Command Targetting +## Atlantis Command Targeting By default, the workflow hook will run when any command is processed by Atlantis. This can be modified by specifying the `commands` key in the workflow hook containing a comma delimited list diff --git a/runatlantis.io/docs/repo-and-project-permissions.md b/runatlantis.io/docs/repo-and-project-permissions.md index 5999b3a5b3..cd56d8ee7e 100644 --- a/runatlantis.io/docs/repo-and-project-permissions.md +++ b/runatlantis.io/docs/repo-and-project-permissions.md @@ -157,7 +157,7 @@ checking if the external command exited with code `0` and if the last line of output is `pass`. ```text -# Psuedo-code of Atlantis evaluation of external commands +# Pseudo-code of Atlantis evaluation of external commands user_authorized = external_command.exit_code == 0 diff --git a/runatlantis.io/docs/repo-level-atlantis-yaml.md b/runatlantis.io/docs/repo-level-atlantis-yaml.md index 11feb31224..a5e89d20a4 100644 --- a/runatlantis.io/docs/repo-level-atlantis-yaml.md +++ b/runatlantis.io/docs/repo-level-atlantis-yaml.md @@ -44,7 +44,7 @@ in your repo. If you have many directories with Terraform configuration, each directory will need to be defined. -This behavior can be overriden by setting `autodiscover.mode` to +This behavior can be overridden by setting `autodiscover.mode` to `enabled` in which case Atlantis will still try to discover projects which were not explicitly configured. If the directory of any discovered project conflicts with a manually configured project, the manually configured project will take precedence. diff --git a/runatlantis.io/docs/server-configuration.md b/runatlantis.io/docs/server-configuration.md index 303e9df067..54d53f0d60 100644 --- a/runatlantis.io/docs/server-configuration.md +++ b/runatlantis.io/docs/server-configuration.md @@ -509,7 +509,7 @@ and set `--autoplan-modules` to `false`. This will not work with `-d` yet and to use `-p` the repo projects must be defined in the repo `atlantis.yaml` file. - This will bypass `--restrict-file-list` if regex is used, normal commands will stil be blocked if necessary. + This will bypass `--restrict-file-list` if regex is used, normal commands will still be blocked if necessary. ::: warning SECURITY WARNING It's not supposed to be used with `--disable-apply-all`. @@ -1140,7 +1140,7 @@ This is useful when you have many projects and want to keep the pull request cle `--restrict-file-list` will block plan requests from projects outside the files modified in the pull request. This will not block plan requests with regex if using the `--enable-regexp-cmd` flag, in these cases commands - like `atlantis plan -p .*` will still work if used. normal commands will stil be blocked if necessary. + like `atlantis plan -p .*` will still work if used. normal commands will still be blocked if necessary. Defaults to `false`. ### `--silence-allowlist-errors` @@ -1342,7 +1342,7 @@ This flag is useful when having multiple projects that need to run a plan and ap * [plugin_cache_dir concurrently discussion](https://github.com/hashicorp/terraform/issues/31964) * [PR to improve the situation](https://github.com/hashicorp/terraform/pull/33479) -The effect of the race condition is more evident when using parallel configuration to run plan and apply, by disabling the use of plugin cache will impact in the performance when starting a new plan or apply, but in large atlantis deployments with multiple projects and shared modules the use of `--parallel_plan` and `--parallel_apply` is mandatory for an efficient managment of the PRs. +The effect of the race condition is more evident when using parallel configuration to run plan and apply, by disabling the use of plugin cache will impact in the performance when starting a new plan or apply, but in large atlantis deployments with multiple projects and shared modules the use of `--parallel_plan` and `--parallel_apply` is mandatory for an efficient management of the PRs. ### `--var-file-allowlist` diff --git a/server/controllers/events/events_controller_e2e_test.go b/server/controllers/events/events_controller_e2e_test.go index 4f456b8a2f..a9d4fe70a1 100644 --- a/server/controllers/events/events_controller_e2e_test.go +++ b/server/controllers/events/events_controller_e2e_test.go @@ -465,7 +465,7 @@ func TestGitHubWorkflow(t *testing.T) { }, }, { - Description: "omitting apply from allow commands always takes presedence", + Description: "omitting apply from allow commands always takes precedence", RepoDir: "simple-yaml", ModifiedFiles: []string{"main.tf"}, AllowCommands: []command.Name{command.Plan}, @@ -845,7 +845,7 @@ func TestSimpleWorkflow_terraformLockFile(t *testing.T) { if !c.LockFileTracked { // replace the lock file generated by the previous init to simulate - // dependcies needing updating in a latter plan + // dependencies needing updating in a latter plan runCmd(t, "", "cp", oldLockFilePath, fmt.Sprintf("%s/repos/runatlantis/atlantis-tests/2/default/.terraform.lock.hcl", atlantisWorkspace.DataDir)) } diff --git a/server/core/config/raw/global_cfg.go b/server/core/config/raw/global_cfg.go index 275c79be71..bdc1f6697d 100644 --- a/server/core/config/raw/global_cfg.go +++ b/server/core/config/raw/global_cfg.go @@ -126,8 +126,8 @@ func (g GlobalCfg) ToValid(defaultCfg valid.GlobalCfg) valid.GlobalCfg { applyReqs := defaultCfg.Repos[0].ApplyRequirements var globalApplyReqs []string for _, req := range applyReqs { - for _, nonOverrideableReq := range valid.NonOverrideableApplyReqs { - if req == nonOverrideableReq { + for _, nonOverridableReq := range valid.NonOverridableApplyReqs { + if req == nonOverridableReq { globalApplyReqs = append(globalApplyReqs, req) } } diff --git a/server/core/config/raw/repo_cfg.go b/server/core/config/raw/repo_cfg.go index 9aa18c7733..f613f320ab 100644 --- a/server/core/config/raw/repo_cfg.go +++ b/server/core/config/raw/repo_cfg.go @@ -10,7 +10,7 @@ import ( // DefaultEmojiReaction is the default emoji reaction for repos const DefaultEmojiReaction = "" -// DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failiures +// DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failures const DefaultAbortOnExcecutionOrderFail = false // RepoCfg is the raw schema for repo-level atlantis.yaml config. diff --git a/server/core/config/raw/step_test.go b/server/core/config/raw/step_test.go index f8b9ae8b11..c7373ad142 100644 --- a/server/core/config/raw/step_test.go +++ b/server/core/config/raw/step_test.go @@ -482,7 +482,7 @@ func TestStep_Validate(t *testing.T) { { // For atlantis.yaml v2, this wouldn't parse, but now there should // be no error. - description: "unparseable shell command", + description: "unparsable shell command", input: raw.Step{ StringVal: map[string]string{ "run": "my 'c", diff --git a/server/core/config/raw/workflow_step_test.go b/server/core/config/raw/workflow_step_test.go index 301e141e65..60b6f1552b 100644 --- a/server/core/config/raw/workflow_step_test.go +++ b/server/core/config/raw/workflow_step_test.go @@ -100,7 +100,7 @@ func TestGlobalConfigStep_Validate(t *testing.T) { { // For atlantis.yaml v2, this wouldn't parse, but now there should // be no error. - description: "unparseable shell command", + description: "unparsable shell command", input: raw.WorkflowHook{ StringVal: map[string]string{ "run": "my 'c", diff --git a/server/core/config/valid/global_cfg.go b/server/core/config/valid/global_cfg.go index a930ef22bc..5cf6f2795e 100644 --- a/server/core/config/valid/global_cfg.go +++ b/server/core/config/valid/global_cfg.go @@ -34,12 +34,12 @@ var AllowedSilencePRComments = []string{"plan", "apply"} // DefaultAtlantisFile is the default name of the config file for each repo. const DefaultAtlantisFile = "atlantis.yaml" -// NonOverrideableApplyReqs will get applied across all "repos" in the server side config. +// NonOverridableApplyReqs will get applied across all "repos" in the server side config. // If repo config is allowed overrides, they can override this. // TODO: Make this more customizable, not everyone wants this rigid workflow // maybe something along the lines of defining overridable/non-overrideable apply // requirements in the config and removing the flag to enable policy checking. -var NonOverrideableApplyReqs = []string{PoliciesPassedCommandReq} +var NonOverridableApplyReqs = []string{PoliciesPassedCommandReq} // GlobalCfg is the final parsed version of server-side repo config. type GlobalCfg struct { diff --git a/server/core/locking/apply_locking.go b/server/core/locking/apply_locking.go index bdb8546308..54591b13f6 100644 --- a/server/core/locking/apply_locking.go +++ b/server/core/locking/apply_locking.go @@ -54,7 +54,7 @@ func NewApplyClient(backend Backend, disableApply bool, disableGlobalApplyLock b } // LockApply acquires global apply lock. -// DisableApply takes presedence to any existing locks, if it is set to true +// DisableApply takes precedence to any existing locks, if it is set to true // this function returns an error func (c *ApplyClient) LockApply() (ApplyCommandLock, error) { response := ApplyCommandLock{} @@ -76,7 +76,7 @@ func (c *ApplyClient) LockApply() (ApplyCommandLock, error) { } // UnlockApply releases a global apply lock. -// DisableApply takes presedence to any existing locks, if it is set to true +// DisableApply takes precedence to any existing locks, if it is set to true // this function returns an error func (c *ApplyClient) UnlockApply() error { if c.disableApply { diff --git a/server/core/runtime/plan_step_runner.go b/server/core/runtime/plan_step_runner.go index b1cb66c1e4..7d99dc26bf 100644 --- a/server/core/runtime/plan_step_runner.go +++ b/server/core/runtime/plan_step_runner.go @@ -284,7 +284,7 @@ locally at this time. ` -// remoteOpsErr100 is the error terraform plan will retrun if this project is +// remoteOpsErr100 is the error terraform plan will return if this project is // using TFE remote operations in TF 1.0.{0,1}. var remoteOpsErr100 = `Error: Saving a generated plan is currently not supported diff --git a/server/core/runtime/post_workflow_hook_runner_test.go b/server/core/runtime/post_workflow_hook_runner_test.go index bbf22b4394..8bab373502 100644 --- a/server/core/runtime/post_workflow_hook_runner_test.go +++ b/server/core/runtime/post_workflow_hook_runner_test.go @@ -19,7 +19,7 @@ func TestPostWorkflowHookRunner_Run(t *testing.T) { defaultShell := "sh" defaultShellArgs := "-c" - defautShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell) + defaultShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell) defaultUnterminatedStringError := unterminatedStringError(defaultShell, defaultShellArgs) cases := []struct { @@ -82,7 +82,7 @@ func TestPostWorkflowHookRunner_Run(t *testing.T) { Command: "lkjlkj", Shell: defaultShell, ShellArgs: defaultShellArgs, - ExpOut: fmt.Sprintf(defautShellCommandNotFoundErrorFormat, "lkjlkj"), + ExpOut: fmt.Sprintf(defaultShellCommandNotFoundErrorFormat, "lkjlkj"), ExpErr: "exit status 127: running \"sh -c lkjlkj\" in", ExpDescription: "", }, diff --git a/server/core/runtime/pre_workflow_hook_runner_test.go b/server/core/runtime/pre_workflow_hook_runner_test.go index ad8659cfa2..40133c10a5 100644 --- a/server/core/runtime/pre_workflow_hook_runner_test.go +++ b/server/core/runtime/pre_workflow_hook_runner_test.go @@ -39,7 +39,7 @@ func TestPreWorkflowHookRunner_Run(t *testing.T) { defaultShell := "sh" defaultShellArgs := "-c" - defautShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell) + defaultShellCommandNotFoundErrorFormat := commandNotFoundErrorFormat(defaultShell) defaultUnterminatedStringError := unterminatedStringError(defaultShell, defaultShellArgs) cases := []struct { @@ -102,7 +102,7 @@ func TestPreWorkflowHookRunner_Run(t *testing.T) { Command: "lkjlkj", Shell: defaultShell, ShellArgs: defaultShellArgs, - ExpOut: fmt.Sprintf(defautShellCommandNotFoundErrorFormat, "lkjlkj"), + ExpOut: fmt.Sprintf(defaultShellCommandNotFoundErrorFormat, "lkjlkj"), ExpErr: "exit status 127: running \"sh -c lkjlkj\" in", ExpDescription: "", }, diff --git a/server/core/terraform/terraform_client_test.go b/server/core/terraform/terraform_client_test.go index c60a5fb085..1c2c654495 100644 --- a/server/core/terraform/terraform_client_test.go +++ b/server/core/terraform/terraform_client_test.go @@ -78,9 +78,9 @@ is 0.11.13. You can update by downloading from developer.hashicorp.com/terraform defer tempSetEnv(t, "PATH", fmt.Sprintf("%s:%s", tmp, os.Getenv("PATH")))() mockDownloader := mocks.NewMockDownloader() - distibution := terraform.NewDistributionTerraformWithDownloader(mockDownloader) + distribution := terraform.NewDistributionTerraformWithDownloader(mockDownloader) - c, err := terraform.NewClient(logger, distibution, binDir, cacheDir, "", "", "", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, true, true, projectCmdOutputHandler) + c, err := terraform.NewClient(logger, distribution, binDir, cacheDir, "", "", "", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, true, true, projectCmdOutputHandler) Ok(t, err) Ok(t, err) @@ -301,10 +301,10 @@ func TestEnsureVersion_downloaded(t *testing.T) { projectCmdOutputHandler := jobmocks.NewMockProjectCommandOutputHandler() mockDownloader := mocks.NewMockDownloader() - distibution := terraform.NewDistributionTerraformWithDownloader(mockDownloader) + distribution := terraform.NewDistributionTerraformWithDownloader(mockDownloader) downloadsAllowed := true - c, err := terraform.NewTestClient(logger, distibution, binDir, cacheDir, "", "", "0.11.10", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, downloadsAllowed, true, projectCmdOutputHandler) + c, err := terraform.NewTestClient(logger, distribution, binDir, cacheDir, "", "", "0.11.10", cmd.DefaultTFVersionFlag, cmd.DefaultTFDownloadURL, downloadsAllowed, true, projectCmdOutputHandler) Ok(t, err) Equals(t, "0.11.10", c.DefaultVersion().String()) diff --git a/server/events/markdown_renderer.go b/server/events/markdown_renderer.go index 5bbfc8a47e..4ce268c239 100644 --- a/server/events/markdown_renderer.go +++ b/server/events/markdown_renderer.go @@ -316,7 +316,7 @@ func (m *MarkdownRenderer) renderProjectResults(ctx *command.Context, results [] resultData.Rendered = m.renderTemplateTrimSpace(templates.Lookup("stateRmSuccessUnwrapped"), result.StateRmSuccess) } // Error out if no template was found, only if there are no errors or failures. - // This is because some errors and failures rely on additional context rendered by templtes, but not all errors or failures. + // This is because some errors and failures rely on additional context rendered by templates, but not all errors or failures. } else if !(result.Error != nil || result.Failure != "") { resultData.Rendered = "Found no template. This is a bug!" } diff --git a/server/events/models/models.go b/server/events/models/models.go index f7bd4790db..66a102fc81 100644 --- a/server/events/models/models.go +++ b/server/events/models/models.go @@ -669,7 +669,7 @@ type TeamAllowlistCheckerContext struct { API bool } -// WorkflowHookCommandContext defines the context for a pre and post worklfow_hooks that will +// WorkflowHookCommandContext defines the context for a pre and post workflow_hooks that will // be executed before workflows. type WorkflowHookCommandContext struct { // BaseRepo is the repository that the pull request will be merged into. diff --git a/server/events/project_command_builder.go b/server/events/project_command_builder.go index 5870bf22e0..0ffec157f8 100644 --- a/server/events/project_command_builder.go +++ b/server/events/project_command_builder.go @@ -32,7 +32,7 @@ const ( DefaultWorkspace = "default" // DefaultDeleteSourceBranchOnMerge being false is the default setting whether or not to remove a source branch on merge DefaultDeleteSourceBranchOnMerge = false - // DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failiures + // DefaultAbortOnExcecutionOrderFail being false is the default setting for abort on execution group failures DefaultAbortOnExcecutionOrderFail = false ) @@ -238,7 +238,7 @@ type DefaultProjectCommandBuilder struct { AutoDetectModuleFiles string // User config option: List of file patterns to to to check if a directory contains modified files. AutoplanFileList string - // User config option: Format Terraform plan output into a markdown-diff friendy format for color-coding purposes. + // User config option: Format Terraform plan output into a markdown-diff friendly format for color-coding purposes. EnableDiffMarkdownFormat bool // User config option: Block plan requests from projects outside the files modified in the pull request. RestrictFileList bool diff --git a/server/events/project_command_runner.go b/server/events/project_command_runner.go index 8c5d810cca..76f9ba9202 100644 --- a/server/events/project_command_runner.go +++ b/server/events/project_command_runner.go @@ -124,7 +124,7 @@ type ProjectApplyCommandRunner interface { } type ProjectPolicyCheckCommandRunner interface { - // PolicyCheck runs OPA defined policies for the project desribed by ctx. + // PolicyCheck runs OPA defined policies for the project described by ctx. PolicyCheck(ctx command.ProjectContext) command.ProjectResult } diff --git a/server/events/project_command_runner_test.go b/server/events/project_command_runner_test.go index 68548efdd0..13a75a1658 100644 --- a/server/events/project_command_runner_test.go +++ b/server/events/project_command_runner_test.go @@ -845,7 +845,7 @@ func TestDefaultProjectCommandRunner_ApprovePolicies(t *testing.T) { expFailure: "One or more policy sets require additional approval.", }, { - description: "When user is a top-level ownner through membership, increment approval on all policies.", + description: "When user is a top-level owner through membership, increment approval on all policies.", userTeams: []string{"someuserteam"}, policySetCfg: valid.PolicySets{ Owners: valid.PolicyOwners{ diff --git a/server/events/vcs/git_cred_writer_test.go b/server/events/vcs/git_cred_writer_test.go index 64e7588672..b8692bf25d 100644 --- a/server/events/vcs/git_cred_writer_test.go +++ b/server/events/vcs/git_cred_writer_test.go @@ -80,10 +80,10 @@ func TestWriteGitCreds_ReplaceApp(t *testing.T) { err = vcs.WriteGitCreds("x-access-token", "token", "github.com", tmp, logger, true) Ok(t, err) - expContets := "line1\nhttps://x-access-token:token@github.com\nline2" + expContents := "line1\nhttps://x-access-token:token@github.com\nline2" actContents, err := os.ReadFile(filepath.Join(tmp, ".git-credentials")) Ok(t, err) - Equals(t, expContets, string(actContents)) + Equals(t, expContents, string(actContents)) } // Test that the github app credential gets added even if there are other credentials. @@ -99,10 +99,10 @@ func TestWriteGitCreds_AppendAppWhenFileNotEmpty(t *testing.T) { err = vcs.WriteGitCreds("x-access-token", "token", "github.com", tmp, logger, true) Ok(t, err) - expContets := "line1\nhttps://user:token@host.com\nline2\nhttps://x-access-token:token@github.com" + expContents := "line1\nhttps://user:token@host.com\nline2\nhttps://x-access-token:token@github.com" actContents, err := os.ReadFile(filepath.Join(tmp, ".git-credentials")) Ok(t, err) - Equals(t, expContets, string(actContents)) + Equals(t, expContents, string(actContents)) } // Test that the github app credentials get updated when cred file is empty. @@ -118,10 +118,10 @@ func TestWriteGitCreds_AppendApp(t *testing.T) { err = vcs.WriteGitCreds("x-access-token", "token", "github.com", tmp, logger, true) Ok(t, err) - expContets := "https://x-access-token:token@github.com" + expContents := "https://x-access-token:token@github.com" actContents, err := os.ReadFile(filepath.Join(tmp, ".git-credentials")) Ok(t, err) - Equals(t, expContets, string(actContents)) + Equals(t, expContents, string(actContents)) } // Test that if we can't read the existing file to see if the contents will be diff --git a/server/events/vcs/github_client_test.go b/server/events/vcs/github_client_test.go index ffd0e02e59..8d4912616d 100644 --- a/server/events/vcs/github_client_test.go +++ b/server/events/vcs/github_client_test.go @@ -1039,21 +1039,21 @@ func TestGithubClient_MergePullCorrectMethod(t *testing.T) { allowSquash: false, expMethod: "rebase", }, - "all true: merge with merge: overrided by command": { + "all true: merge with merge: overridden by command": { allowMerge: true, allowRebase: true, allowSquash: true, mergeMethodOption: "merge", expMethod: "merge", }, - "all true: merge with rebase: overrided by command": { + "all true: merge with rebase: overridden by command": { allowMerge: true, allowRebase: true, allowSquash: true, mergeMethodOption: "rebase", expMethod: "rebase", }, - "all true: merge with squash: overrided by command": { + "all true: merge with squash: overridden by command": { allowMerge: true, allowRebase: true, allowSquash: true,