Skip to content

pr checks --watch reports all checks as completed, even when they aren't #7604

Description

@marekdedic

Describe the bug

The pr checks --watch command doesn't list and wait for all checks when there are 2 sets (e.g. one on "push" and another one on "pull_request") - it only waits for 1 set. I think this used to work correctly when --watch was first implemented (I am the author of the original feature request for that flag).

❯ gh --version
gh version 2.30.0 (2023-05-30)
https://github.com/cli/cli/releases/tag/v2.30.0

Steps to reproduce the behavior

  1. Have a repo with CI set to
    on:
      push:
        branches: "*"
      pull_request:
  2. Create a PR
  3. Have the "push" checks finish before the "pull_request" checks
  4. Run gh pr checks --watch
  5. The CLI reports all checks as finished, but the "pull_request" ones aren't - e.g. can't do gh pr merge (if the checks are required)

Expected vs actual behavior

Expected: The command will wait for all check to finish

Actual: The command only waits for one set of checks to finish

Logs

Example PR: skaut/skaut-google-drive-gallery#2037

❯ gh pr checks --watch
All checks were successful
0 failing, 6 successful, 0 skipped, and 0 pending checks

✓  Build               2m8s   https://github.com/skaut/skaut-google-drive-gallery/actions/runs/5325655157/jobs/9646625675
✓  Lint                2m26s  https://github.com/skaut/skaut-google-drive-gallery/actions/runs/5325655004/jobs/9646752460
✓  PHP 5.6 compati...  14s    https://github.com/skaut/skaut-google-drive-gallery/actions/runs/5325655157/jobs/9646625445
✓  Test                2m4s   https://github.com/skaut/skaut-google-drive-gallery/actions/runs/5325655004/jobs/9646752718
✓  codecov/patch              https://app.codecov.io/gh/skaut/skaut-google-drive-gallery/pull/2037
✓  codecov/project            https://app.codecov.io/gh/skaut/skaut-google-drive-gallery/pull/2037

Activity

  1. samcoe commented on Jun 23, 2023

    @samcoe
    Contributor

    @marekdedic Thanks for writing in, you are indeed correct that we are being overzealous in our elimination of duplicate checks and we should relax that so this does not happen.

  2. added
    priority-3Affects a small number of users or is largely cosmetic
    priority-2Affects more than a few users but doesn't prevent core functions
    coreThis issue is not accepting PRs from outside contributors
    and removed
    priority-3Affects a small number of users or is largely cosmetic
    on Jun 23, 2023
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

    bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorspriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions