Skip to content

feat(repo-policy-sync): make generated pull request templates configurable - #36

Merged
AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
etas-contrib:feat/configurable-pull-request-template
Sep 11, 2026
Merged

feat(repo-policy-sync): make generated pull request templates configurable#36
AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
etas-contrib:feat/configurable-pull-request-template

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

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

  • Added the pull_request_template TOML setting and --pull-request-template CLI override.
  • Resolved configured paths relative to the configuration file, with CLI precedence.
  • Applied custom templates to new, updated, failure, and recreated policy pull requests.
  • Validated required supported placeholders, including the ownership and branch-head safety markers.
  • Documented the configuration, CLI option, and supported placeholders.
  • Added regression coverage.

Closes #35

@AlexanderLanin AlexanderLanin changed the title [repo_policy_sync] Make generated pull request template configurable feat(repo-policy-sync): make generated pull request templates configurable Sep 11, 2026
@AlexanderLanin
AlexanderLanin requested a balanced review from Copilot September 11, 2026 04:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread repo_policy_sync/src/github.py Outdated
@lurtz

lurtz commented Sep 11, 2026

Copy link
Copy Markdown

I have not looked at the changes, but wonder if the intention is prone to overengineering. Dependabot and renovate also ignore pull request templates.

lurtz
lurtz previously approved these changes Sep 11, 2026
@AlexanderLanin

Copy link
Copy Markdown
Member Author

this is the template this tool is using

Comment thread repo_policy_sync/src/github.py

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this we have to test and see what some shortcomings are.

AlexanderLanin and others added 3 commits September 11, 2026 11:37
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Lanin <alex@lanin.de>
@lurtz

lurtz commented Sep 11, 2026

Copy link
Copy Markdown

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.

@AlexanderLanin

Copy link
Copy Markdown
Member Author

agreed, but you can also click the compare link next to the force push message

@AlexanderLanin

Copy link
Copy Markdown
Member Author

but yeah, even with compare you wouldnt know that its a simple rebase

@lurtz

lurtz commented Sep 11, 2026

Copy link
Copy Markdown

but yeah, even with compare you wouldnt know that its a simple rebase

Exactly, imagine on main a lot of stuff was changed and you had to solve merge conflicts. It is hard to track that as a reviewer with force pushes.

@AlexanderLanin
AlexanderLanin merged commit 08eaf54 into eclipse-score:main Sep 11, 2026
3 checks passed
@AlexanderLanin
AlexanderLanin deleted the feat/configurable-pull-request-template branch September 11, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[repo_policy_sync] Make generated pull request template configurable

4 participants