Conversation
… joins - Remove orphaned doc comments in include_expander.go (ProcessIncludesForEngines/SafeOutputs) and include_processor.go (ProcessIncludes) left over from function renaming - Simplify allIncludedTools concatenation using strings.Join with a parts slice - Simplify hasExplicitGitHubTool using direct map lookups (nil-safe in Go) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 25, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes stale/orphaned doc comments left behind by earlier refactors and simplifies two small code patterns in the workflow compiler to reduce branching and nesting.
Changes:
- Removed orphaned doc comments in the include processor/expander code.
- Simplified tool-string concatenation by collecting non-empty parts and using
strings.Join. - Simplified
hasExplicitGitHubTooldetection using nil-safe Go map reads and a flat boolean expression.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/compiler_orchestrator_tools.go | Simplifies tool string assembly and explicit GitHub tool detection logic. |
| pkg/parser/include_processor.go | Removes stale doc comment referencing a deleted/renamed function. |
| pkg/parser/include_expander.go | Removes stale doc comments referencing old exported function names. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 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.
This PR simplifies recently modified code (PRs #28366 and #28387) to improve clarity and reduce noise.
Files Simplified
pkg/parser/include_processor.go— removed orphaned doc comment for the deletedProcessIncludesfunctionpkg/parser/include_expander.go— removed orphaned doc comments for the renamedProcessIncludesForEngines/ProcessIncludesForSafeOutputsfunctionspkg/workflow/compiler_orchestrator_tools.go— two simplifications:strings.Join+ a parts slice instead of nested if/else brancheshasExplicitGitHubTooldetection using direct map lookups (reading from a nil map is safe in Go and returns the zero value)Improvements Made
Removed Orphaned Comments
Stale doc comments left over from function renaming in PR #28366 were removed. These comments described functions that no longer exist under the documented names, creating confusion.
Simplified String Join
Simplified Nil-Safe Map Lookup
Changes Based On
\{\\{\#import}}directives in workflow markdown bodyTesting
go test ./pkg/parser/... ./pkg/workflow/...)make build)Note
🔒 Integrity filter blocked 1 item
The following item was blocked because it doesn't meet the GitHub integrity level.
pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".To allow these resources, lower
min-integrityin your GitHub frontmatter: