santize sheet name and file name#55
Merged
Divyanshu Tiwari (divyanshu-tiwari) merged 5 commits intomainfrom Apr 2, 2026
Merged
santize sheet name and file name#55Divyanshu Tiwari (divyanshu-tiwari) merged 5 commits intomainfrom
Divyanshu Tiwari (divyanshu-tiwari) merged 5 commits intomainfrom
Conversation
Copilot started reviewing on behalf of
Divyanshu Tiwari (divyanshu-tiwari)
April 1, 2026 08:10
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to standardize name sanitization across the pipeline by promoting the existing column/header sanitizer to a public converter.Sanitize function, applying it to file/archive context filenames, and adding an opt-in XLSX sheet-name sanitization option.
Changes:
- Promotes
sanitizeColumnNametoconverter.Sanitizeand updates CSV/XLSX header sanitization call sites. - Applies
converter.Sanitizeto file and archive task context values used for output filenames. - Adds
sanitize_sheet_namessupport in the XLSX converter and refactors sheet reading into anxlsxmethod.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/pkg/pipeline/task/file/file.go | Sanitizes CtxKeyFileNameWrite context value using converter.Sanitize. |
| internal/pkg/pipeline/task/archive/tar.go | Sanitizes TAR entry base names when setting CtxKeyArchiveFileNameWrite. |
| internal/pkg/pipeline/task/archive/zip.go | Sanitizes ZIP entry base names when setting CtxKeyArchiveFileNameWrite. |
| internal/pkg/pipeline/task/converter/converter.go | Exports sanitizer as Sanitize (previously sanitizeColumnName). |
| internal/pkg/pipeline/task/converter/csv.go | Switches CSV header init to use Sanitize. |
| internal/pkg/pipeline/task/converter/xlsx.go | Adds sanitize_sheet_names option and uses Sanitize for headers (and optionally sheet names). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Mayuresh Pawar (Mayureshpawar29)
approved these changes
Apr 1, 2026
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.
Description
This pull request introduces improvements to how file and sheet names are handled and sanitized throughout the pipeline. The main focus is on standardizing the sanitization process by using a single
Sanitizefunction for all relevant contexts, and adding new support for optional sheet name sanitization in XLSX conversion.Sanitization and naming improvements:
Sanitizefunction fromconverter, ensuring consistent normalization of names across file, archive, and converter tasks. [1] [2] [3] [4]sanitizeColumnNametoSanitizeand exported it from theconverterpackage for use in other modules.XLSX converter enhancements:
SanitizeSheetNamesoption to the XLSX converter, allowing users to optionally sanitize sheet names in addition to headers. [1] [2]Checklist