feat: added test and workflow that verifies templates#32
Merged
RafaelJohn9 merged 5 commits intomainfrom Jun 30, 2025
Merged
Conversation
…a comment in the first line Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
…capture all files instead of failing the first time it finds an invalid template\n Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
…issing Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a Rust test and a GitHub Actions workflow to ensure every file under templates/ begins with the correct comment syntax, and updates all existing templates accordingly.
- Introduces
tests/verify_templates.rsto recursively check first-line comments based on file extension. - Prepends appropriate comment lines to various markdown and YAML template files.
- Adds
.github/workflows/verify-templates.ymlto run the new test on pull requests.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/verify_templates.rs | New test that validates first-line comments in templates |
| templates/pr-templates/*.md | Added HTML-comment prefixes (<!-- ... -->) |
| templates/issue-templates/bug.yml | Removed leading dash to allow first-line # comment |
| templates/CODE_OF_CONDUCT.md | Added HTML-comment prefix |
| .github/workflows/verify-templates.yml | New workflow to run the verify-templates test |
Comments suppressed due to low confidence (1)
tests/verify_templates.rs:76
- Change the expected prefix output from
{:?}to{}in theprintln!so the prefix is printed without extra quotes, making it easier to read.
println!(
Better way to create hashmap Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
fix #26
feat: added test and workflow that verifies all templates start with a comment in the first line.