diff --git a/api/spec.json b/api/spec.json index 7537f156..527b39e1 100644 --- a/api/spec.json +++ b/api/spec.json @@ -460,7 +460,7 @@ "enum": [ "Success", "ManualMergeRequired", - "DefaultParamterValueMissing", + "DefaultParameterValueMissing", "RemovedPackageInUse" ], "type": "string" @@ -2551,7 +2551,7 @@ } } }, - "DeploymentPromomotionTenant": { + "DeploymentPromotionTenant": { "type": "object", "properties": { "Id": { @@ -3032,7 +3032,7 @@ "TenantPromotions": { "type": "array", "items": { - "$ref": "#/definitions/DeploymentPromomotionTenant" + "$ref": "#/definitions/DeploymentPromotionTenant" } } } @@ -8122,7 +8122,7 @@ "TenantPromotions": { "type": "array", "items": { - "$ref": "#/definitions/DeploymentPromomotionTenant" + "$ref": "#/definitions/DeploymentPromotionTenant" } } } diff --git a/pkg/accounts/accounts.go b/pkg/accounts/accounts.go index e58e49f8..b35bb1ff 100644 --- a/pkg/accounts/accounts.go +++ b/pkg/accounts/accounts.go @@ -127,7 +127,7 @@ func (a *Accounts) UnmarshalJSON(b []byte) error { return nil } -// GetNextPage retrives the next page from the links collection. If no next page +// GetNextPage retrieves the next page from the links collection. If no next page // exists it will return nill func (r *Accounts) GetNextPage(client *sling.Sling) (*Accounts, error) { if r.Links.PageNext == "" { @@ -140,7 +140,7 @@ func (r *Accounts) GetNextPage(client *sling.Sling) (*Accounts, error) { return ToAccounts(response.(*resources.Resources[*AccountResource])), nil } -// GetAllPages will retrive all remaining next pages in the link collection +// GetAllPages will retrieve all remaining next pages in the link collection // and return the result as list of concatenated Items; Including the items // from the base Resource. func (r *Accounts) GetAllPages(client *sling.Sling) ([]IAccount, error) { diff --git a/pkg/accounts/ssh_key_account.go b/pkg/accounts/ssh_key_account.go index 26295ecf..d9ac871b 100644 --- a/pkg/accounts/ssh_key_account.go +++ b/pkg/accounts/ssh_key_account.go @@ -54,7 +54,7 @@ func NewSSHKeyAccount(name string, username string, privateKeyFile *core.Sensiti return &account, nil } -// SetPrivateKeyPassphrase sets the private key [assphrase of this SSH key pair account. +// SetPrivateKeyPassphrase sets the private key passphrase of this SSH key pair account. func (s *SSHKeyAccount) SetPrivateKeyPassphrase(privateKeyPassphrase *core.SensitiveValue) { s.PrivateKeyPassphrase = privateKeyPassphrase } diff --git a/pkg/credentials/resource_test.go b/pkg/credentials/resource_test.go index 74ceed55..b66bb2d9 100644 --- a/pkg/credentials/resource_test.go +++ b/pkg/credentials/resource_test.go @@ -55,9 +55,9 @@ func TestResourceWithAnonymousAsJSON(t *testing.T) { name := internal.GetRandomName() selfLink := internal.GetRandomName() - anonymousdAsJSON, err := json.Marshal(anonymous) + anonymousAsJSON, err := json.Marshal(anonymous) require.NoError(t, err) - require.NotNil(t, anonymousdAsJSON) + require.NotNil(t, anonymousAsJSON) resource := credentials.NewResource(name, anonymous) resource.Description = description @@ -72,7 +72,7 @@ func TestResourceWithAnonymousAsJSON(t *testing.T) { "Links": { "Self": "%s" } - }`, description, anonymousdAsJSON, id, name, selfLink) + }`, description, anonymousAsJSON, id, name, selfLink) resourceAsJSON, err := json.Marshal(resource) require.NoError(t, err) diff --git a/pkg/environments/environment_service.go b/pkg/environments/environment_service.go index 145c5191..dbdc4ed7 100644 --- a/pkg/environments/environment_service.go +++ b/pkg/environments/environment_service.go @@ -125,7 +125,7 @@ func (s *EnvironmentService) GetByName(name string) ([]*Environment, error) { return services.GetPagedResponse[Environment](s, path) } -// GetByPartialName performs a lookup and returns enironments with a matching +// GetByPartialName performs a lookup and returns environments with a matching // partial name. func (s *EnvironmentService) GetByPartialName(partialName string) ([]*Environment, error) { if internal.IsEmpty(partialName) { diff --git a/pkg/events/events_query.go b/pkg/events/events_query.go index e10eb644..7c4b40d4 100644 --- a/pkg/events/events_query.go +++ b/pkg/events/events_query.go @@ -12,7 +12,7 @@ type EventsQuery struct { FromAutoID string `uri:"fromAutoId,omitempty" url:"fromAutoId,omitempty"` IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` IncludeSystem bool `uri:"includeSystem,omitempty" url:"includeSystem,omitempty"` - Internal string `uri:"interal,omitempty" url:"interal,omitempty"` + Internal string `uri:"internal,omitempty" url:"internal,omitempty"` Name string `uri:"name,omitempty" url:"name,omitempty"` PartialName string `uri:"partialName,omitempty" url:"partialName,omitempty"` ProjectGroups []string `uri:"projectGroups,omitempty" url:"projectGroups,omitempty"` diff --git a/pkg/interruptions/interruption.go b/pkg/interruptions/interruption.go index 690ccd15..e1aaf134 100644 --- a/pkg/interruptions/interruption.go +++ b/pkg/interruptions/interruption.go @@ -30,5 +30,5 @@ func NewInterruption() *Interruption { } } -const ManualInterverventionApprove = "Proceed" +const ManualInterventionApprove = "Proceed" const ManualInterventionDecline = "Abort" diff --git a/pkg/machines/duration_formatter_test.go b/pkg/machines/duration_formatter_test.go index 9484a95e..1c905f12 100644 --- a/pkg/machines/duration_formatter_test.go +++ b/pkg/machines/duration_formatter_test.go @@ -9,7 +9,7 @@ func TestToTimeSpan(t *testing.T) { halfSecond, _ := time.ParseDuration("0.5s") second, _ := time.ParseDuration("1111ms") twoHours, _ := time.ParseDuration("120m") - fourtySevenHours, _ := time.ParseDuration("47h") + fortySevenHours, _ := time.ParseDuration("47h") twoDays, _ := time.ParseDuration("48h") t.Logf("500ms: %s", ToTimeSpan(halfSecond)) t.Logf("1000ms: %s", ToTimeSpan(second)) @@ -17,7 +17,7 @@ func TestToTimeSpan(t *testing.T) { t.Logf("1m: %s", ToTimeSpan(time.Minute)) t.Logf("1h: %s", ToTimeSpan(time.Hour)) t.Logf("120m: %s", ToTimeSpan(twoHours)) - t.Logf("47h: %s", ToTimeSpan(fourtySevenHours)) + t.Logf("47h: %s", ToTimeSpan(fortySevenHours)) t.Logf("48h: %s", ToTimeSpan(twoDays)) } diff --git a/pkg/machines/ssh_endpoint.go b/pkg/machines/ssh_endpoint.go index b23a7238..eb547065 100644 --- a/pkg/machines/ssh_endpoint.go +++ b/pkg/machines/ssh_endpoint.go @@ -75,7 +75,7 @@ func (s *SSHEndpoint) GetProxyID() string { func (s *SSHEndpoint) MarshalJSON() ([]byte, error) { sshEndpoint := struct { AccountID string `json:"AccountId,omitempty"` - ComunicationStyle string `json:"CommunicationStyle" validate:"required,eq=Ssh"` + CommunicationStyle string `json:"CommunicationStyle" validate:"required,eq=Ssh"` DotNetCorePlatform string Fingerprint string Host string @@ -85,7 +85,7 @@ func (s *SSHEndpoint) MarshalJSON() ([]byte, error) { resources.Resource }{ AccountID: s.AccountID, - ComunicationStyle: s.CommunicationStyle, + CommunicationStyle: s.CommunicationStyle, DotNetCorePlatform: s.DotNetCorePlatform, Fingerprint: s.Fingerprint, Host: s.Host, diff --git a/pkg/newclient/httpsession.go b/pkg/newclient/httpsession.go index f378a238..bcb7e083 100644 --- a/pkg/newclient/httpsession.go +++ b/pkg/newclient/httpsession.go @@ -82,7 +82,7 @@ func (h *HttpSession) DoRawJsonRequest(req *http.Request, requestBody any, outpu if resp.StatusCode == http.StatusNoContent || resp.ContentLength == 0 { // TODO the ContentLength check is copied from Sling, but it's valid for servers to stream responses // without a known content length. This won't handle such responses, which would be a bug. The octopus server tends not - // to do this, so we can defer a fix until it becomes neccessary + // to do this, so we can defer a fix until it becomes necessary return resp, nil } diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go index 6757530b..07bb1ff4 100644 --- a/pkg/resources/resources.go +++ b/pkg/resources/resources.go @@ -15,7 +15,7 @@ type Resources[T any] struct { PagedResults } -// GetNextPage retrives the next page from the links collection. If no next page +// GetNextPage retrieves the next page from the links collection. If no next page // exists it will return nill func (r *Resources[T]) GetNextPage(client *sling.Sling) (*Resources[T], error) { if r.Links.PageNext == "" { @@ -28,7 +28,7 @@ func (r *Resources[T]) GetNextPage(client *sling.Sling) (*Resources[T], error) { return response.(*Resources[T]), nil } -// GetAllPages will retrive all remaining next pages in the link collection +// GetAllPages will retrieve all remaining next pages in the link collection // and return the result as list of concatenated Items; Including the items // from the base Resource. func (r *Resources[T]) GetAllPages(client *sling.Sling) ([]T, error) { diff --git a/pkg/variables/script_module_service.go b/pkg/variables/script_module_service.go index 6c3e7984..5bef1a21 100644 --- a/pkg/variables/script_module_service.go +++ b/pkg/variables/script_module_service.go @@ -202,8 +202,8 @@ func (s *ScriptModuleService) Update(scriptModule *ScriptModule) (*ScriptModule, return nil, err } - updatedVriableSet := updatedVariablesResponse.(*VariableSet) - for _, variable := range updatedVriableSet.Variables { + updatedVariableSet := updatedVariablesResponse.(*VariableSet) + for _, variable := range updatedVariableSet.Variables { if strings.HasPrefix(variable.Name, "Octopus.Script.Module[") { scriptModuleResponse.ScriptBody = variable.Value } diff --git a/test/e2e/interruption_test.go b/test/e2e/interruption_test.go index ea66dada..32d359c5 100644 --- a/test/e2e/interruption_test.go +++ b/test/e2e/interruption_test.go @@ -58,7 +58,7 @@ package e2e // require.NoError(t, err) // require.NotNil(t, client) -// interruption, err := getInterruptonFromJSON(interruptionJSON) +// interruption, err := getInterruptionFromJSON(interruptionJSON) // require.NoError(t, err) // require.NotNil(t, interruption) @@ -76,7 +76,7 @@ package e2e // require.NoError(t, err) // require.NotNil(t, client) -// interruption, err := getInterruptonFromJSON(interruptionJSON) +// interruption, err := getInterruptionFromJSON(interruptionJSON) // require.NoError(t, err) // require.NotNil(t, interruption) @@ -95,14 +95,14 @@ package e2e // require.NoError(t, err) // require.NotNil(t, client) -// interruption, err := getInterruptonFromJSON(interruptionJSON) +// interruption, err := getInterruptionFromJSON(interruptionJSON) // require.NoError(t, err) // require.NotNil(t, interruption) // submitRequest := interruptions.InterruptionSubmitRequest{ // Instructions: "Approve The Deployment", // Notes: "", -// Result: interruptions.ManualInterverventionApprove, +// Result: interruptions.ManualInterventionApprove, // } // i, err := client.Interruptions.Submit(interruption, &submitRequest) @@ -298,7 +298,7 @@ package e2e // } // ` -// func getInterruptonFromJSON(interruptionJSON string) (*interruptions.Interruption, error) { +// func getInterruptionFromJSON(interruptionJSON string) (*interruptions.Interruption, error) { // var interruption interruptions.Interruption // err := json.Unmarshal([]byte(interruptionJSON), &interruption) // return &interruption, err diff --git a/test/testutil.go b/test/testutil.go index 20b267de..f4eda2a6 100644 --- a/test/testutil.go +++ b/test/testutil.go @@ -52,7 +52,7 @@ type MockHttpServer struct { Response chan responseOrError // so test code can detect unanswered requests or responses at the end. - // Not strictly neccessary as unanswered req/resp results in a channel deadlock + // Not strictly necessary as unanswered req/resp results in a channel deadlock // and go panics and kills the process, so we find out about it, but this is a bit // less confusing to troubleshoot pendingMsgCount int32 diff --git a/tests/Create-ApiKey.ps1 b/tests/Create-ApiKey.ps1 index 2fe6edd4..22f1132d 100644 --- a/tests/Create-ApiKey.ps1 +++ b/tests/Create-ApiKey.ps1 @@ -10,7 +10,7 @@ $LoginObj = New-Object Octopus.Client.Model.LoginCommand $LoginObj.Username = "admin" $LoginObj.Password = "Password01!" -#Loging in to Octopus +#Logging in to Octopus $repository.Users.SignIn($LoginObj) #Getting current user logged in diff --git a/uritemplates/uritemplates.go b/uritemplates/uritemplates.go index 1bbe16bc..351a02d3 100644 --- a/uritemplates/uritemplates.go +++ b/uritemplates/uritemplates.go @@ -185,7 +185,7 @@ func parseTerm(term string) (result templateTerm, err error) { err = errors.New("not a valid name: " + result.name) } if result.explode && result.truncate > 0 { - err = errors.New("both explode and prefix modifers on same term") + err = errors.New("both explode and prefix modifiers on same term") } return result, err }