From 32070025608eff4b7ddbe013f0cc2284cce51312 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 11:18:32 +0000 Subject: [PATCH 1/2] Initial plan From 6bbccf9bdd86622c1f7a9f41e0a6f7f62522463f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 11:36:22 +0000 Subject: [PATCH 2/2] rename rewritePluginsBlock and rewriteObjectFormatPlugins to include ToDependencies suffix Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3766894f-3565-40dc-9e25-56412d6b61ad Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/cli/codemod_plugins.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cli/codemod_plugins.go b/pkg/cli/codemod_plugins.go index c927c20cfe5..e38f196b470 100644 --- a/pkg/cli/codemod_plugins.go +++ b/pkg/cli/codemod_plugins.go @@ -79,7 +79,7 @@ func migratePluginsToDependencies(lines []string) ([]string, bool) { // Collect the original block lines and rewrite them. block := lines[pluginsIdx:blockEnd] - rewritten, changed := rewritePluginsBlock(block) + rewritten, changed := rewritePluginsBlockToDependencies(block) if !changed { return lines, false } @@ -92,13 +92,13 @@ func migratePluginsToDependencies(lines []string) ([]string, bool) { return result, true } -// rewritePluginsBlock transforms the lines of a plugins block into a +// rewritePluginsBlockToDependencies transforms the lines of a plugins block into a // dependencies block, handling both array format and object format. // // Object format detection: if the block contains a `repos:` sub-key the input // is in object format. The `repos:` items become `packages:` children under // `dependencies:`; the `github-token:` key is preserved as-is. -func rewritePluginsBlock(block []string) ([]string, bool) { +func rewritePluginsBlockToDependencies(block []string) ([]string, bool) { if len(block) == 0 { return block, false } @@ -119,7 +119,7 @@ func rewritePluginsBlock(block []string) ([]string, bool) { } if isObjectFormat { - return rewriteObjectFormatPlugins(block, indent) + return rewriteObjectFormatPluginsToDependencies(block, indent) } // Array format – just rename the key and keep the body. @@ -132,7 +132,7 @@ func rewritePluginsBlock(block []string) ([]string, bool) { return result, true } -// rewriteObjectFormatPlugins handles the object format: +// rewriteObjectFormatPluginsToDependencies handles the object format: // // plugins: // repos: @@ -141,7 +141,7 @@ func rewritePluginsBlock(block []string) ([]string, bool) { // // It produces a `dependencies:` object block with `packages:` (renamed from `repos:`) // and preserves the `github-token:` key so APM can authenticate with the same token. -func rewriteObjectFormatPlugins(block []string, indent string) ([]string, bool) { +func rewriteObjectFormatPluginsToDependencies(block []string, indent string) ([]string, bool) { var result []string result = append(result, indent+"dependencies:")