Repository navigation
Expose why Laravel Cloud started a deployment - #314
Open
joetannenbaum wants to merge 1 commit into
Open
joetannenbaum wants to merge 1 commit into
joetannenbaum wants to merge 1 commit into
Conversation
The API now returns `trigger` and `trigger_reference` on every deployment: `patch` (and the CVE it fixes) when Laravel Cloud redeployed the current code on a patched image, null when a person or automation started it. The Deployment DTO dropped both, so `--json` and `--fields` couldn't surface them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T1Sq4WiUrLvGeKw2bhP3DT
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.
Exposes why Laravel Cloud started a deployment, which the live Cloud API spec now returns on every deployment.
Findings
DeploymentResource.attributes.triggerDeploymentTrigger | null.patchmeans Laravel Cloud redeployed the environment's current code on an image patched for a security vulnerability (no build, no deploy commands). Null when a person or their automation started the deployment.App\Dto\Deploymenthad no property for it, so--jsonand--fieldscouldn't surface it.DeploymentResource.attributes.trigger_referencestring | null: what a Cloud-started deployment addresses, such as the CVE a patch fixes. Null whentriggeris null.What changed
Deployment::$triggerandDeployment::$triggerReference(?string), mapped fromtrigger/trigger_reference.triggeris a plain string rather than an enum so a value the API adds later doesn't fail the cast.tests/Unit/DeploymentDtoTest.phpcovers both a person-started deployment (both null) and a patch deployment.Human output (
deployment:get's detail list) is unchanged; showing the trigger there is a separate decision. No interactive prompt changed, so there's no demo.Checks
vendor/bin/pest: 853 passed (PromptFallbackTestskipped locally, it hangs in the sandbox;RepoConfigTestrun separately without a token, 14 passed).vendor/bin/phpstan analyse: no errors.vendor/bin/pint: passed.Generated by Claude Code