Commit graph

31 commits

Author SHA1 Message Date
Lucas
e3afc4dae4
test(gist): add tests for GetRawGistFile function
- Implemented unit tests for various scenarios in `GetRawGistFile`.
- Covered cases including successful requests, error handling, and different content types.
- Ensured proper verification of HTTP responses and error messages.
2025-09-19 05:01:16 +02:00
Lucas
62ea060590
feat(gist): add GetRawGistFile function to retrieve raw gist content
* Implements a new function to fetch the raw content of a gist using its `rawURL`.
* Handles HTTP requests and responses, including error management for non-200 status codes.
2025-09-18 06:35:16 +02:00
Lucas
b1fdb363ff
feat(gist): add RawURL and Truncated fields to GistFile
* Added `RawURL` to store the raw URL of the gist file.
* Added `Truncated` to indicate if the content is truncated.
2025-09-18 05:28:48 +02:00
phanium
19e1178a32
fix: gh gist edit panic when no file in a gist (#10627)
* fix: `gh gist edit` panic when no file in a gist

* fix: improve error message

Signed-off-by: Babak K. Shandiz <babakks@github.com>

---------

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-05-28 14:40:14 +01:00
Andy Feller
918cafc222 Deprecate ColorScheme.Gray for ColorScheme.Muted
This commit converts all of the places using ColorScheme.Gray and ColorScheme.Grayf to Muted and Mutedf.

There is a little extra tidying up with local variable names or converting code to use Mutedf format.
2025-04-06 10:18:48 -04:00
danochoa
5de282c970 drop description from prompts, fix tests 2025-01-11 01:35:12 -06:00
danochoa
7f71681ace gist delete - use in confirmation and success info 2025-01-10 01:07:11 -06:00
danochoa
9c65a32ef8 gist delete prompt with gist description 2025-01-08 17:56:02 -06:00
Heath Stewart
34203d7e6c
Refactor filtering into existing gist list
Resolves feedback in issue #9704
2024-10-12 23:17:55 -07:00
Heath Stewart
2fb5687777
Improve performance
Filter as we get results instead of getting them all. This allows us to more easily terminate pagination when opts.Limit is reached.
2024-10-12 23:17:55 -07:00
Heath Stewart
8c6d4c9c52
Add gist search command
Resolves #9704
2024-10-12 23:17:52 -07:00
Kousik Mitra
895487127c
Remove unused linter flag 2023-06-05 22:54:35 +05:30
Kousik Mitra
31209bcf89
Replace SurveyAskOne with Prompter 2023-06-05 22:48:21 +05:30
Kousik Mitra
9ccd098eb0
Add gist selector option to gist edit command 2023-06-05 22:07:04 +05:30
Sam Coe
45f1a71c8b
Remove all direct calls to shurcool-graphql 2022-08-18 21:40:41 +03:00
Sam Coe
260716a9f8
Repace shurcool/graphql with cli/shurcool-graphql 2021-11-17 12:57:43 -08:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
70a9621928 💅 cleanup in gist create 2021-05-07 14:15:27 +02:00
Mislav Marohnić
77d9051d0e Simplify looking up binary types in gist 2021-03-02 14:53:10 +01:00
Gowtham Munukutla
973fbb0925 Disallow operating on binary files in gist 2021-03-02 14:52:44 +01:00
vilmibm
00e8c07021 Merge remote-tracking branch 'origin/trunk' into interactive-gist-view 2021-03-01 16:05:26 -06:00
Mislav Marohnić
8f96e406ac Improve error handling and avoid writing confirmation to stdout
Right now the `gist edit` command doesn't write anything to stdout, so
let's keep it that way until we want to intentionally provide some
feedback in the terminal.
2021-02-27 12:23:18 +01:00
boonhong
5403a37601 Add interactive select in gist view 2021-02-24 18:38:05 +08:00
Cristian Dominguez
67c0a1a409 Check gist ownership before editing 2020-09-30 12:35:04 -03:00
Cristian Dominguez
ef8f61c61d Refactor gist create 2020-09-28 02:36:01 -03: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
vilmibm
1887fc07c9 working on list tests, need to debug 2020-09-15 09:39:30 -05:00
vilmibm
269adab75a improve list output 2020-09-14 10:33:29 -05:00
vilmibm
0d3056d9a7 gh gist edit 2020-09-14 10:33:29 -05:00
vilmibm
39b6ec8aec share gist getting 2020-09-14 10:33:29 -05:00