Fix lint-go CGO failure by normalizing ResolveGhAwRef formatting and string construction#38778
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix workflow failure on main for run #11644
Fix Jun 12, 2026
lint-go CGO failure by normalizing ResolveGhAwRef formatting and string construction
This was referenced Jun 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request primarily addresses a lint-go CGO CI failure by eliminating a perfsprint-triggering fmt.Sprintf and re-normalizing formatting in ResolveGhAwRef (pkg/workflow/action_resolver.go). It also updates a compiled smoke-test workflow to use $HOME-based Copilot config paths and adjusts related environment variable setup.
Changes:
- Replaced
fmt.Sprintfwith direct string concatenation for the GitHub commits API path inResolveGhAwRef. - Normalized the surrounding Go block formatting without changing error semantics.
- Updated
.github/workflows/smoke-copilot-aoai-entra.lock.ymlto use$HOME/.copilotpaths and movedXDG_CONFIG_HOME/GH_AW_MCP_CONFIGsetup into therun:script.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/action_resolver.go | Avoids perfsprint lint by removing fmt.Sprintf for the commits API path and normalizes formatting in ResolveGhAwRef. |
| .github/workflows/smoke-copilot-aoai-entra.lock.yml | Switches Copilot config paths from /home/runner to $HOME and adjusts config-related environment setup in the workflow. |
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: 1
Comment on lines
+1852
to
+1856
| trap 'rm -f "$HOME/.copilot/settings.json"' EXIT | ||
| mkdir -p "$HOME/.copilot" | ||
| printf '%s' '{"builtInAgents":{"rubberDuck":false}}' > "$HOME/.copilot/settings.json" | ||
| export XDG_CONFIG_HOME="$HOME" | ||
| export GH_AW_MCP_CONFIG="$HOME/.copilot/mcp-config.json" |
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.
The CGO workflow run
#11644failed inlint-godue to formatting/lint violations inResolveGhAwRef(pkg/workflow/action_resolver.go). The failure was isolated to a small block that trippedgofmtandperfsprint.Root cause addressed
ResolveGhAwRefbuilt the commits API path withfmt.Sprintf, which triggeredperfsprint.gofmtin CI.Code changes
Behavioral impact