This commit is part of work to make gh more scriptable. It includes both
some general purpose helpers towards this goal as well as improvements
to the issue commands. Other commands will follow.
- Adds `utils/terminal.go` for finding out about gh's execution environment
- introduces `stubTerminal` for either faking being attached to a tty or not during tests
- updates issue commands to behave better when not attached to a tty:
- issue list doesn't print fuzzy dates
- issue list doesn't print header
- issue list prints state explicitly
- issue create no longer hangs
- issue create fails with clear error unless both -t and -b are specified
- issue view prints raw issue body
- issue view prints metadata in a consistent, linewise format
Read from and write to the `hosts.yml` file every time `config.yml` is
accessed. Everything that before went under the `hosts:` map now belongs
to `hosts.yml`.
this commit add very basic non-interactive PR reviewing. You can either
review the "current" or a passed PR (number or URL) as approved, changes
requested, or commented via CLI flags.
- adds config get and config set commands
- supports arbitrary k/v strings set at top and host level
- supports writing an updated config, preserving comments
- supports mostly lazy evaluation of yaml