Implement config validate/process/pack#1302
Open
z00b wants to merge 1 commit into
Open
Conversation
pete-woods
reviewed
May 13, 2026
| } | ||
|
|
||
| // GetCollaborations returns all orgs the authenticated user is a member of. | ||
| func (c *Client) GetCollaborations(ctx context.Context) ([]Collaboration, error) { |
Contributor
There was a problem hiding this comment.
Pretty surprised it needs this! :D
pete-woods
reviewed
May 13, 2026
| "github.com/CircleCI-Public/circleci-cli/internal/testing/fakes" | ||
| ) | ||
|
|
||
| const testConfigYAML = "version: \"2.1\"\njobs:\n build:\n docker:\n - image: cimg/base:stable\n steps:\n - checkout\n" |
Contributor
There was a problem hiding this comment.
Would recommend a multi line string for readability
Also good to add //language=YAML comment to help IDEs.
Adds `circleci config validate`, `config process`, and `config pack`. Deliberate scope decisions: - v2 REST only (`/compile-config-with-defaults`); v1 GraphQL fallback dropped - `--org-slug`/`--org-id` carried forward for private orb resolution - `--json` on validate only; pack/process output YAML as primary data - Deprecated-image check omitted; API surfaces these natively - `config generate` deferred (external dependency); `config migrate` dropped (legacy 2.0 migration command) Also fixes a flag-shadowing bug: root's `--config/-c` (CLI settings path) and `validate`'s local `--config/-c` (pipeline YAML path) have the same name. `PersistentPreRunE` now reads from `cmd.Root().PersistentFlags()` to avoid picking up the child command's local value. Consolidates packing logic from `orb pack`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> fix(test): make TestCertificateList_NoOrgIDOutsideGit git-version-agnostic Git's "not a git repository" error message differs across versions: older git omits "Stopping at filesystem boundary..." that newer git appends. Replace the golden file comparison with targeted assertions on the parts the CLI owns (the error code and the --org-id suggestion). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Adds
circleci config validate,config process, andconfig pack.Deliberate scope decisions:
/compile-config-with-defaults); v1 GraphQL fallback dropped--org-slug/--org-idcarried forward for private orb resolution--jsonon validate only; pack/process output YAML as primary dataconfig generatedeferred (external dependency);config migratedropped (legacy 2.0 migration command)Also fixes a flag-shadowing bug: root's
--config/-c(CLI settings path) andvalidate's local--config/-c(pipeline YAML path) have the same name.PersistentPreRunEnow reads fromcmd.Root().PersistentFlags()to avoid picking up the child command's local value.