Commit graph

5085 commits

Author SHA1 Message Date
Lucas
704bb4164c
feat(gist): retrieve full content for truncated gist files
* Added logic to fetch the full content of a gist file if it is marked as truncated.
* Utilizes the `GetRawGistFile` function to obtain the complete content from the provided `RawURL`.
2025-09-18 06:35:31 +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
Babak K. Shandiz
6b19a85471
Merge pull request #11638 from cli/babakks/use-advanced-issue-search
Use advanced issue search
2025-09-08 20:32:22 +01:00
Babak K. Shandiz
37896d613a
fix(featuredetection): remove redundant AdvancedIssueSearchWebInIssuesTab field
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:46:28 +01:00
Babak K. Shandiz
2c08f20c33
docs(search prs): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:37:37 +01:00
Babak K. Shandiz
cc60d9c3fa
docs(search issues): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:37:17 +01:00
Babak K. Shandiz
02dc03c8e2
docs(pr list): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:36:46 +01:00
Babak K. Shandiz
02ee337818
docs(issue list): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:36:24 +01:00
Babak K. Shandiz
ef69901f05
refactor(search): rename Query.String to StandardSearchString
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 16:04:47 +01:00
Babak K. Shandiz
efddea720f
test(search): improve test cases
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 15:45:20 +01:00
Melissa Xie
926e29392e
Merge pull request #11592 from luxass/cache-delete-with-ref
feat: add support for `--ref` in `gh cache delete`
2025-09-03 08:04:55 -07:00
Kyle Kelly
30994ddc5b Remove mention of public preview in trustedroot.go 2025-09-02 23:42:03 +00:00
Babak K. Shandiz
7b4ace9f54
docs(issue pr): fix incorrect formatting
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-02 10:14:59 +01:00
Babak K. Shandiz
20e8b9e8ea
docs(issue list): fix incorrect formatting
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-02 10:14:32 +01:00
Babak K. Shandiz
87bd76c5aa
docs: add cleanup/future TODO marks for advanced issue search changes
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-01 13:55:49 +01:00
Babak K. Shandiz
33f1f6ea68
docs(pr list): explain use of advanced issue search syntax
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-01 13:40:46 +01:00
Babak K. Shandiz
5747297775
docs(issue list): explain use of advanced issue search syntax
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-01 13:40:20 +01:00
Babak K. Shandiz
b4213ac136
test(issue/pr list): assert integration with advanced issue search
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 21:11:55 +01:00
Babak K. Shandiz
8a8b67ebc3
test(pr shared): assert ListURLWithQuery works with advanced search syntax
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 18:50:32 +01:00
Babak K. Shandiz
6d148400a8
refactor(issue/pr list): support advanced issue search
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 18:29:24 +01:00
Babak K. Shandiz
04cce6b35e
docs(search): improve Searcher.URL method docs
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 15:36:31 +01:00
Babak K. Shandiz
3573fdfbb0
docs(search prs): mention advanced issue search takeover
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 15:35:33 +01:00
Babak K. Shandiz
99daa74b00
docs(search issues): mention advanced issue search takeover
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 15:35:17 +01:00
Babak K. Shandiz
8ab6e722e2
docs(search): improve docs for Query.String and Query.AdvancedIssueSearchString methods
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 15:34:27 +01:00
Babak K. Shandiz
f0a130dd4e
refactor(search): improve special qualifier grouping
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 15:19:42 +01:00
Babak K. Shandiz
89b39e2df0
test(search): test advanced search support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 13:59:45 +01:00
Babak K. Shandiz
1b2e2a24b6
fix(search): use advanced issue search when available
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 13:58:59 +01:00
Babak K. Shandiz
3086b6fc8a
refactor(search): sort qualifiers in query
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 13:54:52 +01:00
Babak K. Shandiz
188098d592
test(search): provide feature detection dependency
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 12:25:43 +01:00
Babak K. Shandiz
257f143711
fix(search): add feature detection dependency
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 12:24:05 +01:00
Babak K. Shandiz
cb249e6cbb
test(search): explain why is: and in: qualifiers used in test case
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 02:02:25 +01:00
Babak K. Shandiz
bf242ae2f4
fix(search): sort qualifiers in advacned issue search syntax
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 02:00:27 +01:00
Babak K. Shandiz
392c286db3
test(search): add tests for AdvancedIssueSearchString method
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 01:49:00 +01:00
Babak K. Shandiz
fd38b14898
fix(search): add AdvancedIssueSearchString method
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 01:48:13 +01:00
Babak K. Shandiz
08e4aa892e
test(cache delete): combine test cases for invalid/non-existent refs
Also note that the API never returns HTTP 422 for invalid refs.

Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-28 11:07:49 +01:00
Babak K. Shandiz
d1a404a060
test(cache delete): replace HTTP 204 with 200 to match API behaviour
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-28 11:06:58 +01:00
Babak K. Shandiz
02d50700b5
docs(cache delete): explain different API responses
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-28 11:05:28 +01:00
Babak K. Shandiz
d457a1bce0
test(cache delete): add test case for key arg and --all
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-28 10:12:19 +01:00
Babak K. Shandiz
2dd54ae921
refactor(cache delete): simplify error handling
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-28 10:08:04 +01:00
Babak K. Shandiz
842d3449b4
refactor(cache delete): simplify condition
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-28 10:02:03 +01:00
Lucas
926327ce6d
fix(cache): validate --ref flag usage with cache ID
* Ensure that the `--ref` flag cannot be used in conjunction with a cache ID.
* Update error handling to provide clear feedback when this condition is violated.
* Add tests to cover scenarios involving the `--ref` flag and cache ID.
2025-08-27 19:54:19 +02:00
Lucas
1a19918581
fix(cache): prevent using --ref flag with cache ID
* Added validation to ensure that the `--ref` flag cannot be used when a cache ID is provided.
* Updated error message to include the reference when a cache is not found with the specified `--ref`.
2025-08-27 19:38:01 +02:00
Lucas
5c292286cf
refactor(cache): extract cache ID parsing logic
* Replaced direct conversion of cache ID string to int with a dedicated `parseCacheID` function.
* Improved readability and maintainability of the `deleteCaches` function.
2025-08-27 19:37:39 +02:00
Lucas
047326fcb4
fix(cache): update error message for missing cache key with --ref flag
* Changed the error message from "--ref cannot be used without cache key/ID" to "must provide a cache key" for clarity.
* Updated corresponding test case to reflect the new error message.
2025-08-27 04:56:48 +02:00
Lucas
3ba82b58a9
chore(cache): improve help text for --ref flag in cache deletion
* Clarified the description of the `--ref` flag to specify its purpose more accurately.
* Ensures users understand that it narrows down deletion by cache key and ref.
2025-08-27 04:56:48 +02:00
Lucas
bfb1354e51
test(cache): add tests for --ref flag in cache deletion
* Implemented test cases for handling the `--ref` flag in cache deletion commands.
* Added validation for using `--ref` with cache key and ID.
* Ensured proper error messages are returned for invalid usage of `--ref`.
2025-08-27 04:56:48 +02:00
Lucas
aff2bfaa5c
feat(cache): add support for --ref flag in cache deletion
- Introduced `--ref` flag to narrow down cache deletion to a specific branch or PR reference.
- Updated command examples to include usage of `--ref`.
- Added validation to ensure `--ref` cannot be used with `--all` and must accompany a cache key/ID.
2025-08-27 04:56:46 +02:00
minxinyi
21b08bdd20
refactor: use slices.Equal to simplify code (#11364)
Signed-off-by: minxinyi <minxinyi6@outlook.com>
2025-08-26 15:29:19 -06:00
Andrey
4e1318eb2a
feat: gh auth Automatically copy one-time OAuth code to clipboard (#11518)
* feat: add ability to copy one-time OAuth code while authenticating

Signed-off-by: Andrey <andrekabatareika@gmail.com>

* fix(docs): wrong example for gh auth refresh

* chore(authflow): update message to include one-time code to it

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>

* chore(authflow): improve message when copied one-time code

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>

* chore(authflow): don't early return error when could not copy OAuth code

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>

* refactor(authflow): make code for working with OAuth code more readable

* Adjust language in `gh auth` help for clipboard

---------

Signed-off-by: Andrey <andrekabatareika@gmail.com>
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2025-08-25 09:52:51 -06:00