Rename generic utility files in pkg/cli to reflect their specific purpose#3627
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Rename shared_utils.go → pr_automerge.go (PR auto-merge functionality) - Rename frontmatter_utils.go → frontmatter_editor.go (frontmatter field editing) - Rename repeat_utils.go → retry.go (retry/repeat execution logic) - Update logger names to match new file names - All tests pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Rename utility files in pkg/cli for clarity
Rename generic utility files in pkg/cli to reflect their specific purpose
Nov 11, 2025
pelikhan
approved these changes
Nov 11, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves code discoverability by renaming three utility files in pkg/cli to have more descriptive names that reflect their actual functionality. The renaming follows established best practices from the project's coding guidelines by avoiding generic names like "utils" in favor of specific, purpose-driven filenames.
Key Changes:
- Renamed utility files to better reflect their purpose
- Updated logger variable names to match new file names
- Updated Claude Code CLI version from 2.0.35 to 2.0.37 across multiple workflow lock files
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/cli/retry.go | Renamed from repeat_utils.go - provides retry/repeat execution with signal handling |
| pkg/cli/pr_automerge.go | Renamed from shared_utils.go - contains PR auto-merge and workflow completion logic |
| pkg/cli/frontmatter_editor.go | Renamed from frontmatter_utils.go - handles frontmatter field update operations |
| .github/workflows/*.lock.yml (11 files) | Updated Claude Code CLI version to 2.0.37 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Three utility files in
pkg/clihad generic names that didn't reflect their actual functionality, reducing code discoverability. This refactors them to use descriptive names matching their purpose.Changes
File Renames
shared_utils.go→pr_automerge.go- PR auto-merge and workflow completion logicfrontmatter_utils.go→frontmatter_editor.go- Frontmatter field update operationsrepeat_utils.go→retry.go- Retry/repeat execution with signal handlingLogger Updates
sharedUtilsLog→prAutomergeLog("cli:pr_automerge")frontmatterUtilsLog→frontmatterEditorLog("cli:frontmatter_editor")Impact
No breaking changes - all files remain in the same package with identical public APIs. No import updates required in consuming code (
trial_command.go,run_command.go,add_command.go,update_command.go).Addresses Priority 1 refactoring from #3604.
Original prompt
💡 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.