Skip to content

Proposal: add a --compact flag to gh run watch #4535

@ncw

Description

@ncw

Describe the feature or problem you’d like to solve

When using gh watch on large projects with more than a few jobs and steps the list of jobs goes off the top of the screen.

Proposed solution

I'd like to propose a --compact flag which only shows the current step of each job, rather than all the past and future steps.

Additional context

Currently the output looks like this when I do an rclone build. This is 200 lines long and nowhere near fits on the largest terminal.

Refreshing run status every 3 seconds. Press Ctrl+C to quit.

- test build #3111 · 1346339921
Triggered via push about 7 minutes ago

JOBS
- android-all (ID 3907194786)
  ✓ Set up job
  ✓ Checkout
  ✓ Set up Go 1.16
  ✓ Force NDK version
  ✓ Go module cache
  ✓ Set global environment variables
  ✓ build native rclone
  ✓ install gomobile
  ✓ arm-v7a gomobile build
  ✓ arm-v7a Set environment variables
  ✓ arm-v7a build
  ✓ arm64-v8a Set environment variables
  ✓ arm64-v8a build
  ✓ x86 Set environment variables
  ✓ x86 build
  ✓ x64 Set environment variables
  ✓ x64 build
  - Upload artifacts
  - Post Go module cache
  - Post Checkout
X lint in 1m29s (ID 3907194927)
  ✓ Set up job
  ✓ Checkout
  X Code quality test
  ✓ Post Code quality test
  ✓ Post Checkout
  ✓ Complete job
- linux (ID 3907195090)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  - Race test
  - Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout
- mac_amd64 (ID 3907195150)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  - Race test
  - Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout
✓ mac_arm64 in 3m56s (ID 3907195227)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  ✓ Race test
  ✓ Run librclone tests
  ✓ Compile all architectures test
  ✓ Deploy built binaries
  ✓ Post Go module cache
  ✓ Post Checkout
  ✓ Complete job
- windows_amd64 (ID 3907195293)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  - Race test
  - Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout
- windows_386 (ID 3907195369)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  - Run tests
  - Race test
  - Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout
- other_os (ID 3907195431)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  ✓ Race test
  ✓ Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout
- go1.14 (ID 3907195496)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  - Race test
  - Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout
- go1.15 (ID 3907195576)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  - Race test
  - Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout
- go1.16 (ID 3907195648)
  ✓ Set up job
  ✓ Checkout
  ✓ Install Go
  ✓ Set environment variables
  ✓ Install Libraries on Linux
  ✓ Install Libraries on macOS
  ✓ Install Libraries on Windows
  ✓ Print Go version and environment
  ✓ Go module cache
  ✓ Build rclone
  ✓ Run tests
  - Race test
  - Run librclone tests
  - Compile all architectures test
  - Deploy built binaries
  - Post Go module cache
  - Post Checkout

ANNOTATIONS
X golangci-lint exit with code 4

I'd propose that it be shortened to this with the --compact flag, where what is showing is the current step only, or if it has finished, the first failing step, otherwise the last step.

This is only 31 lines long, conveys all the important detail and would fit on my terminal just fine!

Refreshing run status every 3 seconds. Press Ctrl+C to quit.

- test build #3111 · 1346339921
Triggered via push about 7 minutes ago

JOBS
- android-all (ID 3907194786)
  - Upload artifacts
X lint in 1m29s (ID 3907194927)
  X Code quality test
- linux (ID 3907195090)
  - Race test
- mac_amd64 (ID 3907195150)
  - Race test
✓ mac_arm64 in 3m56s (ID 3907195227)
  ✓ Complete job
- windows_amd64 (ID 3907195293)
  - Race test
- windows_386 (ID 3907195369)
  - Run tests
- other_os (ID 3907195431)
  - Compile all architectures test
- go1.14 (ID 3907195496)
  - Race test
- go1.15 (ID 3907195576)
  - Race test
- go1.16 (ID 3907195648)
  - Race test

ANNOTATIONS
X golangci-lint exit with code 4

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