feat: support SLACK_CLI_APP_ICON_PATH env var for icon override#519
Open
feat: support SLACK_CLI_APP_ICON_PATH env var for icon override#519
Conversation
Allow users to override the app icon path via the SLACK_CLI_APP_ICON_PATH environment variable, enabling different icons per environment without changing project files. Priority chain: env var > manifest icon > icon.png in project root. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
==========================================
+ Coverage 71.25% 71.30% +0.04%
==========================================
Files 222 222
Lines 18682 18690 +8
==========================================
+ Hits 13311 13326 +15
+ Misses 4190 4184 -6
+ Partials 1181 1180 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SLACK_CLI_APP_ICON_PATHenvironment variable support to override the app icon path at install/deploy timeSLACK_CLI_APP_ICON_PATHenv var > manifesticonfield >icon.pngin project rootresolveIconPathhelper used by bothInstall()(hosted) andInstallLocalApp()(non-hosted) flowsTest plan
Unit tests
go test ./internal/config/ -run Test_DotEnv— env var loading (set, empty, whitespace trimming)go test ./internal/pkg/apps/ -run Test_resolveIconPath— all 8 priority chain scenariosManual testing
From a Slack app project directory with
assets/icon.png:Baseline — default icon via
slack runConfirm output shows
Updated app icon: assets/icon.pngOverride via env var
export SLACK_CLI_APP_ICON_PATH=icon.png ./bin/slack run -e set-iconConfirm output shows
Updated app icon: icon.pngInvalid env var path falls back
export SLACK_CLI_APP_ICON_PATH=/nonexistent/icon.png ./bin/slack run -e set-iconConfirm warning about file not found and fallback to manifest/default icon
Unset env var restores default
unset SLACK_CLI_APP_ICON_PATH ./bin/slack run -e set-iconConfirm output shows
Updated app icon: assets/icon.png🤖 Generated with Claude Code