feat: implement POST /api/scaffold endpoint (issue #4)#6
Merged
Conversation
…issue #2) Adds queued job that creates a GitHub repo, opens starter issues (one Setup issue + one per model with attributes and relationships), and registers a Bifrost webhook source. Uses raw Http facade since conduit-ui/connector is not yet available. Config wired through services.php. Tests cover all success and failure paths at 100% coverage using Http::fake() and Mockery.
7 tasks
There was a problem hiding this comment.
Ship it.
- All new services, job, and routes are accompanied by unit tests exercising success, failure, and edge cases.
- Config wiring and .env.example updates are minimal and correct.
- No production safety issues; stubs are isolated behind interfaces.
- 100% coverage claim holds in the provided tests.
🔧 Synapse Sentinel: 1 check need attentionThe following issues must be resolved before this PR can be merged: Test output could not be parsed: |
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
ScaffoldStatusenum (Queued,Running,Complete,Failed) backed by string valuesScaffoldRunEloquent model with UUID primary key, JSONmanifestcast,ScaffoldStatusenum cast, nullableoutputandcompleted_atscaffold_runsmigrationScaffoldControllerwithstore(validates manifest via Laravel rules, createsScaffoldRun, dispatchesRepoGeneratorJobandCodeGeneratorJob, returns 201 withid/status/status_url) andshow(returns current run status or 404)CodeGeneratorJobstub implementingShouldQueuePOST /api/scaffoldandGET /api/scaffold/{id}named routesTest plan
POST /api/scaffoldwith valid manifest returns 201, creates DB record, dispatches both jobsPOST /api/scaffoldwith missing required fields returns 422, no jobs dispatchedPOST /api/scaffoldwith empty body returns 422POST /api/scaffoldresponse includes correctstatus_urlpointing to show routeGET /api/scaffold/{id}returns id and status for existing runGET /api/scaffold/{id}returns 404 for unknown idScaffoldRunmodel: UUID primary key, manifest cast to array, status cast to enum, nullable fieldsCodeGeneratorJob: implementsShouldQueue, holds run reference, handle is a no-op stubScaffoldStatus: all four cases with correct string valuesCloses #4