Open
Conversation
Allow users to specify an icon path in .slack/config.json as an alternative to the manifest icon field. Resolution order is: manifest > config.json > icon.png in project root. Also migrates tests to use AddDefaultMocks() for ProjectConfigMock instead of manually setting up each mock method.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #514 +/- ##
==========================================
+ Coverage 71.17% 71.27% +0.09%
==========================================
Files 222 222
Lines 18678 18704 +26
==========================================
+ Hits 13294 13331 +37
+ Misses 4201 4191 -10
+ Partials 1183 1182 -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
iconfield to.slack/config.jsonso users can specify an icon path without modifying their app manifesticonfield >config.jsoniconfield >icon.pngin project rootGetIconPath/SetIconPathtoProjectConfigManagerinterface following the same patterns asGetProjectID/SetProjectIDadd_test.goandinstall_test.goto useAddDefaultMocks()instead of manually duplicating mock setup forProjectConfigMockExample config.json
{ "icon": "assets/icon.png", "project_id": "abc-123" }Test plan
Unit tests
Manual testing
1. Build the branch
git fetch origin ale-icon-config git checkout ale-icon-config go build -o bin/slack .2. Set up a test app (or use an existing bolt app)
3. Add an icon to config.json
Place an image file somewhere in the project (e.g.
assets/icon.png), then add the path to.slack/config.json:{ "icon": "assets/icon.png", "project_id": "..." }4. Run with the set-icon experiment
Verify you see
Updated app icon: assets/icon.pngin the output.5. Verify manifest takes precedence over config.json
Set
iconin both the manifest (slack.yaml/manifest.ts) andconfig.jsonwith different paths. Run again — the manifest path should be used.6. Verify fallback to project root
Remove
iconfrom both manifest and config.json. Placeicon.pngin the project root. Run again — should pick upicon.png.