Commit graph

5355 commits

Author SHA1 Message Date
Kynan Ware
8840df2eb3 Fix agentTaskCmd to use repoResolvingCmdFactory
`agent-task` uses smart base repo func to fix bug with resolving upstream instead of local repo.
2025-10-10 10:39:52 -06:00
Kynan Ware
91c6bc609a Add new displaying message to test expectation
Updated the Test_createRun test to expect a message indicating that session logs are being displayed for the job
2025-10-07 23:37:43 -06:00
Kynan Ware
a78bb5e899 Fix --follow not killing the progress indicator
Fixes --follow not stopping the progress indicator. Also includes a nice message to indicate what is happening because even after we create the agent task, there's a period of time where we poll and receive nothing as the task session starts. We want there to be some sort of feedback in that period of time to not make the user panic and think it has hanged.
2025-10-07 23:19:45 -06:00
Kynan Ware
67bf27bf0c
Merge pull request #11835 from cli/kw/do-not-request-org-teams-for-reviewer-set
`gh pr edit`: Only fetch org teams for reviewers when required
2025-10-03 12:25:55 -06:00
Kynan Ware
43e834a691
Apply suggestion from @babakks
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 09:55:58 -06:00
Kynan Ware
8d85946098
Apply suggestion from @babakks
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 09:55:45 -06:00
Kynan Ware
bf728893fa Fix argument order in httpStubs test functions
Swaps the argument order of the httpStubs functions in edit_test.go to match the expected (t *testing.T, reg *httpmock.Registry) signature. This improves consistency and prevents potential confusion or errors when calling these test helpers.
2025-10-02 09:54:01 -06:00
Babak K. Shandiz
ab9c99ec04
docs(cache delete): remove redundant comment
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 11:36:00 +01:00
Babak K. Shandiz
d574873f3b
docs(cache delete): add godoc for deleteCacheByKey
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 11:33:26 +01:00
Kynan Ware
52bb1dec30 Fix typo in error message for required flags
Corrected '--tile' to '--title' in the error message shown when required flags are missing in non-interactive mode.
2025-10-01 16:09:33 -06:00
Kynan Ware
848faf8115 Refactor reviewer partitioning in PR edit command
Extracted logic for splitting reviewer identifiers into users and teams into a new helper function, partitionUsersAndTeams. Updated updatePullRequestReviews to use this function for both adding and removing reviewers, improving code clarity and maintainability. Also clarified comments regarding PR author handling.
2025-10-01 16:02:05 -06:00
Kynan Ware
7094a55eec Remove unused ghIds function and githubv4 import
Deleted the unused ghIds helper function and the associated githubv4 import from edit.go to clean up the codebase.
2025-10-01 15:47:39 -06:00
Lucas
ccfc2c3045
fix(cache): report correct deleted count for key and key+ref deletions
Previously, deleting caches by key or key+ref could misreport the number of deleted entries, especially when multiple caches matched the criteria. This change ensures the actual number of deleted caches is reported by consuming the API response's total_count field.
2025-10-01 18:44:24 +02:00
Kynan Ware
87468f40db Refactor PR reviewer editing to use REST API and optimize team fetch
Switches pull request reviewer add/remove operations from GraphQL to the REST API, enabling separate add and remove calls for reviewers and teams. Refactors reviewer editing logic to avoid fetching organization teams unless required for interactive editing, improving performance for non-interactive flows. Updates tests and supporting code to reflect the new reviewer management and metadata fetching behavior.
2025-09-30 10:45:44 -06:00
Babak K. Shandiz
52ba836605
Merge pull request #11805 from juejinyuxitu/FieldsFuncSeq
refactor: use strings.FieldsFuncSeq to reduce memory allocations
2025-09-30 11:18:57 +01:00
Eugene
a9efc8d3d2
Merge pull request #11801 from cli/eugene/remove_hidden_for_release_verify
visible for  `release verify`  and `release verify-asset` cmd
2025-09-29 10:43:09 -04:00
Kynan Ware
b76bc7706a
Merge pull request #11544 from benjlevesque/auth-status-json-output-8635
Add JSON output to `gh auth status`
2025-09-25 09:50:46 -06:00
Babak K. Shandiz
38d6a83e35
test(auth status): correctly replace JSON-escaped paths
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-25 10:51:47 +01:00
ejahnGithub
a2034545cc update the description 2025-09-24 14:04:28 -04:00
juejinyuxitu
f5cf156af1 refactor: use strings.FieldsFuncSeq to reduce memory allocations
Signed-off-by: juejinyuxitu <juejinyuxitu@outlook.com>
2025-09-24 23:11:17 +08:00
Babak K. Shandiz
0ec5f13283
fix(pr checkout): add alias co
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-24 14:56:59 +01:00
ejahnGithub
c1969f0523 remove hidden value for release verify cmd 2025-09-23 16:45:26 -04:00
Eugene
ea08200f01
Merge branch 'trunk' into eugene/release_verify_tag_name_fix 2025-09-23 11:52:17 -04:00
ejahnGithub
4fb9b29ac9 fix latest tag for relase verify asset 2025-09-23 11:50:57 -04:00
Kynan Ware
7ff84cff2e
Merge pull request #11797 from cli/github-cli-epic-990
`gh agent-task` commandset
2025-09-23 09:45:59 -06:00
Kynan Ware
8c75079bf2 Add math package import to sessions.go
Imported the math package in sessions.go
2025-09-23 09:33:26 -06:00
Kynan Ware
e673dfe61c
Add TODO for better integer handling in GetPullRequestDatabaseID 2025-09-23 09:28:08 -06:00
ejahnGithub
8d701dc13e update the test 2025-09-23 11:12:19 -04:00
Eugene
9e54a6242b
Update pkg/cmd/attestation/api/client.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-23 11:05:41 -04:00
ejahnGithub
3ba03e3200 add initiator_type for attestations 2025-09-23 10:59:07 -04:00
Babak K. Shandiz
e31136a677
docs(auth status): explain --json will always exit with zero
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-23 15:42:25 +01:00
Babak K. Shandiz
5fddcef0a8
fix(auth status): return JSON entries under hosts
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-23 15:24:37 +01:00
Babak K. Shandiz
6fc5742a68
fix(agent-task/capi): return proper error message when resp is not a JSON
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-22 12:59:51 +01:00
Babak K. Shandiz
002ba54683
Merge pull request #11763 from cli/babakks/display-session-error
`gh agent-task view`: display session error if any
2025-09-22 11:57:29 +01:00
Babak K. Shandiz
eb3c842818
test(agent-task view): populate Session.Name in all test cases
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 17:39:06 +01:00
Babak K. Shandiz
ecfbb67e99
fix(agent-task view): improve session overview
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 17:37:25 +01:00
Babak K. Shandiz
3e43a98814
refactor(agent-task view): merge empty println calls with next
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 16:47:40 +01:00
Babak K. Shandiz
3091c21320
fix(agent-task view): re-fetch session to get all pieces of data
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 16:45:42 +01:00
Babak K. Shandiz
597cdaf081
fix(agent-task/capi): remove fallback to viewer when user id is zero
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 15:37:46 +01:00
Babak K. Shandiz
eba31343a8
test(agent-tassk/capi): update ListSessionsByResourceID tests
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 14:31:03 +01:00
Babak K. Shandiz
2fe60d9105
docs(agent-task/capi): add TODO note for dropping local ID generation
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 14:30:29 +01:00
Babak K. Shandiz
a108b4ee95
fix(agent-task/capi): fetch viewer when resource session user id is zero
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 14:29:44 +01:00
Babak K. Shandiz
9148f41cc6
fix(agent-task/capi): handle unpopulated resource session LastUpdatedAt
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 14:28:46 +01:00
Babak K. Shandiz
546ab1cf4b
refactor(agent-task/capi): keep resource private
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 14:27:08 +01:00
Ariel Deitcher
185e36c60f update agents resource route 2025-09-18 17:20:16 -07:00
Babak K. Shandiz
123c9eaba8
fix(agent-task view): improve session error
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 16:14:31 +01:00
Babak K. Shandiz
beba8f6387
fix(agent-task view): display session error
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 16:12:11 +01:00
Babak K. Shandiz
e5739cc545
fix(agent-task/capi): add WorkflowRunID field to Session
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 16:11:17 +01:00
Babak K. Shandiz
b6816ad89a
refactor(agent-task/capi): remove unused slice
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 15:05:28 +01:00
Babak K. Shandiz
3ed9034ff8
fix(agent-task/capi): add Error field to Session
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 15:04:06 +01:00