Commit aab16fa
committed
refactor: merge Install and InstallLocalApp into a single function
The Install (slack deploy) and InstallLocalApp (slack run) functions in
internal/pkg/apps were ~90% identical. Collapse them into one Install
function driven by a dev bool toggle.
- dev switches display name, hosted manifest defaults, persistence
(SaveLocal vs SaveDeployed), IsDev, and env-token handling.
- Drop the dead onlyCreateUpdateAppManifest parameter and its
CreateAppManifestOnly/CreateAppManifestAndInstall constants; nothing
passed CreateAppManifestOnly, so the early-return branch was unreachable.
- Unify accidental gaps: both paths now set EnterpriseID and UserID on
new-app creation inside nil guards (deploy previously left these as
TODOs; local dereferenced UserID unconditionally). Enterprise ID is
also now correctly propagated on the context for the deploy path.
- Return the superset (App, DeveloperAppInstallResult, InstallState,
error); only the dev path consumes the result (socket-mode wiring).
Update the three callers (add.go, run.go, localserver.go) and the
cmd/app func var to the merged signature.1 parent b2ad402 commit aab16fa
6 files changed
Lines changed: 72 additions & 245 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments