Repository navigation
refactor!: read stack hooks from the hooks field - #481
Merged
Merged
Conversation
- stack list and stack show select the hooks object instead of the ten deprecated top-level hook fields they read today - the shurcooL fork nests a selection only for a named field, so the JSON output nests with it BREAKING CHANGE: spacectl stack show --output json and spacectl stack list --output json move the hook script lists from top-level keys into a hooks object. Anything reading afterApply, beforePlan and the rest at the top level has to read them under hooks instead.
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
ad7772a < |
2026-08-27 09:35 UTC | 0 | 0 | 0 |
Last scanned: ad7772a · 2026-08-27 09:35 UTC
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
ad7772a < |
2026-08-27 09:35 UTC | 0 | 0 | 0 |
Last scanned: ad7772a · 2026-08-27 09:35 UTC
sephriot
marked this pull request as ready for review
August 27, 2026 09:44
tomasmik
approved these changes
Aug 27, 2026
1 task
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.
Description
stack listandstack showread the stack hook scripts from ten fields the API marks as deprecated. This reads them from the current field instead, which nests them, and the JSON output nests with them.This is a potential breaking change if someone is parsing this output
Maybe we are ok with this, maybe not, I'd prefer the repository owner to decide.
Type of Change
Changes Made
Both commands now request the hook scripts from the field the API points at, rather than the ten deprecated ones.
Table output is unchanged.
JSON output changes shape. Before and after, for a stack with one after-apply script:
Why the output has to move
The GraphQL client builds the request from the Go struct and serialises the same struct to JSON, so nesting one nests the other. Keeping the flat JSON is possible but needs a hand-written marshaller.
Testing
Screenshots (if applicable)
N/A
Related Issues
N/A