Skip to content

docs: add JSON fields section to commands with --json flag #129

@q-soriarty

Description

@q-soriarty

Problem

The gh CLI manual has a dedicated "JSON Fields" section listing all available fields for commands that support --json. Our manual only mentions --json in the Options section without listing available fields.

gh CLI (issue list):

### JSON Fields

assignees, author, body, closed, closedAt, comments, createdAt, ...

Copia CLI: No dedicated section — fields only listed in --json flag description.

Fix

Add a "JSON Fields" section to the generated docs for commands that have --json flag. The field list can be extracted from the validJSONFields variable in each command.

Affected commands

All commands with --json support: repo list, repo view, issue list, issue view, pr list, pr view, release list, label list, notification list, search repos, search issues.

Reference

https://cli.github.com/manual/gh_issue_list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions