Wing-Kam Wong
c6454064a4
refactor: revise errMsg in rename_test.go
2023-03-23 11:58:13 +08:00
Wing-Kam Wong
6854f0f63c
refactor: remove unnecessary validations
2023-03-23 11:58:00 +08:00
Wing-Kam Wong
951d1aaa1f
refactor: use ExactArgs instead of MaximumNArgs
2023-03-23 11:52:14 +08:00
Wing-Kam Wong
5699daef27
refactor: change from [] to {}
2023-03-23 11:51:55 +08:00
Wing-Kam Wong
3b27e068f2
feat: gist rename test
2023-03-22 00:11:40 +08:00
Wing-Kam Wong
b705ea94a0
fix: revise test cases in TestNewCmdRename in rename_test.go
2023-03-19 21:31:58 +08:00
Wing-Kam Wong
9e1d34f473
feat: add FlagErrorf for missing flag cases
2023-03-19 21:31:23 +08:00
Wing-Kam Wong
eb2da16b60
feat: TestNewCmdRename for gist rename
2023-03-19 19:43:34 +08:00
Wing-Kam Wong
daf4922176
refactor: remove unused code
2023-03-19 17:28:02 +08:00
Wing-Kam Wong
54de75db82
feat: add gist rename logic
2023-03-18 01:16:59 +08:00
Wing-Kam Wong
f9d3b71c3b
feat: add gistRenameCmd to gist.go
2023-03-17 22:35:37 +08:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods ( #7049 )
2023-02-28 00:24:45 +00:00
Mislav Marohnić
a55dd656f3
Merge remote-tracking branch 'origin' into cobra-update
2022-12-20 17:15:25 +01:00
Sam Coe
98ab1f2587
Authenticate network git commands ( #6541 )
2022-11-15 13:14:37 +02:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature
2022-11-09 16:42:13 +01:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 ( #6474 )
2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression ( #6472 )
...
* Revert "Refactor to use new git client (#6447 )"
This reverts commit 57fbe4f317 .
* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client ( #6447 )
2022-10-19 21:11:36 +03:00
Mislav Marohnić
3fe5026d39
Migrate to tableprinter from go-gh ( #6346 )
2022-10-17 15:15:39 +02:00
Mislav Marohnić
27294c197f
gist clone: fix clone URL for GHE gists
...
Use `HOSTNAME/gist/ID` instead of `gist.HOSTNAME/ID` as clone URL for
Enterprise since it's not guaranteed that the `gist.` subdomain is
configured for a GHE instance.
2022-09-15 18:25:16 +02:00
Sam Coe
e7102f9d84
Migrate to go-gh text package ( #6236 )
2022-09-14 09:23:55 +04:00
Mark Woods
e876b22963
Change markdown wrap limit match terminal width ( #6016 )
2022-09-01 07:36:25 +00:00
Sam Coe
45f1a71c8b
Remove all direct calls to shurcool-graphql
2022-08-18 21:40:41 +03:00
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages ( #6084 )
2022-08-18 09:04:13 +03:00
Nate Smith
200516beb8
Merge pull request #5985 from icen1/colour-privacy-gist
...
[Issue:#5975] Added gist privacy type to terminal output
2022-08-16 15:26:08 -05:00
vilmibm
41385477c3
fix linting
2022-07-27 14:15:27 -05:00
vilmibm
d5334f4115
Revert "update linter checks"
...
This reverts commit 40ecb8c188 .
2022-07-27 13:30:41 -05:00
vilmibm
40ecb8c188
update linter checks
2022-07-26 16:06:52 -05:00
Icen
7f2bbf20cc
Changed the create_test.go accordingly
2022-07-22 21:18:38 +01:00
Icen
df2b19567b
Added whether the gist is public or secret. Added the colour red to public and the colour green to secret
2022-07-22 20:58:29 +01:00
Sam Coe
cacff4ad6d
Use go-gh config package ( #5771 )
2022-06-23 11:50:04 +00:00
Mislav Marohnić
2139e763fb
Write Cobra deprecation messages to stderr
...
We used to do the equivalent of `rootCmd.SetOut(os.Stdout)` because we
thought that Cobra's "Out" stream represents standard output. However,
upon closer inspection it turns out that this is Cobra's stream for
usage errors and deprecation warnings, and those we want written to
stderr as well. It is not clear to me why Cobra maintains a distinction
between "Out" and "Err" streams since both seem to go to sdterr by
default.
This change also ceases our usage of `command.Print()` functions in
favor of explicitly writing to `IOStreams.Out/ErrOut`.
2022-05-23 20:23:42 +02:00
ffalor
7d0a7f98e1
Add progress indicator to gist create ( #5526 )
2022-04-27 08:17:17 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os ( #5498 )
2022-04-26 13:07:44 +02:00
Roshan Padaki
13342cb272
Don't error on list commands when no results found ( #5479 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-25 17:55:52 +00:00
Mislav Marohnić
0bc8aae45f
Avoid crash when deleting gist with no owner
...
This removes the explicit check for the gist owner, speeding up the gist
deletion due to fewer API requests, but resulting in a more vague error
message in case the gist is "not found".
2022-04-25 13:24:19 +02:00
Christopher Nethercott
933a91e18e
Add "new" alias to "create" commands ( #5388 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-11 16:48:34 +02:00
Sam Coe
f7710dedd2
Allow non-interactive gist file replacement ( #5408 )
2022-04-06 15:49:52 +02:00
Christian Gregg
c5dbf20ed4
Alias list as ls for all commands ( #5214 )
...
I always get tripped up whenever trying to list my codespaces, adding
`ls` as an alias to `list` feels natural enough.
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-02-17 13:53:42 +01:00
Josh Gross
f43574bfe0
Correctly handle Windows paths when creating gists
2022-02-06 23:21:20 +00:00
Mislav Marohnić
4a3ef50d2d
Standardize pager output across commands ( #5141 )
...
Add pager functionality to the following commands:
- gist list
- pr checks
- release list
- run list
- run view
- secret list
- workflow list
- workflow view
Additionally, normalize error handling when starting the pager has
failed: only print a non-fatal notice to stderr instead of aborting the
whole command.
2022-02-01 08:36:51 +01:00
nate smith
2f19fa792f
maint: clean up some errors
2022-01-24 17:34:21 -06:00
nate smith
de4e37ed75
Merge remote-tracking branch 'origin/trunk' into feat/gist-edit
2022-01-24 17:34:09 -06:00
Nate Smith
f950637b0b
Merge pull request #4738 from SteadBytes/gist-edit-description
...
Support editing gist description
2022-01-18 09:34:22 -06:00
Nate Smith
4b415f80d7
Merge pull request #5022 from cli/config-defaults
...
add GetOrDefault and related methods to Config
2022-01-17 10:44:28 -06:00
Mislav Marohnić
e43cb2b880
Port more legacy stubs to the new ask stubber
2022-01-14 19:34:15 +01:00
Mislav Marohnić
a33b5a55c4
Have NewAskStubber perform auto-cleanup
2022-01-14 18:52:00 +01:00
Mislav Marohnić
30c5ef23ee
Merge remote-tracking branch 'origin' into ask-stubber
2022-01-14 17:41:08 +01:00
Mislav Marohnić
456d55ead9
Have a single Render function handle all Markdown rendering
2022-01-13 19:39:43 +01:00
Mislav Marohnić
c839d3ba1d
Check for unused ask stubs at the end of the test
2022-01-13 12:23:42 +01:00