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
Lucas
26f1d48fa4
test(gist): add tests for handling truncated files in view command
...
* Added test cases for viewing truncated files with and without the raw flag.
* Included scenarios for multiple files with truncation behavior.
* Ensured correct output is returned for truncated files when accessed via raw URLs.
2025-09-20 06:55:38 +02:00
Lucas
b9b2654219
test(gist): add tests for editing truncated gist files
...
* Implement tests for editing gists that contain truncated files.
* Ensure that both single and multiple truncated files are handled correctly.
* Mock responses for retrieving full content from raw URLs for truncated files.
2025-09-20 06:55:10 +02: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
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
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
Babak K. Shandiz
863329b4c1
fix(agent-task create): block empty problem statement arg
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 14:14:59 +01:00
Babak K. Shandiz
c7a811e567
fix(agent-task create): use pager when following logs
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 13:55:37 +01:00
Babak K. Shandiz
cb9808fa6e
fix(agent-task create): avoid prompting when problem statement is provided
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 13:51:13 +01:00
Babak K. Shandiz
4a0c32ef9f
fix(agent-task list): show capitalised session state
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:34:27 +01:00
Babak K. Shandiz
764376836c
fix(agent-task/shared): fix session state value
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:33:47 +01:00
Babak K. Shandiz
7d163eaf27
docs(agent-task list): add "(preview)" note to cmd docs
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:20:34 +01:00
Babak K. Shandiz
169f45daf9
chore(agent-task/shared): regenerate LogRenderer mock
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:00:55 +01:00
Babak K. Shandiz
6235c33ff0
test(agent-task/capi): assert session with zero resource ID are kept
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:00:55 +01:00
Babak K. Shandiz
c68d1a31c0
fix(agent-task/capi): keep sessions with no resource attached
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:00:55 +01:00
Babak K. Shandiz
5f73d3b438
refactor(agent-task list): remove unused BaseRepo from ListOptions
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:00:54 +01:00
Babak K. Shandiz
6ec4324d6d
docs(agent-task/capi): fix test case explanation
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 12:00:54 +01:00
Kynan Ware
08bc1a8d29
Fix session deduplication and add test for paging
...
Refactor ListLatestSessionsForViewer to use a map for tracking seen resource IDs, ensuring only the newest session per resource is kept. Add a test case to verify correct deduplication across paginated API responses.
2025-09-18 12:00:54 +01:00
Kynan Ware
680ebade59
Remove repo-scoped session listing and related code
...
This commit removes support for listing agent sessions scoped to a specific repository, including the ListSessionsForRepo method and related tests. The list command now always lists the latest sessions for the viewer, simplifying the code and user experience. Test and mock code have been updated accordingly.
2025-09-18 12:00:50 +01:00
Babak K. Shandiz
c02a8d8c94
Merge pull request #11760 from cli/kw/update-gh-agent-root-cmd-help
...
`gh agent-task`: update help text
2025-09-18 11:11:44 +01:00
Babak K. Shandiz
a7c8fa4b84
docs(agent-task): use heredoc.Doc
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 10:48:53 +01:00
Babak K. Shandiz
151b971933
Merge pull request #11755 from cli/babakks/polish-agent-task-view
...
`gh agent-task view`: polish and fix some issues
2025-09-18 10:38:15 +01:00
Babak K. Shandiz
6f698407fb
docs(pr/shared): add a TODO on decoupling PR finder from IO
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 10:25:49 +01:00
Babak K. Shandiz
f0a0c4b856
fix(agent-task view): display zero premium requests
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 10:18:40 +01:00
Babak K. Shandiz
6927d642f6
fix(agent-task/shared): make capitalised status names consistent
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 10:16:00 +01:00
Lucas
bf272305ff
feat(gist): retrieve full content for truncated gist files
...
* Added logic to fetch full content for truncated files when updating a gist.
* Utilizes `shared.GetRawGistFile` to retrieve the complete content based on the `RawURL`.
2025-09-18 06:35:35 +02:00
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
Kynan Ware
7d2dfd3493
Update pkg/cmd/agent-task/agent_task.go
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-17 20:37:12 -06:00