Skip to content

Allow for standardized output format #385

@dfockler

Description

@dfockler

Describe the feature or problem you’d like to solve

I think having a way to output the results of the CLI comands to JSON or some other standardized output format would be a nice way to let users extend functionality without having to change the CLI code very much.

Proposed solution

Something like

$ gh pr status 123 --output=json
{"id": 123, "title": "Some cool PR", "branch": "my-cool-branch", "description": "some .md description", "checks_passing": true, "requires_review": false}

Users could then easily parse this and perform other actions using the data.

Additional context

My initial thought was using this to be able to automatically open the issue I'm working on in JIRA by extracting the JIRA tag number from our titles, but it could also be useful for other workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions