Skip to content

Add --fail-fast to gh run watch #14403

Description

@nertzy

gh run watch currently waits for a workflow run to finish, even when a job has already failed and other jobs are still running. When watching for a successful result, it would be useful to return as soon as failure is known.

Please consider adding --fail-fast, similar to the existing option on gh pr checks --watch.

Proposed behavior:

  • Stop watching as soon as a job in the selected run fails, including when a failed job is detected on the initial check.
  • Stop only the local watcher; do not cancel the workflow or its remaining jobs.
  • Preserve --exit-status as the control for returning a nonzero exit code on failure. With --fail-fast --exit-status, exit nonzero when the failed job is detected.
  • Leave existing behavior unchanged when --fail-fast is omitted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-runrelating to the gh run command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions