Add source links to GitHub MCP tools report#17709
Conversation
- Add Source and Instructions File fields with GitHub blob links to Executive Summary - Make pkg/workflow/data/github_toolsets_permissions.json a clickable link in JSON Mapping Comparison section - Add PR link instructions to the Action field - Add JSON Mapping and Instructions entries with links to Methodology section - Add Link Sources rule to Report Quality guidelines Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot always cross correlate sources to GitHub file URLs in the GitHub-MCP-server repo. Update agentic workflows that generates the .json if missing |
- Add Phase 1 step 5 with verified toolset→source file mapping in github/github-mcp-server - Fix mappings: users/orgs both point to search.go (SearchUsers/SearchOrgs), orgs note added for security_advisories.go - Add source file link to Phase 3 tool documentation - Add Source link per toolset in report template (Tools by Toolset section) - Add MCP Server Source to Methodology section - Handle missing JSON: Phase 1 step 4 and Phase 2 updated to create from scratch if file is missing - Update Output Requirements and begin steps list to reflect new logic Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in f85fd65. Cross-correlating sources to github-mcp-server URLs: Added Phase 1 step 5 with a verified toolset→source file mapping pointing to Handle missing JSON: Updated Phase 1 step 4 (try to read, note if missing), Phase 2 (create from scratch if missing), and Output Requirements + execution steps list to cover the create-from-scratch case alongside the existing update-on-discrepancy logic. |
There was a problem hiding this comment.
Pull request overview
This PR enhances the github-mcp-tools-report workflow by adding clickable source links to the generated discussion reports and adding handling for missing JSON mapping files. The changes make it easier to navigate from reports to source code and data files.
Changes:
- Added source file links throughout the report template pointing to both local repository files and upstream
github-mcp-serversource files - Added a new Phase 1 step 5 to cross-reference each toolset with its source file in the
github-mcp-serverrepository - Updated JSON mapping handling to create the file from scratch if missing, rather than only updating when discrepancies exist
Comments suppressed due to low confidence (3)
.github/workflows/github-mcp-tools-report.md:217
- The repository is hardcoded as
github/gh-awin this URL. This should use the template variable${{ github.repository }}instead:https://github.com/${{ github.repository }}/blob/main/pkg/workflow/data/github_toolsets_permissions.json
Report on the comparison between the MCP server tools and the [`pkg/workflow/data/github_toolsets_permissions.json`](https://github.com/github/gh-aw/blob/main/pkg/workflow/data/github_toolsets_permissions.json) file:
.github/workflows/github-mcp-tools-report.md:351
- The repository is hardcoded as
github/gh-awin these URLs. This should use the template variable${{ github.repository }}instead. For example:https://github.com/${{ github.repository }}/blob/main/pkg/workflow/data/github_toolsets_permissions.json
- **JSON Mapping**: [pkg/workflow/data/github_toolsets_permissions.json](https://github.com/github/gh-aw/blob/main/pkg/workflow/data/github_toolsets_permissions.json)
- **Instructions**: [.github/instructions/github-mcp-server.instructions.md](https://github.com/github/gh-aw/blob/main/.github/instructions/github-mcp-server.instructions.md)
.github/workflows/github-mcp-tools-report.md:367
- The example URL in this guideline hardcodes
github/gh-aw. This should be changed to use the template variable${{ github.repository }}in the example to demonstrate the correct pattern:https://github.com/${{ github.repository }}/blob/main/...
- **Link Sources**: Always use full GitHub URLs (e.g., `https://github.com/github/gh-aw/blob/main/...`) when referencing files and PRs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Source**: [pkg/workflow/data/github_toolsets_permissions.json](https://github.com/github/gh-aw/blob/main/pkg/workflow/data/github_toolsets_permissions.json) | ||
| - **Instructions File**: [.github/instructions/github-mcp-server.instructions.md](https://github.com/github/gh-aw/blob/main/.github/instructions/github-mcp-server.instructions.md) |
There was a problem hiding this comment.
The repository owner and name are hardcoded as github/gh-aw in these URLs. This should use the template variable ${{ github.repository }} instead to make the workflow portable and work correctly if the repository is forked or the workflow is reused in a different repository. The pattern used elsewhere in the codebase (e.g., .github/workflows/copilot-pr-merged-report.md:248) shows: https://github.com/${{ github.repository }}/blob/main/...
This issue also appears in the following locations of the same file:
- line 217
- line 350
- line 367
| - **Source**: [pkg/workflow/data/github_toolsets_permissions.json](https://github.com/github/gh-aw/blob/main/pkg/workflow/data/github_toolsets_permissions.json) | |
| - **Instructions File**: [.github/instructions/github-mcp-server.instructions.md](https://github.com/github/gh-aw/blob/main/.github/instructions/github-mcp-server.instructions.md) | |
| - **Source**: [pkg/workflow/data/github_toolsets_permissions.json](https://github.com/${{ github.repository }}/blob/main/pkg/workflow/data/github_toolsets_permissions.json) | |
| - **Instructions File**: [.github/instructions/github-mcp-server.instructions.md](https://github.com/${{ github.repository }}/blob/main/.github/instructions/github-mcp-server.instructions.md) |
The
github-mcp-tools-reportworkflow generated discussions with no clickable links to the source files it references, making it harder to navigate from the report to the actual data and documentation.Changes to
.github/workflows/github-mcp-tools-report.mdSourceandInstructions Filefields with GitHub blob links topkg/workflow/data/github_toolsets_permissions.jsonand.github/instructions/github-mcp-server.instructions.mdpkg/workflow/data/github_toolsets_permissions.jsonreference a clickable link"Created pull request [#NUMBER](URL) with updated JSON mapping."JSON Mapping,Instructions, andMCP Server Sourceentries with direct blob links (including a link togithub/github-mcp-server/tree/main/pkg/github)Link Sourcesrule instructing the agent to always use full GitHub URLs when referencing files and PRsgithub/github-mcp-server/pkg/github/(e.g.issues→issues.go,users/orgs→search.go,stargazers→repositories.go)Source Fileas item 6 in per-tool documentation, linking to the toolset's source ingithub-mcp-serverSource:link to the correspondingpkg/github/*.gofilepkg/workflow/data/github_toolsets_permissions.jsonfrom scratch if the file does not exist, rather than only updating it when discrepancies are foundExpected Improvement
Future report runs will produce discussions with clickable links to both the local data files and the upstream
github-mcp-serversource files, making it easier to navigate from the report to the actual implementation. The workflow will also self-heal if the JSON mapping file is ever missing.Validation
Workflow compiled successfully: ✅
github-mcp-tools-reportOriginal prompt
This section details on the original issue you should resolve
<issue_title>[q] Add source links to GitHub MCP tools report</issue_title>
<issue_description>## Summary
Updates the
github-mcp-tools-reportworkflow to include clickable links to source files in the generated discussion report, as requested in discussion #17701.Changes Made
.github/workflows/github-mcp-tools-report.mdThe report template now includes links to:
Executive Summary — added
SourceandInstructions Filefields with GitHub blob links:pkg/workflow/data/github_toolsets_permissions.json.github/instructions/github-mcp-server.instructions.mdJSON Mapping Comparison section — the reference to
pkg/workflow/data/github_toolsets_permissions.jsonis now a clickable link.Action field — when a PR is created for JSON mapping updates, the report now instructs the agent to include a link to the PR number and URL.
Methodology section — added
JSON MappingandInstructionsentries with clickable links to the referenced files.Report Quality guidelines — added "Link Sources" rule to ensure the agent always uses full GitHub URLs when referencing files and PRs.
Expected Improvement
Future report runs will produce discussions with clickable links to the source files, making it easier to navigate from the report to the actual data and documentation files.
Validation
Workflow compiled successfully: ✅
github-mcp-tools-reportTriggered by: discussion #17701 comment from @pelikhan
To apply the patch locally:
Show patch preview (72 of 72 lines)
Comments on the Issue (you are @copilot in this section)
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.