gh agent-task view: accept /agent-sessions/* URL as argument#11707
Merged
babakks merged 8 commits intogithub-cli-epic-990from Sep 11, 2025
Merged
gh agent-task view: accept /agent-sessions/* URL as argument#11707babakks merged 8 commits intogithub-cli-epic-990from
gh agent-task view: accept /agent-sessions/* URL as argument#11707babakks merged 8 commits intogithub-cli-epic-990from
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for accepting PR agent-session URLs in the gh agent-task view command, allowing users to pass URLs like https://github.com/OWNER/REPO/pull/NUMBER/agent-sessions/SESSION-ID as arguments to directly view specific agent sessions.
- Extends the existing URL parsing functionality in PR commands to handle additional path segments after the pull request number
- Adds new agent-task functionality including create, list, and view commands for GitHub Copilot agent tasks
- Implements URL parsing for PR agent-session URLs to extract session IDs
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cmd/root/root.go | Adds agent-task command registration to the CLI root |
| pkg/cmd/pr/shared/finder.go | Extends ParseURL to return additional path segments and adds ParseFullReference function |
| pkg/cmd/pr/shared/finder_test.go | Adds comprehensive tests for URL parsing with additional path segments |
| pkg/cmd/pr/edit/edit.go | Updates ParseURL call to handle new return signature |
| Multiple agent-task files | Implements complete agent-task command suite with create, list, and view functionality |
| api/queries_*.go | Adds Repository field to PullRequest and DatabaseID to GitHubUser structs |
| go.mod | Adds msgpack dependency for GraphQL node ID encoding |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
5cc2432 to
6b87292
Compare
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
BagToad
approved these changes
Sep 10, 2025
Member
BagToad
left a comment
There was a problem hiding this comment.
Looks good! Left some comments but it's really mostly about naming stuff so take it or leave it 👍 🍻
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for PR agent-session URLs, in the form of:
A/C verification
Confirmed: