Commit graph

240 commits

Author SHA1 Message Date
danochoa
dccbc99fdf fix gist description in tests 2025-01-08 20:47:50 -06:00
danochoa
9c65a32ef8 gist delete prompt with gist description 2025-01-08 17:56:02 -06:00
danochoa
a8f0aaeb3d tentative updates for acceptance criteria
- pending confirmation re description in prompt
2025-01-08 02:22:21 -06:00
danochoa
75ace410a3 cleanup 2025-01-03 13:09:32 -06:00
danochoa
f87d9f98f1 gist delete prompt for confirmation 2025-01-03 12:51:09 -06:00
danochoa
61ffbe157d undo extra move 2024-12-31 01:43:39 -06:00
danochoa
8390b4154b rearrange struct vals for consistency 2024-12-30 18:18:50 -06:00
danochoa
8f19d3b102 add gist delete tests for blank gist id 2024-12-30 17:24:10 -06:00
danochoa
049332d844 gh gist delete: prompt for gist id 2024-12-30 15:41:18 -06:00
Tyler McGoffin
7aef6ec391
Merge pull request #9728 from heaths/issue9704
Supporting filtering on `gist list`
2024-10-15 16:26:13 -07:00
Heath Stewart
446f66070a
Add filtered content output to docs 2024-10-15 14:39:21 -07:00
Tyler McGoffin
ddf90c78c2 Remove IsTenancy and relevant tests from gists as they are unsupported 2024-10-15 12:41:23 -07:00
Tyler McGoffin
e1a39d8e2b Add ghe.com to tests describing ghec data residency 2024-10-15 12:24:41 -07:00
Tyler McGoffin
81591a09b8 Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
Tyler McGoffin
3a8417f6c7 Add test coverage to places where IsEnterprise incorrectly covers Tenancy
IsEnterprise currently returns `true` when `IsTenancy` returns true. We
prefer that this behavior is orthogonal. This commit adds failing tests to
the instances where IsEnterprise should not behave the same as IsTenancy.

These test cases are expected to pass with the inclusion of the coming
improvements to go-gh to handle the orthogonality of IsEnterprise and
IsTenancy.
2024-10-15 11:56:43 -07:00
Heath Stewart
9e00f1e4f2
Resolve PR feedback 2024-10-14 15:08:23 -07:00
Heath Stewart
e9d8092ffc
Don't append remaining text if more matches 2024-10-12 23:17:57 -07:00
Heath Stewart
bddadef574
Highlight matches in table and content
When `--filter` is passed, matches will be highlighted in the existing table. If file names match, the "n file(s)" cell will be highlighted.

When `--include-content` is additionally passed, the file name, description, and/or content will be printed like `search code` with matches highlighted.
2024-10-12 23:17:56 -07:00
Heath Stewart
86f045ef0e
Split all newlines, and output no-color to non-TTY 2024-10-12 23:17:56 -07:00
Heath Stewart
70b14215ec
Print filtered gists similar to code search 2024-10-12 23:17:56 -07:00
Heath Stewart
4eaeda580b
Show progress when filtering
Filtering can take a while, so show progress. This also uncovered a bug
that I wasn't checking if a filter was actually specified, resulting in
a non-nil `opts.Filter`.
2024-10-12 23:17:56 -07:00
Heath Stewart
1615f2c1e1
Simplify description 2024-10-12 23:17:56 -07:00
Tyler McGoffin
b56353dc02
Disallow use of --include-content without --filter 2024-10-12 23:17:55 -07:00
Heath Stewart
73af9f8bd9
Improve help docs
Also changes `--filter` argument to "expression" to coincide with some other commands' help text e.g., `--jq`.
2024-10-12 23:17:55 -07: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
Heath Stewart
81f3526740
Fix tests 2024-08-16 10:11:52 -07:00
William Martin
07e0ff7127 Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Zack Sloane
b6dadfa7fb test update, more consistent default value display 2024-01-08 23:23:24 -05:00
Yukai Chou
ba585149c3 Leftovers 2023-11-23 07:12:47 +08:00
Yukai Chou
21bf1babdf Proof-reading 2023-11-17 02:04:35 +08:00
Yukai Chou
b70c28ba20 Misc docs improvements 2023-11-17 01:32:28 +08:00
Yukai Chou
896101678f Wrap cli commands in backticks uniformly 2023-11-17 01:32:00 +08:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
Sam Coe
7924878315
Fix git protocol and refactor Config interface (#8246) 2023-10-27 15:42:05 +02:00
Heath Stewart
7738b6187c
Add headers to all tables (#8157) 2023-10-20 11:20:02 +02:00
William Martin
6dc04bb1e2 Remove GetOrDefault uses in favour of GitProtocol 2023-10-19 12:57:19 +02:00
Sean Bright
6f99fd8442
Always show created gist privacy status. (#7645) 2023-07-06 06:22:50 +00:00
William Martin
491e9e8e58
Ensure gist edit request body matches desired schema (#7635)
* Ensure gist edit request body matches desired schema

* Immediately transform gist to gistToUpdate in edit flow

* Remove maps package and change to NewFilename
2023-07-03 13:33:49 +09:00
Kousik Mitra
baba894997
Add option to remove file from gist (#7560) 2023-06-23 14:08:21 +02: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
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