feat: add apps:builds:share command and --share flag on apps:builds:create#178
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for creating public share links for succeeded app builds, both as a standalone command and as an optional post-step during build creation, with consistent URL construction via a shared helper.
Changes:
- Introduces
apps:builds:shareto create (or return) a build share and output either human-readable info or a CI-friendly JSON payload. - Extends
apps:builds:createwith--shareand related flags to automatically create a share after a successful build and include it in JSON output. - Adds service/type plumbing plus a shared URL helper and accompanying Vitest coverage.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/app-build-shares.ts | Adds helper to compute share page and QR code URLs from configured base URLs. |
| src/types/app-build.ts | Adds DTO types for build shares and share creation. |
| src/services/app-builds.ts | Adds createShare API method for build shares. |
| src/index.ts | Registers the new apps:builds:share command. |
| src/commands/apps/builds/share.ts | Implements the new share command including JSON output mode. |
| src/commands/apps/builds/share.test.ts | Adds tests for share command JSON shape, expiry computation, and error cases. |
| src/commands/apps/builds/create.ts | Adds share-related flags and post-success share creation with JSON merge. |
| src/commands/apps/builds/create.test.ts | Adds tests for share-in-JSON output and --share/--detached rejection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What
apps:builds:sharecommand: creates (or returns the existing) public share link for a succeeded build, with--descriptionand--expires-in-daysoptions;--jsonprints{ id, url, qrCodeUrl, expiresAt }for CI usage.--share,--share-description, and--share-expires-in-daysflags onapps:builds:create: creates the share after the build succeeds and merges ashareobject into the JSON output. Rejected when combined with--detached.getAppBuildShareUrlshelper resolving console/API base URLs from config.