Extract complex template string to helper method for better maintainability#18
Closed
Copilot wants to merge 2 commits into
Closed
Extract complex template string to helper method for better maintainability#18Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…thod Co-authored-by: BorDevTech <73800053+BorDevTech@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [nitpick] Similar to the previous comment, this template string is long and complex. Consider extracting this to a helper method like
Extract complex template string to helper method for better maintainability
Sep 21, 2025
generateUpdatedIssueBody(newGroupBody: string, currentCount: number, newCount: number) for better maintainability.
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 addresses a code maintainability nitpick by extracting a complex template string into a dedicated helper method.
Problem:
The
updateExistingIssuemethod contained a long, complex template string that was difficult to read and maintain:Solution:
Extracted the template logic into a focused helper method with proper TypeScript typing:
The new
generateUpdatedIssueBody(newGroupBody: string, currentCount: number, newCount: number): stringmethod encapsulates the template logic, making the code more readable and maintainable while preserving exactly the same functionality.Testing:
This is a minimal, surgical change that improves code organization without affecting any existing behavior.
Fixes #17.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.