-
Notifications
You must be signed in to change notification settings - Fork 505
fix(cli): match Go machine-format encoder output for -o toml/yaml/json (CLI-1975) #6002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Coly010
merged 11 commits into
develop
from
columferry/cli-1975--o-toml-o-yaml-emit-wrong-key-casing-on-struct-payloads-o
Aug 3, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9b583fd
fix(cli): match Go encoder casing for -o toml/yaml and JSON HTML esca…
Coly010 e020a45
fix(cli): match Go yaml timestamp validation and unicode key ordering…
Coly010 a479e84
fix(cli): match Go float32 ties, ns truncation, and inline TOML table…
Coly010 c701b9a
fix(cli): accept comma time fractions and wrap sso toml encode failur…
Coly010 7ca5457
fix(cli): match yaml.v3 comma timestamps, digit sorting, and float ov…
Coly010 b7522fe
Merge remote-tracking branch 'origin/develop' into columferry/cli-197…
Coly010 dddbf6b
fix(cli): wrap numeric key runs like Go int64 in yaml sorting (review…
Coly010 c7968ee
docs(cli): record the toml error-path flush bound (review: codex)
Coly010 95d24f6
refactor(cli): extract tomlOrderedEntries to dedupe sort+partition lo…
Coly010 8c88608
test(cli): add types.gen.go drift check for go-payload specs (CLI-1975)
Coly010 1d72d37
Merge remote-tracking branch 'origin/develop' into columferry/cli-197…
Coly010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
51 changes: 51 additions & 0 deletions
51
apps/cli/src/legacy/commands/branches/branches.go-payload.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import { | ||
| type LegacyGoType, | ||
| legacyGoBool, | ||
| legacyGoFloat32, | ||
| legacyGoInt, | ||
| legacyGoPtr, | ||
| legacyGoSlice, | ||
| legacyGoString, | ||
| legacyGoStruct, | ||
| legacyGoTime, | ||
| legacyGoTomlListWrapper, | ||
| legacyGoUuid, | ||
| } from "../../shared/legacy-go-struct-output.encoders.ts"; | ||
|
|
||
| /** | ||
| * Mirror of Go's `api.BranchResponse` (`apps/cli-go/pkg/api/types.gen.go`) — | ||
| * field order and pointer-ness drive the `-o yaml` / `-o toml` byte shape | ||
| * (CLI-1975). Shared by `branches list`, `branches create`, and | ||
| * `branches update`, which all encode this struct. | ||
| */ | ||
| export const LEGACY_GO_BRANCH_RESPONSE: LegacyGoType = legacyGoStruct([ | ||
|
Coly010 marked this conversation as resolved.
|
||
| ["created_at", legacyGoTime], | ||
| ["deletion_scheduled_at", legacyGoPtr(legacyGoTime)], | ||
| ["git_branch", legacyGoPtr(legacyGoString)], | ||
| ["id", legacyGoUuid], | ||
| ["is_default", legacyGoBool], | ||
| ["latest_check_run_id", legacyGoPtr(legacyGoFloat32)], | ||
| ["name", legacyGoString], | ||
| ["notify_url", legacyGoPtr(legacyGoString)], | ||
| ["parent_project_ref", legacyGoString], | ||
| ["persistent", legacyGoBool], | ||
| ["pr_number", legacyGoPtr(legacyGoInt)], | ||
| ["preview_project_status", legacyGoPtr(legacyGoString)], | ||
| ["project_ref", legacyGoString], | ||
| ["review_requested_at", legacyGoPtr(legacyGoTime)], | ||
| ["status", legacyGoString], | ||
| ["updated_at", legacyGoTime], | ||
| ["with_data", legacyGoBool], | ||
| ]); | ||
|
|
||
| /** `branches list -o yaml` encodes the bare `[]api.BranchResponse`. */ | ||
| export const LEGACY_GO_BRANCHES_LIST: LegacyGoType = legacyGoSlice(LEGACY_GO_BRANCH_RESPONSE); | ||
|
|
||
| /** | ||
| * `branches list -o toml` wraps the slice: | ||
| * `struct{ Branches []api.BranchResponse `toml:"branches"` }`. | ||
| */ | ||
| export const LEGACY_GO_BRANCHES_TOML_WRAPPER: LegacyGoType = legacyGoTomlListWrapper( | ||
| "branches", | ||
| LEGACY_GO_BRANCH_RESPONSE, | ||
| ); | ||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.