Conversation
…proxy changes - mcp_setup_generator.go: move the cli-proxy GitHub MCP skip guard clause before the standard tools check, following Go's idiomatic early-continue pattern for improved readability and separation of concerns - unified_prompt_step.go: renumber section comment '9b' to '10' and former '10' to '11' for consistent sequential numbering Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies recently added cli-proxy logic by making the MCP setup generator use an early-continue guard clause and by renumbering prompt-section step comments to keep them sequential.
Changes:
- Refactor
generateMCPSetupto skip GitHub MCP registration via an early-continue whencli-proxyis enabled (preserving prior behavior). - Renumber prompt-section step comments to maintain a clean
...9, 10, 11...sequence.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/mcp_setup_generator.go | Moves the cli-proxy skip for GitHub MCP registration to an early-continue guard clause for clearer control flow. |
| pkg/workflow/unified_prompt_step.go | Renumbers step comment labels (9b → 10, 10 → 11) to keep ordering consistent. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
Code simplification of recent changes from PR #25013 (Remove
cli-proxy-writablefeature flag and add read-only gh CLI prompt forcli-proxy).Files Simplified
pkg/workflow/mcp_setup_generator.go— Apply Go's idiomatic early-continue guard clausepkg/workflow/unified_prompt_step.go— Fix sequential step numbering (9b→10,10→11)Improvements Made
1. Early-Continue Guard Clause (
mcp_setup_generator.go)The cli-proxy skip logic was nested inside the standard-MCP-tools
ifblock:Moved the guard clause before the block following Go's early-continue idiom, clearly separating "what to skip" from "what to include":
2. Consistent Step Numbering (
unified_prompt_step.go)The new section was inserted as
9bbetween9and10. Renumbered to maintain a clean sequential sequence:9b→10, former10→11.Changes Based On
Recent changes from:
cli-proxy-writablefeature flag and add read-only gh CLI prompt forcli-proxy#25013 — Removecli-proxy-writablefeature flag and add read-only gh CLI prompt forcli-proxyTesting
TestCollectPromptSections_CliProxy— all 4 sub-tests passTestBuildAWFArgsCliProxy— passesgo vet ./pkg/workflow/— cleanmake build— succeedsReview Focus
Please verify that the early-continue refactor preserves the same tool-registration behaviour and that the step renumbering matches the surrounding comment style.
References: §24067037288