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(tasks): remove the tasks-pr-auto-ready flag gate (#130660)

Rafael Audibert4a38f818c3bf
diff --git a/products/tasks/backend/temporal/process_task/activities/mark_pr_ready.py b/products/tasks/backend/temporal/process_task/activities/mark_pr_ready.py
index a770d8e35091..0759f345ae36 100644
--- a/products/tasks/backend/temporal/process_task/activities/mark_pr_ready.py
+++ b/products/tasks/backend/temporal/process_task/activities/mark_pr_ready.py
@@ -1,4 +1,3 @@
-import posthoganalytics
from temporalio import activity
from posthog.dataclasses import frozen
@@ -14,7 +13,6 @@ from products.tasks.backend.temporal.process_task.activities.get_pr_context impo
)
from products.tasks.backend.temporal.process_task.activities.get_task_processing_context import TaskProcessingContext
-AUTO_READY_FEATURE_FLAG = "tasks-pr-auto-ready"
KEEP_DRAFT_LABELS = frozenset({"keep-draft", "no-ci"})
@@ -50,17 +48,6 @@ def mark_pr_ready(input: MarkPrReadyInput) -> bool:
if parsed is None or parsed.repository.casefold() != (context.repository or "").casefold():
return False
- enabled = posthoganalytics.feature_enabled(
- AUTO_READY_FEATURE_FLAG,
- distinct_id=context.distinct_id,
- groups={"organization": context.organization_id},
- group_properties={"organization": {"id": context.organization_id}},
- only_evaluate_locally=False,
- send_feature_flag_events=False,
- )
- if enabled is not True:
- return False
-
github = (
get_github_integration(context.team_id, context.github_integration_id)
if context.github_integration_id
diff --git a/products/tasks/backend/temporal/process_task/activities/tests/test_mark_pr_ready.py b/products/tasks/backend/temporal/process_task/activities/tests/test_mark_pr_ready.py
index 548eabd7ffe5..b0504b96b6b4 100644
--- a/products/tasks/backend/temporal/process_task/activities/tests/test_mark_pr_ready.py
+++ b/products/tasks/backend/temporal/process_task/activities/tests/test_mark_pr_ready.py
@@ -18,7 +18,6 @@ from ee.hogai.sandbox import turn_completed_successfully
"change,requested",
[
("none", True),
- ("disabled", False),
("failed_run", False),
("keep_draft", False),
("queued_followup", False),
@@ -91,7 +90,6 @@ def test_activity_rechecks_run_and_pr_before_requesting_review(monkeypatch, chan
elif change == "github_failure":
github.get_pull_request_babysit_snapshot.side_effect = RuntimeError("unavailable")
github.get_pull_request_babysit_snapshot.return_value = raw
- monkeypatch.setattr(ready_module.posthoganalytics, "feature_enabled", lambda *args, **kwargs: change != "disabled")
monkeypatch.setattr(ready_module, "get_github_integration", lambda *_: github)
with patch.object(ready_module.TaskRun.objects, "filter") as find_run:
find_run.return_value.first.side_effect = [run, late_run]