From 949916a875a56e58b0b55021e345fd1460206413 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Thu, 25 Jan 2024 14:26:22 +0100 Subject: [PATCH] fix: Fix display of commit in console surprise (#19965) --- frontend/src/index.html | 4 ++-- posthog/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/index.html b/frontend/src/index.html index 58589b6972bbb..65c0ee7f286fb 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -9,7 +9,7 @@ const tags = [ '{% if debug %}DEBUG mode{% elif region %}Region: {{ region }}{% else %}Hobby deployment{% endif %}', '{% if debug %}Branch: {{ git_branch|default:"unknown" }}{% else %}Commit: {{ git_rev|default:"unknown" }}{% endif %}', - 'Come join us! https://posthog.com/careers', + 'Join us! https://posthog.com/careers', ] console.info( `%c %cPostHog %c— %cIn data we trust\n%c${tags.join('%c %c')}`, @@ -18,7 +18,7 @@ '', 'font-style: italic;', 'padding: 0.2em 0.4em; border-radius: 0.5em; background: #1d4aff; color: white;', - '', + 'padding-bottom: 0.4em;', 'padding: 0.2em 0.4em; border-radius: 0.5em; background: #f54e00; color: white;', '', 'padding: 0.2em 0.4em; border-radius: 0.5em; background: #f9bd2b; color: black;' diff --git a/posthog/utils.py b/posthog/utils.py index 894e90aff09c7..b8c8d8b9e52f7 100644 --- a/posthog/utils.py +++ b/posthog/utils.py @@ -291,9 +291,9 @@ def render_template( if sentry_environment := os.environ.get("SENTRY_ENVIRONMENT"): context["sentry_environment"] = sentry_environment + context["git_rev"] = get_git_commit() # Include commit in prod for the `console.info()` message if settings.DEBUG and not settings.TEST: context["debug"] = True - context["git_rev"] = get_git_commit() context["git_branch"] = get_git_branch() if settings.E2E_TESTING: