Add web URL display to graph command for GitHub issues search#4
Merged
Add web URL display to graph command for GitHub issues search#4
Conversation
Co-authored-by: maxbeizer <2006658+maxbeizer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Display a link to the web version of the search
Add web URL display to graph command for GitHub issues search
Jul 15, 2025
maxbeizer
reviewed
Jul 15, 2025
| len(issueItems), closedIssues, openIssues) | ||
|
|
||
| // Display web URL for the issues search | ||
| issuesWebURL := buildWebURL("is:issue", login) |
Owner
There was a problem hiding this comment.
@copilot let's not limit this to just issues. Please remove is:issue from the search string
Contributor
Author
There was a problem hiding this comment.
Removed is:issue filter from the search string. The web URL now includes both issues and pull requests. Updated display text to "View in GitHub:" and added tests to verify the new behavior. (commit b18cddc)
Co-authored-by: maxbeizer <2006658+maxbeizer@users.noreply.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.
Currently the graph command shows contribution statistics but doesn't provide an easy way to view the same results in the GitHub web interface. This PR adds a web URL link that points to the GitHub issues search page with the same query parameters.
Changes
buildWebURL()function that generates properly encoded GitHub search URLshandleGraphCommand()to display the web URL after the summary statisticsExample Output
After running
gh contrib graph username, the output now includes:The URL respects all the same filters as the API query:
org:github)author:username)--sinceflag is used (created:>YYYY-MM-DD)is:issue)Testing
TestHandleGraphCommand_WebURLto verify URL generation in integrationTestBuildWebURLto test the URL building function in isolationFixes #3.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.