New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render per-repo pull request template #356
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
- repo: local | ||
hooks: | ||
{% set renders = ["precommit", "prettier", "github"] %} | ||
{% for render in renders %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an amazing use of Jinja, I love it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we could make even the list itself dynamic so we didn't have to update it, but alas that seems more challenging than it's worth 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice approach. And will be easily adjustable if we decide we need new blocks beyond the additional_sections and additional_checks blocks created here.
Fixes
Fixes #1470 by @AetherUnbound
Description
This PR allows the
PULL_REQUEST_TEMPLATE.md
file to be rendered with repo-specific additions. I took inspiration from the existing examples in order to set this one up, but @dhruvkb please let me know if there's a better way to do this! I believe there was also a desire to add some additional checks to the frontend repo's template, that could be done in this PR as well.In order to make things less cluttered, I also moved all the templates into a
templates
folder at the top level, and changed the logic within the.pre-commit-config.local.yaml.jinja
file to iterate over a list.Testing Instructions
just lint
should produce no changesjust render templates/PULL_REQUEST_TEMPLATE.catalog.md.jinja .github/PULL_REQUEST_TEMPLATE.md
should produce a change to the pull request template with the additional rendered content.Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin