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(dashboards): untrack unused github_url on dashboard templates (#100627)

posthog[bot]f7956e8dc663
diff --git a/products/dashboards/backend/api/dashboard_templates.py b/products/dashboards/backend/api/dashboard_templates.py
index df8bbfe55c6c..eab7a82502d7 100644
--- a/products/dashboards/backend/api/dashboard_templates.py
+++ b/products/dashboards/backend/api/dashboard_templates.py
@@ -41,7 +41,7 @@ logger = structlog.get_logger(__name__)
MAX_DASHBOARD_TEMPLATES_PER_ORGANIZATION = 100
_NON_STAFF_ALLOWED_PATCH_KEYS = frozenset({"template_name", "dashboard_description", "tags", "deleted", "scope"})
-_NON_STAFF_FORBIDDEN_CREATE_FIELDS = frozenset({"availability_contexts", "image_url", "github_url"})
+_NON_STAFF_FORBIDDEN_CREATE_FIELDS = frozenset({"availability_contexts", "image_url"})
_NON_STAFF_ALLOWED_SCOPES = frozenset({DashboardTemplate.Scope.ONLY_TEAM, DashboardTemplate.Scope.ORGANIZATION})
@@ -361,7 +361,6 @@ class DashboardTemplateSerializer(serializers.ModelSerializer):
validated_data.pop("is_featured", None)
validated_data.pop("availability_contexts", None)
validated_data.pop("image_url", None)
- validated_data.pop("github_url", None)
try:
return super().update(instance, validated_data, *args, **kwargs)
@@ -588,7 +587,6 @@ class DashboardTemplateViewSet(TeamAndOrgViewSetMixin, ForbidDestroyModel, views
scope=DashboardTemplate.Scope.ONLY_TEAM,
is_featured=False,
image_url=None,
- github_url=None,
availability_contexts=None,
deleted=False,
created_by=user if user.is_authenticated else None,
diff --git a/products/dashboards/backend/migrations/0020_untrack_dashboardtemplate_github_url.py b/products/dashboards/backend/migrations/0020_untrack_dashboardtemplate_github_url.py
new file mode 100644
index 000000000000..d3e47c01d4d7
--- /dev/null
+++ b/products/dashboards/backend/migrations/0020_untrack_dashboardtemplate_github_url.py
@@ -0,0 +1,13 @@
+from django.db import migrations
+
+from posthog.migration_helpers import untrack_field
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("dashboards", "0019_alter_buttontile_created_by_alter_buttontile_team_and_more"),
+ ]
+
+ operations = [
+ untrack_field("dashboardtemplate", "github_url"),
+ ]
diff --git a/products/dashboards/backend/migrations/max_migration.txt b/products/dashboards/backend/migrations/max_migration.txt
index 15ce2c720352..7b5bf893e7a7 100644
--- a/products/dashboards/backend/migrations/max_migration.txt
+++ b/products/dashboards/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0019_alter_buttontile_created_by_alter_buttontile_team_and_more
+0020_untrack_dashboardtemplate_github_url
diff --git a/products/dashboards/backend/models/dashboard_templates.py b/products/dashboards/backend/models/dashboard_templates.py
index 6444fcc7335c..2b8feffa87ae 100644
--- a/products/dashboards/backend/models/dashboard_templates.py
+++ b/products/dashboards/backend/models/dashboard_templates.py
@@ -34,10 +34,6 @@ class DashboardTemplate(UUIDTModel, RootTeamMixin):
deleted = models.BooleanField(blank=True, null=True)
image_url = models.CharField(max_length=8201, null=True, blank=True)
scope = models.CharField(max_length=24, choices=Scope, null=True, blank=True)
- # URL length for browsers can be as much as 64Kb
- # see https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
- # but GitHub apparently is more likely 8kb https://stackoverflow.com/a/64565317
- github_url = models.CharField(max_length=8201, null=True, blank=True)
# where this template is available, e.g. "general" and/or "onboarding"
availability_contexts = ArrayField(models.CharField(max_length=255), blank=True, null=True)
is_featured = models.BooleanField(