Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #367 +/- ##
==========================================
+ Coverage 65.06% 65.11% +0.04%
==========================================
Files 215 215
Lines 18179 18144 -35
==========================================
- Hits 11829 11815 -14
+ Misses 5254 5235 -19
+ Partials 1096 1094 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
Comments for the reviewers eyes
| switch event.Name { | ||
| case "app_install_manifest": | ||
| // Ignore this event and format manifest outputs in create/update events | ||
| case "app_install_manifest_create": |
There was a problem hiding this comment.
note: You can search for any of the following event names to see that the output is now display where the event was previous broadcast:
app_install_manifest_createapp_install_manifest_updateapp_install_startapp_install_icon_successapp_install_icon_errorapp_install_complete
| } | ||
| log.Data["teamName"] = *authSession.TeamName | ||
|
|
||
| log.Info("on_apps_add_init") |
There was a problem hiding this comment.
note: This event name was broadcast but never subscribed anywhere 🤦🏻
| } | ||
|
|
||
| // addAppLocally will add the app to the project's apps file with an empty AppID, TeamID, etc | ||
| func addAppLocally(ctx context.Context, clients *shared.ClientFactory, log *logger.Logger, app types.App) (types.App, error) { |
There was a problem hiding this comment.
note: diff doesn't show that log *logger.Logger was removed.
|
|
||
| // addAppLocally will add the app to the project's apps file with an empty AppID, TeamID, etc | ||
| func addAppLocally(ctx context.Context, clients *shared.ClientFactory, log *logger.Logger, app types.App) (types.App, error) { | ||
| log.Info("on_apps_add_local") |
There was a problem hiding this comment.
note: Another event that was broadcast with no subscribers.
| return installState, types.App{}, slackerror.Wrap(err, slackerror.ErrAppAdd) | ||
| } | ||
|
|
||
| log.Info("on_apps_add_remote_success") |
There was a problem hiding this comment.
note: another event that was broadcast with no subscribers 😿
internal/pkg/apps/install.go
Outdated
| clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{ | ||
| Emoji: "books", | ||
| Text: "App Manifest", | ||
| Secondary: []string{ | ||
| fmt.Sprintf(`Updated app manifest for "%s" in "%s"`, slackManifest.DisplayInformation.Name, *authSession.TeamName), | ||
| }, | ||
| })) |
There was a problem hiding this comment.
note: Example of replacing the event broadcast with the actual output.
| appManageURL := fmt.Sprintf("%s/apps", apiInterface.Host()) | ||
| log.Data["appURL"] = fmt.Sprintf("%s%s", appManageURL, app.AppID) | ||
| log.Data["appName"] = manifest.DisplayInformation.Name |
There was a problem hiding this comment.
note: appURL was never output anywhere.
| _, _ = clients.IO.WriteOut().Write([]byte("\n" + style.Sectionf(style.TextSection{ | ||
| Emoji: "books", | ||
| Text: "App Manifest", | ||
| Secondary: []string{ | ||
| fmt.Sprintf(`Updated app manifest for "%s" in "%s"`, slackManifest.DisplayInformation.Name, *authSession.TeamName), | ||
| }, | ||
| }))) |
There was a problem hiding this comment.
note: I'm using the identical clients.IO.WriteOut() syntax from cmd/ to avoid introducing formatting issues. The clients.IO.PrintInfo inserts newlines after the output, causing issues.
Changelog
Summary
This pull request is part 3 of removing internal/logger package and is focused on the the
installcommand.Test Steps
Requirements