Skip to content

Commit 14c811f

Browse files
authored
Merge branch 'main' into ale-icon-assets-fallback
2 parents c9abb30 + 783ac1a commit 14c811f

12 files changed

Lines changed: 230 additions & 61 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ There are more details about processes and workflow in the
8383
[commits]: https://www.conventionalcommits.org/en/v1.0.0/
8484
[conduct]: https://slackhq.github.io/code-of-conduct
8585
[empathy]: https://slack.engineering/on-empathy-pull-requests-979e4257d158#.awxtvmb2z
86-
[issues]: /issues/new
86+
[issues]: https://github.com/slackapi/slack-cli/issues/new/choose
8787
[maintainers]: ./MAINTAINERS_GUIDE.md

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Thanks for stopping by! You're awesome :sunglasses:
5757
[dev]: https://github.com/slackapi/slack-cli/releases/tag/dev-build
5858
[enhancements]: https://github.com/slackapi/slack-cli/pulls
5959
[install]: https://docs.slack.dev/tools/slack-cli/guides/installing-the-slack-cli-for-mac-and-linux
60-
[issues]: https://github.com/slackapi/slack-cli/issues/new?template=04_bug.md
60+
[issues]: https://github.com/slackapi/slack-cli/issues/new?template=01-bug.yml
6161
[maintainers]: .github/MAINTAINERS_GUIDE.md
6262
[releases]: https://github.com/slackapi/slack-cli/releases
63-
[suggestions]: https://github.com/slackapi/slack-cli/issues/new?template=02_enhancement.md
63+
[suggestions]: https://github.com/slackapi/slack-cli/issues/new?template=02-feature.yml

cmd/project/create_template.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ func getAdapterOptions(framework string) []promptObject {
168168
func getSelectionOptionsForCategory(clients *shared.ClientFactory) []promptObject {
169169
return []promptObject{
170170
{
171-
Title: fmt.Sprintf("Starter app %s", style.Secondary("Getting started Slack app")),
171+
Title: fmt.Sprintf("Starter App %s", style.Secondary("Getting started Slack app")),
172172
Repository: "slack-cli#getting-started",
173173
},
174174
{
175-
Title: fmt.Sprintf("AI Agent app %s", style.Secondary("Slack agents and assistants")),
175+
Title: fmt.Sprintf("AI Agent App %s", style.Secondary("Slack agents and assistants")),
176176
Repository: "slack-cli#ai-apps",
177177
},
178178
{
179-
Title: fmt.Sprintf("Automation app %s", style.Secondary("Custom steps and workflows")),
179+
Title: fmt.Sprintf("Automation App %s", style.Secondary("Custom steps and workflows")),
180180
Repository: "slack-cli#automation-apps",
181181
},
182182
{

cmd/sandbox/list.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ func printSandboxes(cmd *cobra.Command, clients *shared.ClientFactory, token str
116116
clients.IO.PrintInfo(ctx, false, " %s", style.Secondary(fmt.Sprintf("URL: https://%s.slack.com", s.Domain)))
117117
}
118118

119+
if s.IsPartner {
120+
clients.IO.PrintInfo(ctx, false, " %s", style.Secondary("Type: Partner"))
121+
}
122+
119123
if s.Status != "" {
120124
status := style.Secondary(fmt.Sprintf("Status: %s", strings.ToTitle(s.Status)))
121125
if strings.EqualFold(s.Status, "archived") {

cmd/sandbox/list_test.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"github.com/slackapi/slack-cli/internal/shared/types"
2525
"github.com/slackapi/slack-cli/test/testutil"
2626
"github.com/spf13/cobra"
27+
"github.com/stretchr/testify/assert"
2728
"github.com/stretchr/testify/mock"
2829
)
2930

@@ -76,6 +77,7 @@ func TestListCommand(t *testing.T) {
7677
ExpectedStdoutOutputs: []string{"my-sandbox", "T123", "https://my-sandbox.slack.com", "Status: ACTIVE"},
7778
ExpectedAsserts: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock) {
7879
cm.API.AssertCalled(t, "ListSandboxes", mock.Anything, "xoxb-test-token", "")
80+
assert.NotContains(t, cm.GetStdoutOutput(), "Type:")
7981
},
8082
},
8183
"with archived sandbox": {
@@ -107,6 +109,42 @@ func TestListCommand(t *testing.T) {
107109
cm.API.AssertCalled(t, "ListSandboxes", mock.Anything, "xoxb-test-token", "")
108110
},
109111
},
112+
"with partner sandbox shows type for all sandboxes": {
113+
CmdArgs: []string{"--experiment=sandboxes", "--token", "xoxb-test-token"},
114+
Setup: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock, cf *shared.ClientFactory) {
115+
testToken := "xoxb-test-token"
116+
cm.Auth.On("AuthWithToken", mock.Anything, testToken).Return(types.SlackAuth{Token: testToken}, nil)
117+
cm.Auth.On("ResolveAPIHost", mock.Anything, mock.Anything, mock.Anything).Return("https://api.slack.com")
118+
cm.Auth.On("ResolveLogstashHost", mock.Anything, mock.Anything, mock.Anything).Return("https://slackb.com/events/cli")
119+
sandboxes := []types.Sandbox{
120+
{
121+
TeamID: "T123",
122+
Name: "regular-sandbox",
123+
Domain: "regular-sandbox",
124+
Status: "active",
125+
DateCreated: 1700000000,
126+
},
127+
{
128+
TeamID: "T789",
129+
Name: "partner-sandbox",
130+
Domain: "partner-sandbox",
131+
Status: "active",
132+
DateCreated: 1700000000,
133+
IsPartner: true,
134+
},
135+
}
136+
cm.API.On("ListSandboxes", mock.Anything, testToken, "").Return(sandboxes, nil)
137+
cm.API.On("UsersInfo", mock.Anything, mock.Anything, mock.Anything).Return(&types.UserInfo{Profile: types.UserProfile{}}, nil)
138+
139+
cm.AddDefaultMocks()
140+
cm.Config.ExperimentsFlag = []string{string(experiment.Sandboxes)}
141+
cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug)
142+
},
143+
ExpectedStdoutOutputs: []string{"regular-sandbox", "partner-sandbox", "Type: Partner"},
144+
ExpectedAsserts: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock) {
145+
cm.API.AssertCalled(t, "ListSandboxes", mock.Anything, "xoxb-test-token", "")
146+
},
147+
},
110148
"with status": {
111149
CmdArgs: []string{"--experiment=sandboxes", "--token", "xoxb-test-token", "--status", "active"},
112150
Setup: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock, cf *shared.ClientFactory) {

go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,26 +112,26 @@ require (
112112
github.com/avast/retry-go/v4 v4.7.0 // indirect
113113
github.com/aws/aws-sdk-go-v2 v1.41.5 // indirect
114114
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect
115-
github.com/aws/aws-sdk-go-v2/config v1.32.11 // indirect
116-
github.com/aws/aws-sdk-go-v2/credentials v1.19.11 // indirect
117-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.19 // indirect
115+
github.com/aws/aws-sdk-go-v2/config v1.32.12 // indirect
116+
github.com/aws/aws-sdk-go-v2/credentials v1.19.12 // indirect
117+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.20 // indirect
118118
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.16 // indirect
119119
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect
120120
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect
121-
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.5 // indirect
121+
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 // indirect
122122
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 // indirect
123123
github.com/aws/aws-sdk-go-v2/service/ecr v1.56.0 // indirect
124124
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.38.11 // indirect
125125
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 // indirect
126126
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect
127127
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 // indirect
128128
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect
129-
github.com/aws/aws-sdk-go-v2/service/kms v1.50.1 // indirect
129+
github.com/aws/aws-sdk-go-v2/service/kms v1.50.3 // indirect
130130
github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0 // indirect
131-
github.com/aws/aws-sdk-go-v2/service/signin v1.0.7 // indirect
132-
github.com/aws/aws-sdk-go-v2/service/sso v1.30.12 // indirect
133-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.16 // indirect
134-
github.com/aws/aws-sdk-go-v2/service/sts v1.41.8 // indirect
131+
github.com/aws/aws-sdk-go-v2/service/signin v1.0.8 // indirect
132+
github.com/aws/aws-sdk-go-v2/service/sso v1.30.13 // indirect
133+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.17 // indirect
134+
github.com/aws/aws-sdk-go-v2/service/sts v1.41.9 // indirect
135135
github.com/aws/smithy-go v1.24.2 // indirect
136136
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.12.0 // indirect
137137
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
@@ -216,7 +216,7 @@ require (
216216
github.com/firefart/nonamedreturns v1.0.6 // indirect
217217
github.com/fsnotify/fsnotify v1.9.0 // indirect
218218
github.com/fzipp/gocyclo v0.6.0 // indirect
219-
github.com/gabriel-vasile/mimetype v1.4.12 // indirect
219+
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
220220
github.com/ghostiam/protogetter v0.3.20 // indirect
221221
github.com/github/smimesign v0.2.0 // indirect
222222
github.com/go-critic/go-critic v0.14.3 // indirect
@@ -233,7 +233,7 @@ require (
233233
github.com/go-openapi/loads v0.23.3 // indirect
234234
github.com/go-openapi/runtime v0.29.3 // indirect
235235
github.com/go-openapi/spec v0.22.4 // indirect
236-
github.com/go-openapi/strfmt v0.26.0 // indirect
236+
github.com/go-openapi/strfmt v0.26.1 // indirect
237237
github.com/go-openapi/swag v0.25.5 // indirect
238238
github.com/go-openapi/swag/cmdutils v0.25.5 // indirect
239239
github.com/go-openapi/swag/conv v0.25.5 // indirect
@@ -284,8 +284,8 @@ require (
284284
github.com/google/rpmpack v0.7.1 // indirect
285285
github.com/google/s2a-go v0.1.9 // indirect
286286
github.com/google/wire v0.7.0 // indirect
287-
github.com/googleapis/enterprise-certificate-proxy v0.3.12 // indirect
288-
github.com/googleapis/gax-go/v2 v2.17.0 // indirect
287+
github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect
288+
github.com/googleapis/gax-go/v2 v2.19.0 // indirect
289289
github.com/gordonklaus/ineffassign v0.2.0 // indirect
290290
github.com/goreleaser/chglog v0.7.4 // indirect
291291
github.com/goreleaser/fileglob v1.4.0 // indirect
@@ -426,7 +426,7 @@ require (
426426
github.com/sigstore/rekor-tiles/v2 v2.2.1 // indirect
427427
github.com/sigstore/sigstore v1.10.5 // indirect
428428
github.com/sigstore/sigstore-go v1.1.4 // indirect
429-
github.com/sigstore/timestamp-authority/v2 v2.0.5 // indirect
429+
github.com/sigstore/timestamp-authority/v2 v2.0.6 // indirect
430430
github.com/sirupsen/logrus v1.9.4 // indirect
431431
github.com/sivchari/containedctx v1.0.3 // indirect
432432
github.com/skeema/knownhosts v1.3.2 // indirect
@@ -494,8 +494,8 @@ require (
494494
golang.org/x/time v0.15.0 // indirect
495495
golang.org/x/tools v0.44.0 // indirect
496496
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
497-
google.golang.org/api v0.269.0 // indirect
498-
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect
497+
google.golang.org/api v0.272.0 // indirect
498+
google.golang.org/genproto v0.0.0-20260316180232-0b37fe3546d5 // indirect
499499
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect
500500
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
501501
google.golang.org/grpc v1.80.0 // indirect

0 commit comments

Comments
 (0)