Skip to content

gh pr checks should return different exit code for PENDING vs FAILED #7848

@darthwalsh

Description

@darthwalsh

Describe the feature or problem you’d like to solve

Now, gh pr checks fails with exit code 1 if any checks have Failed or are Pending:

From a script, I can't easily tell whether the PR checks have failed, or maybe pass later.

Proposed solution

Document exit code 1 returned if any checks have failed. Return exit code 2 if no checks have failed, but some are pending.

Additional context

Related to #6056 but using exit code is much easier for scripts that JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions