PostHog / PostHog/posthog

Self-driving: create the tracker issue when opening a PR, and put the ID in the PR title

Open
#79,133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

Filing via the API, so I can't apply the enhancement label myself — please tag per CONTRIBUTING.

Is your feature request related to a problem?

Please describe.

Every self-driving PR arrives with no tracker issue. The body says:

No Linear ticket — sourced from a PostHog inbox report.

Our repo requires a Linear issue ID in every PR title. It's not bureaucracy: the ID is what routes a change to an owning team, what drives the ticket through its states via Linear's Git automations, and the only durable record of why once the PR is squash-merged. So every PostHog PR needs a human to open the report, create the issue, and retitle the PR before it can merge.

The frustrating part is that PostHog already does the hard half. The Linear integration is connected in our project, and External references -> Create issue on an error-tracking issue produces exactly the right ticket — pre-filled with the stack trace and a link back. It just isn't wired to the PR the implementation agent opens.

Describe the solution you'd like

When an actionable report becomes a PR, create the issue in the connected tracker — the same way Create issue does today — and include its identifier in the PR title.

Ideally configurable:

  • Which tracker / team / project to file into. A default team would cover most cases; a mapping from the affected code area would be better (we route by app: apps/conductor -> Conductor, apps/api -> Platform, etc.).
  • A PR-title template, so the ID lands where the repo's convention expects it. Ours wants type(scope): description (TEAM-123).

Falling back to "create the issue and put the link in the ## Ticket section of the PR body" would already be a large improvement over nothing.

Describe alternatives you've considered

  • Creating the ticket by hand from the linked report. Current state. It works — the report URL is in the PR footer — but it's a manual step per PR, and PRs sit unmergeable until someone does it.
  • Auto-creating the ticket ourselves from a GitHub Action, off the report URL in the PR body. We chose not to: the report is PostHog's object, and reconstructing its context from the outside to file a ticket is strictly worse than PostHog filing it with the context it already has.
  • Exempting bot PRs from the ticket rule. Rejected — these are real changes that need an owner and a paper trail, same as any other.

Additional context

Related: PostHog/posthog#79131.

Debug info

  • PostHog Cloud (US)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading related issue PostHog/posthog#79131 and the existing External references → Create issue flow. Trace how an actionable report becomes a PR, including the mentioned apps/conductor and apps/api routing areas. Done means the connected tracker issue is created with the report context and its identifier is added to the PR title or Ticket section according to configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, python
Domain
backend, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.