Frontmatter
| id | 7912 |
| title | Fix: Inconsistent and buggy prefixing in IssueSyncer archive paths |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Nov 29, 2025, 1:01 PM |
| updatedAt | Nov 29, 2025, 1:08 PM |
| githubUrl | https://github.com/neomjs/neo/issues/7912 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Nov 29, 2025, 1:08 PM |
Fix: Inconsistent and buggy prefixing in IssueSyncer archive paths
tobiu assigned to @tobiu on Nov 29, 2025, 1:08 PM

tobiu
Nov 29, 2025, 1:08 PM
Input from Gemini:
✦ I have refactored the implementation to unify the directory prefixing logic.
Changes:
- Unified Config: Renamed
milestoneArchivePrefixtoversionDirectoryPrefixinconfig.mjs. This clearer name reflects that the prefix applies to all version-based archive directories, whether derived from a milestone title or a release tag.- Robust Logic (IssueSyncer): Updated
#getIssuePathto apply this prefix conditionally. It checks if the source string (milestone title or release tag) already starts with the prefix. If so, it uses it as-is; otherwise, it prepends the prefix. This prevents "double-prefixing" bugs (e.g.,vv1.2.3).- Robust Logic (ReleaseSyncer): Applied the same conditional logic to
syncNotesusingreleaseFilenamePrefix. This ensures release note files are also correctly named (e.g.,v1.2.3.md) regardless of the input tag format.
tobiu closed this issue on Nov 29, 2025, 1:08 PM
The logic for generating archive paths in
IssueSyncer.mjs(#getIssuePath) is inconsistent and prone to "double-prefix" bugs.Inconsistency:
milestoneArchivePrefix+ title (e.g.,v+1.2.3->v1.2.3).release.tagNamedirectly. If the tag is1.2.3(common in npm), the folder becomes1.2.3(no prefix). If the tag isv1.2.3, it works, but this relies on the tag format rather than enforcing the config.Double-Prefix Bug:
${prefix}${title}.v1.2.3, this results invv1.2.3.Tasks:
IssueSyncer.mjs: Update#getIssuePathto conditionally apply prefixes only if the target string doesn't already start with them. This applies to both milestone titles (usingmilestoneArchivePrefix) and release tags (usingreleaseFilenamePrefix).ReleaseSyncer.mjs: Apply the same robust prefix logic tosyncNotesto preventvv1.2.3.mdfilenames for release notes.Goal: Ensure archive folders always have exactly one prefix (e.g.,
v1.2.3), regardless of whether the input was1.2.3orv1.2.3, and regardless of whether it came from a milestone or a release tag.