Rename getPlaywrightDomainsCodemod to getPlaywrightDomainsToNetworkAllowedCodemod#22872
Merged
Merged
Conversation
Closed
10 tasks
…lowedCodemod Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4b232a18-9130-49eb-a7d7-bdf77050b74b
Copilot
AI
changed the title
[WIP] Rename Go functions in codemod_playwright_domains.go and codemod_plugins.go
Rename Mar 25, 2026
getPlaywrightDomainsCodemod to getPlaywrightDomainsToNetworkAllowedCodemod
Contributor
There was a problem hiding this comment.
Pull request overview
Renames the Playwright domains codemod constructor to make the migration destination (network.allowed) explicit and easier to discover/search.
Changes:
- Renamed
getPlaywrightDomainsCodemodtogetPlaywrightDomainsToNetworkAllowedCodemod - Updated codemod registry to use the new constructor name
- Updated test call sites to reference the renamed constructor
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/cli/codemod_playwright_domains.go | Renames the codemod constructor and aligns the doc comment with the new name. |
| pkg/cli/codemod_playwright_domains_test.go | Updates all constructor call sites in tests to the new function name. |
| pkg/cli/fix_codemods.go | Updates codemod registry registration to call the renamed constructor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -11,7 +11,7 @@ import ( | |||
| ) | |||
|
|
|||
| func TestGetPlaywrightDomainsCodemod(t *testing.T) { | |||
There was a problem hiding this comment.
Test name no longer matches the constructor under test. To keep tests discoverable and consistent with the other codemod tests (e.g., codemod_roles_test.go:14), rename TestGetPlaywrightDomainsCodemod to TestGetPlaywrightDomainsToNetworkAllowedCodemod.
Suggested change
| func TestGetPlaywrightDomainsCodemod(t *testing.T) { | |
| func TestGetPlaywrightDomainsToNetworkAllowedCodemod(t *testing.T) { |
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.
Codemod function names follow a
*To*Codemodconvention to make migration direction explicit, butgetPlaywrightDomainsCodemodomitted the destination (network.allowed), making it hard to discover by agents or developers searching for "migrate playwright domains to network firewall config."Changes
codemod_playwright_domains.go— rename function definition and update commentcodemod_playwright_domains_test.go— update all 9 call sitesfix_codemods.go— update registration call siteThe new name aligns with the existing pattern:
getPlaywrightDomainsCodemod()getPlaywrightDomainsToNetworkAllowedCodemod()Consistent with siblings:
getPluginsToDependenciesCodemod,getRolesToOnRolesCodemod,getMigrateWritePermissionsToReadCodemod.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.