Commit graph

3711 commits

Author SHA1 Message Date
Mislav Marohnić
cdd495160c Merge pull request #39 from github/completion
Add `completion` script
2019-11-06 19:31:29 +01:00
Mislav Marohnić
29b5593e21 go mod tidy 2019-11-06 19:12:53 +01:00
Mislav Marohnić
401aef283f Prototype issue create 2019-11-06 19:10:15 +01:00
Mislav Marohnić
5d2ecf12ca Fix issues order 2019-11-06 19:10:15 +01:00
Mislav Marohnić
40131abfba issue listissue status to bring in line with pr prototype 2019-11-06 19:10:15 +01:00
Corey Johnson
da334e283b Merge pull request #43 from github/gh-issue
Add `gh issue list` and `gh issue view`
2019-11-06 10:09:11 -08:00
Corey Johnson
3782ed6c8d Tweaks 2019-11-06 10:07:24 -08:00
Corey Johnson
aea7ae8efd Add gh issue list and gh issue view ISSUE_NUMBER 2019-11-06 19:05:23 +01:00
Corey Johnson
d658a8f407 Add Issue query 2019-11-06 19:05:23 +01:00
Corey Johnson
738562436f Update tests 2019-11-06 10:02:35 -08:00
Corey Johnson
b50898f05b move to init 2019-11-06 10:01:16 -08:00
Mislav Marohnić
e6d55fff1c Calculate instead of hardcode the width of the PR number column 2019-11-06 18:53:58 +01:00
Mislav Marohnić
9133ad9f87 pr list: indicate state by color, useful for -s all 2019-11-06 18:48:41 +01:00
Nate Smith
9ad41cf31f Merge pull request #48 from github/colors
Switch to mgutz/ansi
2019-11-06 10:22:18 -07:00
nate smith
ffa5ce456a do not use color when stdout is not a terminal 2019-11-06 10:15:27 -07:00
nate smith
e3a11c8ffb fix pr filtering 2019-11-06 18:10:22 +01:00
Mislav Marohnić
667704d574 Add pr list command
Old `pr list` is now `pr status`
2019-11-06 17:33:45 +01:00
nate smith
e8634ca5d8 use mgutz/ansi in utils 2019-11-05 13:47:48 -07:00
nate smith
df3e3bb4af minor fix 2019-11-02 12:55:17 -05:00
nate smith
18f104ad38 oops 2019-11-02 12:53:33 -05:00
Mislav Marohnić
531db42c47 Log executed git commands when DEBUG is active 2019-11-01 23:20:45 +01:00
Mislav Marohnić
8ee97d72cd Extract outputStub into testing.go 2019-11-01 23:20:15 +01:00
nate smith
c12bdc2731 WIP resuming pr create test work 2019-11-01 17:19:01 -05:00
Mislav Marohnić
f6fcdf114e Use SetPrepareCmd hook to spy on OpenInBrowser
We are now able to assert that the browse command was called with the correct URL
2019-11-01 22:18:12 +01:00
Mislav Marohnić
d881a2e52e Ensure git operations preserve their stderr in error output
This also provides a SetPrepareCmd hook for tests to be able to define stubs for commands that are supposed to be run
2019-11-01 22:16:23 +01:00
Mislav Marohnić
875352a03c Fix issues order 2019-11-01 14:36:26 +01:00
Mislav Marohnić
4f03370aa5 Add tests 2019-10-31 23:43:50 +01:00
Mislav Marohnić
55e9c18840 Merge remote-tracking branch 'origin/master' into completion 2019-10-31 23:28:06 +01:00
Mislav Marohnić
a66aaafb19 Merge pull request #40 from github/version-flag
Add `--version` flag support
2019-10-31 23:13:26 +01:00
Mislav Marohnić
2939924124 Merge branch 'master' into version-flag 2019-10-31 23:13:07 +01:00
Mislav Marohnić
c3d70bd8cd Clarify where Version and BuildDate are set 2019-10-31 23:10:42 +01:00
Mislav Marohnić
f0ca9aa023 Merge pull request #41 from github/silence-usage
Silence Cobra usage on errors
2019-10-31 22:56:02 +01:00
Mislav Marohnić
e87775845d Also print cmd usage string on "unknown command" 2019-10-31 22:44:43 +01:00
Corey Johnson
cf1feb847e Add gh issue list and gh issue view ISSUE_NUMBER 2019-10-31 11:02:27 -07:00
nate smith
7555aa9be3 first pass at generalizing process stubbing 2019-10-31 11:29:39 -05:00
Mislav Marohnić
faa96be9ea Ensure that errors are printed to stderr 2019-10-31 15:46:38 +01:00
Mislav Marohnić
a6e61a3a8d Silence Cobra usage on errors
When an error occurs anywhere in a command, Cobra used to print the
error itself and command usage help.

We already print error in `main()`, and we don't want to use command
usage string on anything other than flag-parsing errors.

This also fixes the double output of each error.
2019-10-31 13:47:10 +01:00
Mislav Marohnić
0bf3e7500c Add --version flag support 2019-10-31 12:14:55 +01:00
Mislav Marohnić
d9ef40c873 Add completion script 2019-10-31 11:41:24 +01:00
Corey Johnson
357de1b183 Add Issue query 2019-10-30 16:26:33 -07:00
nate smith
ee0fe61b04 test nonzero exit code 2019-10-30 17:46:34 -05:00
nate smith
ab115efd89 add cases to test for 2019-10-30 17:06:49 -05:00
nate smith
fdbf85e9ab sigh worthy mechanism for selecting arbitrary git outputs 2019-10-30 16:45:11 -05:00
nate smith
f6afe1b576 use testing hack to mock git call 2019-10-30 16:34:23 -05:00
nate smith
9efe96575e actually add command 2019-10-30 12:01:54 -05:00
nate smith
dfd567bf7f blindly committing the state of these files 2019-10-30 12:00:35 -05:00
nate smith
5087ec5c15 restore pr create with new context/client 2019-10-30 12:00:16 -05:00
Corey Johnson
eefb6d13ee Merge pull request #34 from github/no-global
Eliminate package-level global state
2019-10-29 17:18:03 -07:00
Mislav Marohnić
862db45587 Add mising files 2019-10-29 21:19:34 +01:00
Mislav Marohnić
51b08f871e Merge pull request #37 from github/remove-readme-redirect
Remove redirect to helper-cli from the README
2019-10-29 21:18:27 +01:00