• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mindersec / minder / 38629092471
65%

Build:
DEFAULT BRANCH: main
Ran 14 Oct 2026 08:21PM UTC
Jobs 1
Files 359
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Oct 2026 08:05PM UTC coverage: 64.026% (+0.01%) from 64.012%
38629092471

push

github

web-flow
fix(cli): route structured output to stdout across commands (#6879) (#6883)

* fix(cli): route structured output to stdout across commands (#6879)

Cobra commands write to OutOrStderr by default when cmd.Println or
cmd.Print is called without explicit stdout configuration on RootCmd.
This caused JSON and YAML output across multiple commands to be routed
to stderr rather than stdout, breaking shell pipelines such as
'minder project list -o json | jq .'.

This change fixes the issue by:
1. Setting RootCmd.SetOut(os.Stdout) in root command init so Cobra defaults
   all command output streams to stdout.
2. Introducing reusable cli.PrintProto and cli.PrintMultiProtoYAML helpers
   in internal/util/cli that write formatted JSON/YAML directly to
   cmd.OutOrStdout().
3. Refactoring subcommands across artifact, datasource, entity, history,
   profile, project, provider, repo, and ruletype packages to use
   cli.PrintProto.
4. Adding unit test coverage for PrintProto and PrintMultiProtoYAML.

Fixes #6879

* fix(cli): address review feedback on stdout routing

- Drop RootCmd.SetOut(os.Stdout) to avoid changing default stream
  for non-converted call sites.
- Wrap long lines in role_grant.go and role_update.go to stay
  under 130-character limit.
- Document PrintProto format string matching avoiding import cycle.

27 of 33 new or added lines in 2 files covered. (81.82%)

22630 of 35345 relevant lines covered (64.03%)

53.3 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
77.78
internal/util/cli/print.go
Jobs
ID Job ID Ran Files Coverage
1 38629092471.1 14 Oct 2026 08:21PM UTC 359
64.03
GitHub Action Run
Source Files on build 38629092471
  • Tree
  • List 359
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38629092471
  • 98e7ecda on github
  • Prev Build on main (#38476796661)
  • Next Build on main (#38690796220)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc