Add --format flag support to rt commands#3456
Merged
Merged
Conversation
2d65caf to
6395942
Compare
vitaliil-jfrog
approved these changes
Apr 29, 2026
fe21cb8 to
5af9d26
Compare
f8e42c5 to
0c88add
Compare
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
0c88add to
b75c5ac
Compare
6d39346 to
946c032
Compare
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
Adds
--formatflag support to severalrtcommands so their output can be machine-consumed (JSON) and, where useful, rendered as a summary table. Behavior without--formatis unchanged.Commands now accepting
--format:rt permission-target-create(ptc)jsonrt permission-target-update(ptu)jsonrt users-create(uc)jsonrt transfer-configjsonrt transfer-config-mergejson,tablert transfer-filesjson,tableImplementation notes:
permission-target-create/permission-target-update: switched fromTemplateConsumerflag set to dedicatedPermissionTargetCreate/PermissionTargetUpdatekeys so the new--formatflag is actually wired in (fix in commit946c0320).{"status_code":200,"message":"OK"}payload is emitted viacliutils.FormatHTTPResponseJSONon success.transfer-config-mergeandtransfer-filesget richer structured output: atransferConfigMergeResult/transferFilesResultstruct rendered as either JSON or atabwritersummary table.permission-target-create-format,permission-target-update-format,transfer-config-format,transfer-config-merge-format,transfer-files-format,users-create-format) registered inutils/cliutils/commandsflags.go.Tests:
artifactory/cli_test.go: +509 lines covering format parsing, JSON/table rendering, error propagation, and unsupported-format handling for the affected commands.Dependencies:
jfrog-cli-artifactoryto0.8.1-0.20260512080921-ec417dc1b7ee.jfrog-client-goto1.55.1-0.20260508101905-a17af78a38d7.Files changed:
artifactory/cli.go,artifactory/cli_test.go,utils/cliutils/commandsflags.go,go.mod,go.sum.masterbranch.go vet ./....go fmt ./....