feat(repo-policy-sync): make generated pull request templates configurable - #36
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Documented whitespace variants pass validation but remain unrendered, potentially removing required PR safety markers.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds configurable pull-request templates to Repository Policy Sync.
Changes:
- Adds TOML and CLI template selection with path resolution and precedence.
- Validates placeholders and applies templates across PR workflows.
- Documents and tests the feature.
File summaries
| File | Description |
|---|---|
repo_policy_sync/src/config.py |
Adds template configuration. |
repo_policy_sync/src/cli.py |
Adds CLI override and loading. |
repo_policy_sync/src/github.py |
Validates and renders templates. |
repo_policy_sync/src/runner.py |
Propagates templates through PR flows. |
repo_policy_sync/tests/test_config.py |
Tests configuration resolution. |
repo_policy_sync/tests/test_cli.py |
Tests CLI override. |
repo_policy_sync/tests/test_github.py |
Tests loading and rendering. |
repo_policy_sync/docs/reference/configuration.md |
Documents configuration and placeholders. |
repo_policy_sync/docs/reference/cli.md |
Documents the CLI option. |
repo_policy_sync/docs/explanation/pull-request-safety.md |
Explains custom-template safety. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
I have not looked at the changes, but wonder if the intention is prone to overengineering. Dependabot and renovate also ignore pull request templates. |
|
this is the template this tool is using |
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
I think this we have to test and see what some shortcomings are.
b98e866 to
9090129
Compare
|
FYI I prefer merge commits in feature branches, because they help to to better track your changes during my review. In the end this branch will be squashed the merge commits are gone. |
|
agreed, but you can also click the compare link next to the force push message |
|
but yeah, even with compare you wouldnt know that its a simple rebase |
Exactly, imagine on |
Why
Generated policy pull requests always use the packaged template, so downstream repositories cannot adapt the body to their contribution and review conventions. Repository-level GitHub templates do not solve this because the tool supplies an explicit body when creating and updating policy pull requests.
This allows downstream users to retain the existing policy-sync behavior while using repository-specific pull-request content.
What changed
pull_request_templateTOML setting and--pull-request-templateCLI override.Closes #35