Skip to content

feat(create): fetch remote manifest after linking app during create#585

Open
srtaalej wants to merge 9 commits into
mainfrom
ale-fetch-remote-manifest
Open

feat(create): fetch remote manifest after linking app during create#585
srtaalej wants to merge 9 commits into
mainfrom
ale-fetch-remote-manifest

Conversation

@srtaalej

@srtaalej srtaalej commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Changelog

slack create --app now fetches the app's manifest from remote settings and writes it to the project's manifest.json, replacing the template's generic manifest with the actual app configuration.

Summary

Follow-up to #565. After linking an existing app during slack create --app --template, the CLI now fetches the remote manifest from App Settings and overwrites the template's manifest.json with it.

This also updates LinkExistingApp to return (*types.SlackAuth, error) so callers can use the auth token for subsequent API calls (like manifest fetching).

Design decisions:

  • Manifest source remains local in .slack/config.json — the remote content is written locally
  • Only manifest.json is overwritten (not manifest.ts/.js which are code files in Deno projects)
  • On fetch failure, a warning is printed and the command continues — the project and link still succeed

Testing

make test testdir=cmd/project testname=TestCreateCommand_AppFlag_FetchesRemoteManifest
make test testdir=cmd/project testname=TestCreateCommand_AppFlag
make test testdir=cmd/project testname=Test_Project_InitCommand
make test testdir=cmd/app testname=TestLinkCommand

Manual:

  1. make build
  2. ./bin/slack create my-test -t slack-samples/bolt-js-starter-template --app <real-app-id> --environment local
  3. Verify my-test/manifest.json contains the remote app's manifest
  4. Test with an invalid app ID to confirm the warning is shown and the project is still created

Notes 🔴

  • Open question: should we set manifest.source to remote in .slack/config.json after writing the fetched manifest? Currently left as local so the user "owns" the file going forward.

A future PR could add merging logic between template and remote manifests.

  • manifest.ts/.js (Deno SDK) projects are not supported

Requirements

@srtaalej srtaalej self-assigned this Jun 9, 2026
@srtaalej srtaalej requested a review from a team as a code owner June 9, 2026 00:27
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes semver:minor Use on pull requests to describe the release version increment labels Jun 9, 2026
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.47059% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.70%. Comparing base (e37243b) to head (6d6749a).

Files with missing lines Patch % Lines
cmd/project/create.go 80.48% 4 Missing and 4 partials ⚠️
cmd/app/link.go 55.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #585      +/-   ##
==========================================
+ Coverage   71.64%   71.70%   +0.06%     
==========================================
  Files         226      226              
  Lines       19148    19189      +41     
==========================================
+ Hits        13718    13759      +41     
+ Misses       4221     4219       -2     
- Partials     1209     1211       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant