Rename frontmatter_helpers.go to map_helpers.go#3850
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR renames frontmatter_helpers.go to map_helpers.go to better reflect that the file contains generic map utility functions rather than frontmatter-specific logic. The change improves code discoverability and organization.
Key changes:
- Renamed file using
git mvto preserve history - Added comprehensive test coverage with 13 test cases
- Updated documentation reference to reflect the new filename
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pkg/workflow/map_helpers.go |
Renamed from frontmatter_helpers.go, contains generic map utilities (parseIntValue, filterMapKeys) |
pkg/workflow/map_helpers_test.go |
New test file with comprehensive coverage for both utility functions |
pkg/workflow/frontmatter_extraction.go |
Updated comment to reference new filename map_helpers.go |
.github/workflows/super-linter.lock.yml |
Contains unrelated GitHub Actions version updates that should be in a separate PR |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| persist-credentials: false | ||
| - name: Download super-linter log | ||
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | ||
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 |
There was a problem hiding this comment.
This file contains unrelated changes that should not be part of a PR focused on renaming frontmatter_helpers.go to map_helpers.go. The changes here update GitHub Actions versions:
actions/download-artifactfrom a SHA to a different SHA (line 172)super-linter/super-linterfrom a SHA to tagv8.2.1(line 4544)actions/upload-artifactfrom a SHA to a different SHA (line 4566)
These action version updates should be in a separate PR to keep changes focused and make code review easier.
There was a problem hiding this comment.
Reverted the unrelated changes to super-linter.lock.yml in commit da17689. The file now only contains changes from the main branch merge.
|
@copilot merge main |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Rename frontmatter_helpers.go to map_helpers.go
This PR renames
pkg/workflow/frontmatter_helpers.gotopkg/workflow/map_helpers.goto better reflect its generic utility nature. The functions in this file (parseIntValueandfilterMapKeys) are general-purpose map and parsing utilities, not frontmatter-specific logic.Changes
Test Coverage
Created
pkg/workflow/map_helpers_test.gowith comprehensive tests:TestParseIntValue - 7 test cases covering:
TestFilterMapKeys - 6 test cases covering:
Verification
✅ All unit tests pass (make test-unit)
✅ Build succeeds (make build)
✅ No references to old filename remain
✅ Git history preserved with
git mv✅ Unrelated changes removed from PR
✅ Main branch merged successfully
Related Issue
Addresses #3822 - Semantic function clustering analysis identified this misnamed file.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.