-
Notifications
You must be signed in to change notification settings - Fork 32
feat: 'env' command no longer prompts for an app for Bolt projects #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| package env | ||
|
|
||
| import ( | ||
| "context" | ||
| "strings" | ||
|
|
||
| "github.com/slackapi/slack-cli/internal/prompts" | ||
|
|
@@ -72,3 +73,16 @@ func NewCommand(clients *shared.ClientFactory) *cobra.Command { | |
|
|
||
| return cmd | ||
| } | ||
|
|
||
| // isHostedRuntime returns true if the local manifest is for an app that uses | ||
| // the Deno Slack SDK function runtime. | ||
| // | ||
| // It defaults to false when the manifest cannot be fetched, which directs the | ||
| // command to use the project ".env" file. Otherwise the API is used. | ||
| func isHostedRuntime(ctx context.Context, clients *shared.ClientFactory) bool { | ||
| manifest, err := clients.AppClient().Manifest.GetManifestLocal(ctx, clients.SDKConfig, clients.HookExecutor) | ||
| if err != nil { | ||
| return false | ||
| } | ||
| return manifest.IsFunctionRuntimeSlackHosted() || manifest.IsFunctionRuntimeLocal() | ||
| } | ||
|
Comment on lines
+77
to
+88
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔭 note: I'm not thrilled with the placement of this logic but we might want to keep it scoped to the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised we don't have a helper function already, but I agree let's just scope it to |
||
Uh oh!
There was an error while loading. Please reload this page.