Skip to content
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
2 changes: 1 addition & 1 deletion ci/circleci/runner/src/circlerunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def security_validation(self, file_path):
"""validate file security for runner execution, besides file existence,
the file needs to pass the following validation:
1. it needs to be owned by root
2. it needs to be only readable (and optionaly executable)
2. it needs to be only readable (and optionally executable)
by owner(root) (mode 500 or 400)
"""
self.logger.debug(f"validating script file {file_path}")
Expand Down
2 changes: 1 addition & 1 deletion ci/circleci/runner/src/macrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def do_the_job(self, job_name, job_params):
for local_path in files:
self.upload_file_to_s3(source_file_path=local_path, s3_path=s3_path)
else:
raise Exception(f"unknow job to execute {job_name}")
raise Exception(f"unknown job to execute {job_name}")

if __name__ == "__main__":
parser = optparse.OptionParser()
Expand Down
2 changes: 1 addition & 1 deletion cmd/auth/login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var mockOrgAuth = types.SlackAuth{
}
var mockOrgAuthURL = "https://url.com"

func TestLoginCommmand(t *testing.T) {
func TestLoginCommand(t *testing.T) {
testutil.TableTestCommand(t, testutil.CommandTests{
"errors when the challenge flag is provided without the ticket flag": {
CmdArgs: []string{"--challenge=achallengestring"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/datastore/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func TestQueryCommand(t *testing.T) {
Option: "status",
Index: 0,
}, nil)
clientsMock.IO.On("SelectPrompt", mock.Anything, "Slect an attribute for '#task_id'", mock.Anything, iostreams.MatchPromptConfig(iostreams.SelectPromptConfig{
clientsMock.IO.On("SelectPrompt", mock.Anything, "Select an attribute for '#task_id'", mock.Anything, iostreams.MatchPromptConfig(iostreams.SelectPromptConfig{
Flag: clientsMock.Config.Flags.Lookup("attributes"),
})).Return(iostreams.SelectPromptResponse{
Prompt: true,
Expand Down
2 changes: 1 addition & 1 deletion cmd/manifest/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func newValidateLogger(clients *shared.ClientFactory, cmd *cobra.Command) *logge
)
}

// gatherAuthenticationToken returns some user token and configures authenication
// gatherAuthenticationToken returns some user token and configures authentication
// internals for API use
func gatherAuthenticationToken(ctx context.Context, clients *shared.ClientFactory) (auth types.SlackAuth, err error) {
defer func() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/project/create_samples.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func filterRepos(sampleRepos []create.GithubRepo, projectType string) []create.G
return filteredRepos
}

// sortRepos sorts the provided repostiories by the
// sortRepos sorts the provided repositories by the
// StargazersCount field in descending order
func sortRepos(sampleRepos []create.GithubRepo) []create.GithubRepo {
sortedRepos := sampleRepos
Expand Down
4 changes: 2 additions & 2 deletions internal/api/workflows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ func Test_API_WorkflowTriggersList(t *testing.T) {
argsLimit: 4,
argsCursor: "",
argsType: "fake_type",
httpResponseJSON: `{"ok":false,"error":"invaild_arguments"}`,
expectedErrorContains: "invaild_arguments",
httpResponseJSON: `{"ok":false,"error":"invalid_arguments"}`,
expectedErrorContains: "invalid_arguments",
},
}

Expand Down
2 changes: 1 addition & 1 deletion internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func regexReplaceAppNameInManifest(src []byte, appName string) []byte {
//
// Expression explained:
// (?m) - Multi-line match that enables the use of ^ and $
// #1 - Match $1 captures start of content to the `Manifest({` function with optional whitepsace between the name, bracket `(```, and brace `{`
// #1 - Match $1 captures start of content to the `Manifest({` function with optional whitespace between the name, bracket `(```, and brace `{`
// #2 - Continue match $1 unless a closing brace `}` is encountered
// #3 - Continue match $1 to the `name` key surrounded by optional single or double quotes
// #4 - Continue match $1 ignoring whitespace followed by a colon `:` and the opening single or double quotes of the string's value
Expand Down
2 changes: 1 addition & 1 deletion internal/app/app_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func TestAppClient_CleanupSlackFolder(t *testing.T) {

require.NoError(t, err)
assert.False(t, ac.config.ProjectConfig.ProjectConfigJSONFileExists(wd),
"an unexepcted config was found")
"an unexpected config was found")

dotSlackFolder := filepath.Dir(pathToAppsJSON)
_, err = ac.fs.Stat(dotSlackFolder)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmdutil/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
)

// OrgGrantWorkspaceDescription is the description for for --org-workspace-grant flag in the run, deploy and install commands
// This vaue is a function so that formatting is applied for the help page (when style is enabled).
// This value is a function so that formatting is applied for the help page (when style is enabled).
var OrgGrantWorkspaceDescription = func() string {
return fmt.Sprintf("grant access to a specific org workspace ID\n %s",
style.Secondary("(or 'all' for all workspaces in the org)"))
Expand Down
2 changes: 1 addition & 1 deletion internal/config/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func Test_Config_ManifestSource_Exists(t *testing.T) {
expected: true,
},
"unknown source exists": {
a: "unknonwn",
a: "unknown",
expected: true,
},
"missing source does not exist": {
Expand Down
2 changes: 1 addition & 1 deletion internal/config/system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ func Test_SystemConfig_writeConfigFile(t *testing.T) {
wg.Done()
}()

// Step 3) Wait a few seconds to guarantee Step 2) go rountine executes first
// Step 3) Wait a few seconds to guarantee Step 2) go routine executes first
time.Sleep(50 * time.Millisecond)

// Step 4) Unlock the file so that Step 2) can stop waiting and write the config file
Expand Down
2 changes: 1 addition & 1 deletion internal/hooks/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func Test_HookScript_Get(t *testing.T) {
expectedError: nil,
expectedCommand: "npm start",
},
"Cmmand does not exist": {
"Command does not exist": {
hookScript: &HookScript{Name: "start", Command: ""},
expectedError: slackerror.New(slackerror.ErrSDKHookNotFound).WithMessage("The command for 'start' was not found"),
expectedCommand: "",
Expand Down
2 changes: 1 addition & 1 deletion internal/iostreams/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"io"
)

// Reader contains implmentations of a Read methods for various inputs methods
// Reader contains implementations of a Read methods for various inputs methods
//
// Only stdin is supported for now
type Reader interface {
Expand Down
8 changes: 4 additions & 4 deletions internal/logger/logevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type LogEvent struct {
Data LogData
}

// DataToString safetly returns the Data[key] value as a string
// DataToString safely returns the Data[key] value as a string
func (l *LogEvent) DataToString(key string) string {
var defaultValue string

Expand All @@ -48,7 +48,7 @@ func (l *LogEvent) DataToString(key string) string {
}
}

// DataToString safetly returns the Data[key] value as a string
// DataToString safely returns the Data[key] value as a string
func (l *LogEvent) DataToStringSlice(key string) []string {
defaultValue := make([]string, 0)

Expand All @@ -66,7 +66,7 @@ func (l *LogEvent) DataToStringSlice(key string) []string {
}
}

// DataToBool safetly returns the Data[key] value as a bool
// DataToBool safely returns the Data[key] value as a bool
func (l *LogEvent) DataToBool(key string) bool {
var defaultValue bool

Expand All @@ -84,7 +84,7 @@ func (l *LogEvent) DataToBool(key string) bool {
}
}

// DataToBool safetly returns the Data[key] value as a bool
// DataToBool safely returns the Data[key] value as a bool
func (l *LogEvent) DataToInt(key string) int {
var defaultValue int

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/apps/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ func InstallLocalApp(ctx context.Context, clients *shared.ClientFactory, orgGran
// here before installing the application. This includes interactivity and event
// subscriptions as specified through Run On Slack hosting requirements.
//
// The CLI determines the API host from selected credentials during installaion.
// The CLI determines the API host from selected credentials during installation.
//
// Apps without a specified or a "remote" function runtime should ignore this.
func configureHostedManifest(
Expand Down
12 changes: 6 additions & 6 deletions internal/pkg/platform/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ func TestPlatformActivity_TriggerExecutedToString(t *testing.T) {

func Test_datastoreRequestResultToString(t *testing.T) {
for name, tt := range map[string]struct {
activty api.Activity
activity api.Activity
expectedResults []string
}{
"successful datastore request event log": {
activty: api.Activity{
activity: api.Activity{
Payload: map[string]interface{}{
"datastore_name": "MyDatastore",
"request_type": "get",
Expand All @@ -285,11 +285,11 @@ func Test_datastoreRequestResultToString(t *testing.T) {
expectedResults: []string{"MyDatastore", "get", "succeeded", "f7d1253f-4066-4b83-8330-a483ff555c20"},
},
"successful datastore request event log with nil payload": {
activty: api.Activity{},
activity: api.Activity{},
expectedResults: []string{"succeeded"},
},
"failed datastore request error log": {
activty: api.Activity{
activity: api.Activity{
Level: "error",
Payload: map[string]interface{}{
"datastore_name": "MyDatastore",
Expand All @@ -301,7 +301,7 @@ func Test_datastoreRequestResultToString(t *testing.T) {
expectedResults: []string{"MyDatastore", "query", "failed", "ValidationException", "f7d1253f-4066-4b83-8330-a483ff555c20"},
},
"failed datastore request without error field": {
activty: api.Activity{
activity: api.Activity{
Level: "error",
Payload: map[string]interface{}{
"datastore_name": "MyDatastore",
Expand All @@ -313,7 +313,7 @@ func Test_datastoreRequestResultToString(t *testing.T) {
},
} {
t.Run(name, func(t *testing.T) {
actualResult := datastoreRequestResultToString(tt.activty)
actualResult := datastoreRequestResultToString(tt.activity)
for _, expectedResult := range tt.expectedResults {
require.Contains(t, actualResult, expectedResult)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/prompts/app_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ func TeamAppSelectPrompt(ctx context.Context, clients *shared.ClientFactory, env
WithMessage("No credentials found for team \"%s\"", selectedDomain)
}

// OrgSelectWorkspacePrompt prompts the user to select a single workspace to grant app access to, or grant all workspaces wihtin the org.
// OrgSelectWorkspacePrompt prompts the user to select a single workspace to grant app access to, or grant all workspaces within the org.
func OrgSelectWorkspacePrompt(ctx context.Context, clients *shared.ClientFactory, orgDomain, token string, topOptionAllWorkspaces bool) (string, error) {
teams, paginationCursor, err := clients.ApiInterface().AuthTeamsList(ctx, token, api.DefaultAuthTeamsListPageSize)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions internal/prompts/app_select_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ var (
Installed: true,
Hosted: true,
}
deployedTeam2UnistalledAppStatus = api.AppStatusResultAppInfo{
deployedTeam2UninstalledAppStatus = api.AppStatusResultAppInfo{
AppID: deployedTeam2UninstalledAppID,
Installed: false,
Hosted: true,
Expand Down Expand Up @@ -1490,7 +1490,7 @@ func TestPrompt_AppSelectPrompt_ShowExpectedLabels(t *testing.T) {
Index: test.selectedTeamIndex,
}, nil)

// On choosed deployed or local
// On chosen deployed or local
clientsMock.IO.On(SelectPrompt, mock.Anything, "Choose an app environment", test.expectedAppLabels, iostreams.MatchPromptConfig(iostreams.SelectPromptConfig{
Flag: clientsMock.Config.Flags.Lookup("app"),
})).Return(iostreams.SelectPromptResponse{
Expand Down Expand Up @@ -1568,7 +1568,7 @@ func TestPrompt_AppSelectPrompt_GetApps(t *testing.T) {
},
mockTeam2Status: api.GetAppStatusResult{
Apps: []api.AppStatusResultAppInfo{
deployedTeam2UnistalledAppStatus,
deployedTeam2UninstalledAppStatus,
localTeam2InstalledAppStatus,
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/slackerror/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (e *Error) recursiveUnwrapWithLimit(maxDepth int) *Error {
// base case
if e.Cause == nil || maxDepth == 0 {
// if we get to an error with no cause then we have the innermost error so we should stop here.
// OR if we have exausted the depth allowed then we should also stop here and return this error
// OR if we have exhausted the depth allowed then we should also stop here and return this error
return e
}

Expand Down
2 changes: 1 addition & 1 deletion internal/update/autoupdate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func verifyFileContainsVersion(file, version string, t *testing.T) {
"expected file %s to contain %s, but instead was '%s'", file, version, strContents)
}

// zip creates a new zip archive at destination containing a singl
// zip creates a new zip archive at destination containing a single
// file at path with the given contents
func zipArchive(files []testFile, destination string, t *testing.T) {
destFile, err := os.OpenFile(destination, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0600)
Expand Down
2 changes: 1 addition & 1 deletion internal/update/cli_autoupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func restoreBinary(updatedBinaryFolderPath string, newPathToOldBinary string, or
// getUpdateFilename returns name of the archive that contains the upgrade for the given version and OS
func getUpdateFileName(version, operatingSys string) (filename string, err error) {
// You can get a list of all possible OS/architecture combinations with `go tool dist list | column -c 75 | column -t`
// TODO: account for architecture as well. M1 macs would have an arch of arm64 instead of the ususal amd64
// TODO: account for architecture as well. M1 macs would have an arch of arm64 instead of the usual amd64
const binaryName = "slack_cli"
const architecture = "64-bit"
switch operatingSys {
Expand Down
Loading