Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(devex): add a pause switch to the ci reviewer assigner (#129383)

Julian Bez0d6705e60ea6
diff --git a/.github/workflows/auto-assign-reviewers.yml b/.github/workflows/auto-assign-reviewers.yml
index 201d03e07cfe..9e09f31166a2 100644
--- a/.github/workflows/auto-assign-reviewers.yml
+++ b/.github/workflows/auto-assign-reviewers.yml
@@ -22,7 +22,8 @@ jobs:
assign-reviewers:
runs-on: 'ubuntu-22.04'
timeout-minutes: 5
- if: github.event.pull_request.draft == false
+ # The repository variable pauses this job while Stamphog reviewer routing requests reviewers instead.
+ if: github.event.pull_request.draft == false && vars.AUTO_ASSIGN_REVIEWERS_PAUSED != 'true'
steps:
# GitHub app token is required because GITHUB_TOKEN can't assign team members as reviewers (requires org-level permission)
diff --git a/products/stamphog/README.md b/products/stamphog/README.md
index f8fa071bd334..0980ab77bd95 100644
--- a/products/stamphog/README.md
+++ b/products/stamphog/README.md
@@ -199,6 +199,10 @@ A comment names the cut owners and why.
The page offers the setting only when the default branch has a root `owners.yaml` (`GET repo_configs/{id}/owners_file/`, at most one GitHub call per repository every 10 minutes, at a priority the egress limiter can shed), and keeps it in view while it is on, so it can be turned off.
`routing_fork_labels` has no API yet. Set it with a manual DB write, for example `StamphogRepoConfig.objects.for_team(team_id).filter(repository="acme/widgets").update(routing_fork_labels={"team-alpha": "team/alpha"})`.
+Routing only adds review requests, so a second assigner that requests every owner leaves the cut nothing to remove.
+In PostHog/posthog, `.github/workflows/auto-assign-reviewers.yml` stops when the repository variable `AUTO_ASSIGN_REVIEWERS_PAUSED` is `true`.
+Turn routing on first, then set the variable. To roll back, delete the variable first, then turn routing off.
+
The latest result is stored on `PullRequest.routing` with its mode, trigger (`opened`, `ready_for_review`, `verdict:<outcome>` or `safety_net`), scope (`full` or `pinned`) and status (`waiting`, `routing`, `requested` or `done`).
`full_routed_head`, `pinned_routed_head` (with their `_at` times) and `requested_owners` carry over to every later record, so the PR-level rules hold across pushes.
Routing never writes `payload_updated_at` or the descriptive fields of the row, so it cannot make the review path drop a delivery as stale.