Is your feature request related to a problem?
Self-driving pull requests often target the wrong branch for a team that runs one PostHog project across a whole DTAP setup (development, test, acceptance, production) and separates the environments by host or another event property. Only one base branch can be set, per repository, so every report on that repository opens its pull request against that same branch, whichever environment the signal came from.
Describe the solution you'd like
A way to choose the base branch from the team's own rules, the way repo routing rules already choose the repository. For example, a signal whose host is the acceptance environment would open its pull request against the acceptance branch.
Describe alternatives you've considered
- Repo routing rules. They steer which repository a report goes to, but carry no branch: a rule is
rule_text, repository and priority only.
- One PostHog project per environment.
SignalTeamConfig is one-to-one with a team, so base branches are already per project. This would work, but it splits a setup that is deliberately kept unified.
- Re-targeting each pull request by hand after it opens.
Additional context
Confirmed on master. SignalTeamConfig.autostart_base_branches is a flat map of lowercased owner/repo to a single branch name, and base_branch_for() takes a repository string and nothing else, so auto-start resolves the branch with no report or signal property in play. The inbox "Create PR" button reads the same map, so both paths behave the same way.
The documentation describes the setting the same way: the PostHog Desktop settings docs say "Choose a base branch for automatically opened pull requests in each repository", shared by the web app and the Agents tab.
No event currently records the resolved base branch or repository of an auto-start run, so how often this misfires is not measurable today.
Related work
Debug info
Is your feature request related to a problem?
Self-driving pull requests often target the wrong branch for a team that runs one PostHog project across a whole DTAP setup (development, test, acceptance, production) and separates the environments by host or another event property. Only one base branch can be set, per repository, so every report on that repository opens its pull request against that same branch, whichever environment the signal came from.
Describe the solution you'd like
A way to choose the base branch from the team's own rules, the way repo routing rules already choose the repository. For example, a signal whose host is the acceptance environment would open its pull request against the acceptance branch.
Describe alternatives you've considered
rule_text,repositoryandpriorityonly.SignalTeamConfigis one-to-one with a team, so base branches are already per project. This would work, but it splits a setup that is deliberately kept unified.Additional context
Confirmed on master.
SignalTeamConfig.autostart_base_branchesis a flat map of lowercasedowner/repoto a single branch name, andbase_branch_for()takes a repository string and nothing else, so auto-start resolves the branch with no report or signal property in play. The inbox "Create PR" button reads the same map, so both paths behave the same way.The documentation describes the setting the same way: the PostHog Desktop settings docs say "Choose a base branch for automatically opened pull requests in each repository", shared by the web app and the Agents tab.
No event currently records the resolved base branch or repository of an auto-start run, so how often this misfires is not measurable today.
Related work
Debug info
docker compose, version/commit: [please provide]Sunsetting Kubernetes support), version/commit: [please provide]