Skip to content

Comments

[Repo Assist] Fix #803: do not copy _menu_template.html and _menu-item_template.html to output#995

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
repo-assist/fix-803-menu-template-copy-to-output-17453a74b14e630f
Draft

[Repo Assist] Fix #803: do not copy _menu_template.html and _menu-item_template.html to output#995
github-actions[bot] wants to merge 1 commit intomainfrom
repo-assist/fix-803-menu-template-copy-to-output-17453a74b14e630f

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated pull request from Repo Assist.

Closes #803

Summary

When a project uses custom menu templates (_menu_template.html and/or _menu-item_template.html), these files were being incorrectly copied to the output directory as if they were regular content files.

Root Cause

In BuildCommand.fs, both prepFile and processFile filter out internal template files using:

not (inputFileName.StartsWith("_template", StringComparison.Ordinal))

This correctly excludes _template.html, _template.tex, etc. — but _menu_template.html and _menu-item_template.html start with _menu, not _template, so they slipped through and were copied to output.

Fix

Added an additional guard in both prepFile and processFile:

&& not (
    name.StartsWith("_menu", StringComparison.Ordinal)
    && name.EndsWith("_template.html", StringComparison.OrdinalIgnoreCase)
)

This pattern covers the two known cases (_menu_template.html, _menu-item_template.html) and any future _menu-*_template.html variants, with minimal risk of false positives.

Test Status

  • ✅ Build succeeded (0 errors, 4 pre-existing warnings)
  • ✅ 346 tests passed, 6 skipped, 0 failed across all test suites

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@828ac109efb43990f59475cbfce90ede5546586c. View source at https://github.com/githubnext/agentics/tree/828ac109efb43990f59475cbfce90ede5546586c/workflows/repo-assist.md.

…l to output

These internal navigation template files were being copied to the output
directory because the filter in prepFile/processFile only excluded files
starting with "_template", but not the menu template variants.

Added an additional guard to skip files whose name starts with "_menu"
and ends with "_template.html" — covering both _menu_template.html and
_menu-item_template.html (and any future _menu-*_template.html files).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

✅ Pull request created: #995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_menu-item_template _menu_template oddities

0 participants