Commit graph

11279 commits

Author SHA1 Message Date
Babak K. Shandiz
d39c8c2fe1
Merge pull request #11651 from cli/kw/agent-task-list-pager
`gh agent-task list`: pager support
2025-09-03 10:14:17 +01:00
Kynan Ware
6aee65c960 Bump sigstore/rekor to v1.4.1
This bumps sigstore/rekor to v1.4.1 to get a vulnerability fix in the downstream go-chi/chi
2025-09-02 21:12:33 -06:00
Kynan Ware
3574ee9c30 Add agent task creation command and job API
Introduces the 'create' subcommand for agent tasks, allowing users to create agent jobs via the Copilot API. Adds job API client methods, job model, and polling logic to retrieve associated pull requests. Includes tests for various job creation scenarios.
2025-09-02 20:42:39 -06:00
Kyle Kelly
ade581679c
Merge pull request #11652 from cli/jkylekelly/trustroot-doc
Remove mention of public preview in trustedroot.go
2025-09-02 16:59:56 -07:00
Kyle Kelly
30994ddc5b Remove mention of public preview in trustedroot.go 2025-09-02 23:42:03 +00:00
Kynan Ware
2a99dcd2ce Add pager support to agent-task list output
Introduces pager functionality to the agent-task list command output for improved readability. If the pager fails to start, an error message is printed to stderr. Aligns with implementations in other commands.
2025-09-02 17:13:43 -06:00
Kynan Ware
fca5e0cd63
Merge pull request #11621 from cli/kw/1004-gh-agent-task-list-respects--w--web
`gh agent-task list`: implement `-w`/`--web` to open global agent tasks page in a browser
2025-09-02 13:57:31 -06:00
Kynan Ware
68af5ccda0
Merge pull request #11620 from cli/kw/1003-gh-agent-task-list-respects--l--limit
`gh agent-task list`: implement `--limit` flag
2025-09-02 13:57:14 -06:00
Kynan Ware
0dcf0c6c81
Merge pull request #11619 from cli/kw/1002-gh-agent-task-list-respects-cwd-repo-and---repo-flag
`gh agent-task list`: Implement repo scoping support
2025-09-02 13:56:40 -06:00
Kynan Ware
c5f7be9adb Replace panic with require.FailNow in test
Updated the test to use require.FailNow instead of panic when CapiClient is called with --web, improving test failure reporting and consistency.
2025-09-02 13:14:37 -06:00
Kynan Ware
c4c0ddc8c2 Add test for web mode with repo flag in listRun
Added a test case to ensure that web mode in listRun uses the global URL even when the --repo flag is set. This improves coverage for scenarios where both web mode and repo are specified.
2025-09-02 13:13:35 -06:00
Kynan Ware
93f7e9847f Add comment on web dashboard filtering limitation
Added a comment explaining that the web GUI does not currently support filtering by repo, so the agents dashboard is opened without arguments. Notes future improvement if repo filtering becomes available.
2025-09-02 13:11:10 -06:00
Kynan Ware
51aa033b2e Add test case for negative limit in list command
Introduces a test to verify that passing a negative value to the --limit flag in the agent-task list command returns the expected error message.
2025-09-02 13:09:12 -06:00
Kynan Ware
163eb7e7c8 Return NoResultsError when no agent tasks found
Replaces plain output with a NoResultsError in listRun when no agent tasks are found. Updates related tests to expect the error instead of output, improving error handling consistency.
2025-09-02 13:04:27 -06:00
Kynan Ware
227f0bd01d Add comment explaining error handling in listRun
Added a comment to clarify why the error from opts.BaseRepo() is ignored in listRun. This provides context for handling cases when the current working directory is not a repo and --repo is not set.
2025-09-02 12:55:03 -06:00
Kynan Ware
4a07cdf940 Simplify time calculation in listRun test
Replaces explicit duration parsing with direct multiplication for calculating a timestamp 6 hours ago in Test_listRun, improving code clarity.
2025-09-02 12:52:52 -06:00
Kynan Ware
97da7fc1d2 Simplify BaseRepo assignment in list command
Removes unnecessary nil check for Factory before assigning BaseRepo in the agent-task list command. This streamlines the code since Factory is always expected to be non-nil.
2025-09-02 12:50:15 -06:00
Babak K. Shandiz
d56a902a07
docs(featuredetection): add godoc for min GHES version for advanced issue search
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-02 12:09:38 +01: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
Benjamin Levesque
a9cc63b8a3
refactor without VisitAll 2025-08-31 18:09:46 +02:00
Benjamin Levesque
141518d8a3
Merge branch 'trunk' into auth-status-json-output-8635 2025-08-31 18:01:56 +02:00
Benjamin Levesque
45ecc5ece9
introduce AddJSONFlagsWithoutShorthand 2025-08-31 17:56:52 +02: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
0104d8c0db
refactor: improve mock feature detector names
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 13:57:47 +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
e9b3ac364a
test(featuredetection): add tests for advanced issue search detection
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-30 15:51:57 +01:00
Babak K. Shandiz
f16c267bad
fix(featuredetection): add feature detection for advanced issue search
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-30 15:51:16 +01:00
Kynan Ware
61c8b5ef09
Merge branch 'kw/1003-gh-agent-task-list-respects--l--limit' into kw/1004-gh-agent-task-list-respects--w--web 2025-08-29 19:14:52 -06:00
Kynan Ware
ffc8792260
Merge branch 'kw/1002-gh-agent-task-list-respects-cwd-repo-and---repo-flag' into kw/1003-gh-agent-task-list-respects--l--limit 2025-08-29 19:14:37 -06:00
Kynan Ware
3197193e42 Handle repo resolution errors gracefully in agent-task list
Updated listRun to ignore errors from BaseRepo resolution and proceed when possible. Adjusted tests to reflect that repo resolution errors no longer surface, improving robustness when repo information is ambiguous.
2025-08-29 19:13:35 -06:00
Kynan Ware
a2d75d12f6 Add --web flag to agent-task list command
Introduces a --web flag to the agent-task list command, allowing users to open the agent tasks page in their browser. Updates tests to cover the new flag and browser interaction.
2025-08-29 18:21:47 -06:00