vilmibm
00617216b8
fix missing import
2020-11-16 14:03:52 -08:00
Christopher Oswald
0bb44c9ced
Support for --web when using gist create ( #2263 )
...
* Support for --web when using gist create
Proposal to close #2071
I have not worked with Go prior to this so please smite me down with the
wisdom of a million Golang gods if I'm doing something terribly wrong.
I also added a test to gist/create for the added web arg.
Pretty much referenced the implementation from pr/create.
* Fix for Tests / build (windows-latest)
I believe this fixes it as it stopped failing on a local vm. Otherwise I
will try and tackle it tomorrow.
* minor cleanup
Co-authored-by: vilmibm <vilmibm@github.com>
2020-11-16 16:01:30 -06:00
Alex Johnson
99574f85a3
Add a command to delete a gist ( #2265 )
...
* Add a command to delete a gist
* minor cleanup
Co-authored-by: vilmibm <vilmibm@github.com>
2020-11-16 15:47:55 -06:00
Cristian Dominguez
867f38970f
Fix USAGE help for some commands
2020-11-13 10:10:53 -03:00
Cristian Dominguez
fa8674386b
Render links as absolute URLs in repo view ( #2363 )
...
Co-authored-by: Cristian Dominguez <cristiand391@users.noreply.github.com>
2020-11-11 13:13:19 +01:00
vilmibm
46a1598c19
favor SuccessIcon
2020-11-02 11:13:28 -08:00
vilmibm
a2aa154794
port entirely to ColorScheme
2020-10-29 12:37:45 -07:00
Nate Smith
14a5e00c4a
Merge pull request #2034 from cristiand391/check-gist-ownership
...
Check gist ownership before editing
2020-10-05 16:20:34 -05:00
Nate Smith
d63b5a9297
Merge pull request #1763 from Matt-Gleich/trunk
...
♻️ Refactor gist list to use graphQL
2020-10-05 16:15:39 -05:00
Mislav Marohnić
cd2adfeba0
Port listing gists to githubv4 GraphQL client
...
- Fetching more than 100 gists is now supported
- The GraphQL query name is now `GistList` instead of `ListGists` for
consistency with other queries
- Avoid fetching unnecessary Files fields
- Gists are now rendered in the order that the API returned them in
- The gist timestamp for machine-readable output is now rendered in
RFC3339 format instead of in `time.Time.String()` format which is only
meant for debugging and is not considered stable
- Ensure newlines in gist description are rendered as spaces
2020-10-05 20:33:31 +02:00
Mislav Marohnić
1859728f7e
Fix parsing gist list --public/--secret flags
...
It's not sufficient to use `Changed("public")` to test if a boolean flag
was activated, since the user might have passed `--public=false`.
Instead, check the true value of the flag.
The `--public` and `--secret` flags should be mutually exclusive, so now
if both are activated, `--secret` takes precedence.
2020-10-05 20:27:05 +02:00
Matthew Gleich
f124370154
♻️ Refactor to only pass time in once for test
...
Signed-off-by: Matthew Gleich <email@mattglei.ch>
2020-10-04 15:02:13 -04:00
Matthew Gleich
d8ef8b836e
🐛 Fix stubs
...
Signed-off-by: Matthew Gleich <email@mattglei.ch>
2020-10-04 01:57:36 -04:00
Cristian Dominguez
c6b9e8454f
Update gist edit tests
2020-09-30 12:35:22 -03:00
Cristian Dominguez
67c0a1a409
Check gist ownership before editing
2020-09-30 12:35:04 -03:00
Nate Smith
e24035681d
Merge pull request #2003 from cristiand391/refactor-gist-create
...
Refactor gist create to reuse existing structs
2020-09-29 15:27:31 -05:00
Cristian Dominguez
b71e6494ab
Update gist create tests
2020-09-28 02:37:41 -03:00
Cristian Dominguez
ef8f61c61d
Refactor gist create
2020-09-28 02:36:01 -03:00
Sam Coe
f0d4fbf84f
Address PR comments around style and naming
2020-09-24 19:27:29 +02:00
Sam Coe
ed4075517c
Check for terminal background color before starting pager
2020-09-24 13:06:28 +02:00
Nate Smith
060ccd1eda
Merge pull request #1781 from cristiand391/fix-gist-id-extraction
...
Fix gist ID extraction from url
2020-09-22 12:04:04 -05:00
Cristian Dominguez
a7a90b3a4b
Move gist URL tests to its own file
2020-09-21 21:35:07 -03:00
Cristian Dominguez
55a8f3d8ca
Make gh gist view and edit commands reuse logic for id extraction
2020-09-21 21:28:04 -03:00
Cristian Dominguez
d685d666b2
Set gist ID by default on all tests
2020-09-21 12:11:08 -03:00
Cristian Dominguez
ef9b75e1f6
Add tests for gist URL check
2020-09-19 18:50:07 -03:00
Cristian Dominguez
2af136cc78
Return error if it's an invalid URL
2020-09-19 18:48:00 -03:00
yuuji.yaginuma
943dcef478
Don't send a request when the contents haven't changed
...
By doing this, the command will finish faster if the user canceled
the editing.
2020-09-19 15:25:07 +09:00
yuuji.yaginuma
4f3d0e5f7b
Fix short description of gist
...
The `gist` command allows doing other operations than
`create`(like `edit`, `view`, etc). So I think that `manage`
is more appropriate to the description.
2020-09-18 14:21:02 +09:00
Cristian Dominguez
0b8c964a41
Fix gist ID extraction from url
2020-09-17 23:48:25 -03:00
Matthew Gleich
89e1ee3217
♻️ Refactor gist list to use graphQL
...
Signed-off-by: Matthew Gleich <matthewgleich@gmail.com>
2020-09-17 16:27:23 -04:00
vilmibm
7c986c0454
help typo
2020-09-16 11:23:14 -05:00
vilmibm
2b70e8266a
better time stub
2020-09-16 10:57:20 -05:00
vilmibm
0d45dd82f3
finish edit tests
2020-09-15 17:29:54 -05:00
vilmibm
15cf786c5a
wip tests
2020-09-15 17:20:36 -05:00
vilmibm
a9ab2a98fc
move Edit to opts for testing
2020-09-15 17:04:43 -05:00
vilmibm
62f54f0f02
start on edit tests
2020-09-15 16:18:26 -05:00
vilmibm
ada2c56606
test gist view
2020-09-15 16:05:30 -05:00
vilmibm
4a467864d5
linter appeasement
2020-09-15 15:22:28 -05:00
vilmibm
f124b426fe
tweak gist view; support --filename
2020-09-15 14:56:13 -05:00
vilmibm
a61c897e4c
show filename if no description
2020-09-15 14:55:55 -05:00
vilmibm
ba5b639be4
finish list tests
2020-09-15 14:33:14 -05:00
vilmibm
9fd87faadc
wip tests
2020-09-15 14:15:44 -05:00
vilmibm
425f707c7d
fix tests
2020-09-15 13:36:32 -05:00
vilmibm
1887fc07c9
working on list tests, need to debug
2020-09-15 09:39:30 -05:00
vilmibm
b3266d9454
linter appeasement
2020-09-14 11:10:17 -05:00
vilmibm
41382a558b
better err
2020-09-14 11:09:50 -05:00
vilmibm
190d76abc5
linter appeasement
2020-09-14 11:08:32 -05:00
vilmibm
ecfbaaa31c
linter appeasement
2020-09-14 11:07:33 -05:00
vilmibm
e7ab1b753e
linter appeasement
2020-09-14 11:05:26 -05:00
vilmibm
2df6a6eb8c
s/private/secret/
2020-09-14 11:04:37 -05:00