feat: add JSON output support to 18 commands for agent automation

Summary

Add --output/-F flag with JSON support to improve agent/automation integration across 18 commands.

Changes

Adds JSON output support to the following commands:

  • Release: list, view
  • CI: status
  • Planning: milestone list/get, schedule list
  • Code review: mr approvers
  • Analytics: repo contributors, label get
  • Security: deploy-key, ssh-key, gpg-key (list/get)
  • Infrastructure: cluster agent list/token list, opentofu state list

Implementation

All commands follow a consistent pattern:

  • Flag: --output/-F with values "text" (default) or "json"
  • Output: Direct API responses (gitlab.* types) via PrintJSON()
  • Testing: Comprehensive test coverage for all implementations

Test Results

  • All 2,798 tests passing
  • 18 new JSON tests added
  • Build successful

Closes #8177

Merge request reports

Loading