Skip to content

Add an example to gh api --help demonstrating usage of --input #9104

@williammartin

Description

@williammartin

Description

As mentioned in #8983, when it becomes challenging to use -f and -F to construct the exact JSON request body for gh api, the best option is to fallback to constructing JSON externally and to pass that via the --input flag.

#8983 (comment) suggests that we add to the example section of gh api --help to make this more obvious, and that seems like a great idea. The code to change is here:

Example: heredoc.Doc(`

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsgh-apirelating to the gh api command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions