-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into by/refactor-billing-page-error-display
- Loading branch information
Showing
730 changed files
with
7,609 additions
and
5,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -417,6 +417,7 @@ jobs: | |
echo running_time_run_id=${run_id} >> $GITHUB_ENV | ||
echo running_time_run_started_at=${run_started_at} >> $GITHUB_ENV | ||
- name: Capture running time to PostHog | ||
if: github.repository == 'PostHog/posthog' | ||
uses: PostHog/[email protected] | ||
with: | ||
posthog-token: ${{secrets.POSTHOG_API_TOKEN}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -305,6 +305,7 @@ jobs: | |
echo running_time_run_id=${run_id} >> $GITHUB_ENV | ||
echo running_time_run_started_at=${run_started_at} >> $GITHUB_ENV | ||
- name: Capture running time to PostHog | ||
if: github.repository == 'PostHog/posthog' | ||
uses: PostHog/[email protected] | ||
with: | ||
posthog-token: ${{secrets.POSTHOG_API_TOKEN}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ jobs: | |
echo is_revert=false >> $GITHUB_ENV | ||
fi | ||
- name: Capture PR age to PostHog | ||
if: github.repository == 'PostHog/posthog' | ||
uses: PostHog/[email protected] | ||
with: | ||
posthog-token: ${{secrets.POSTHOG_API_TOKEN}} | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# Generate schema.py from schema.json | ||
datamodel-codegen \ | ||
--class-name='SchemaRoot' --collapse-root-models --target-python-version 3.10 --disable-timestamp \ | ||
--use-one-literal-as-default --use-default --use-default-kwarg --use-subclass-enum \ | ||
--input frontend/src/queries/schema.json --input-file-type jsonschema \ | ||
--output posthog/schema.py --output-model-type pydantic_v2.BaseModel | ||
|
||
# Format schema.py | ||
ruff format posthog/schema.py | ||
|
||
# Check schema.py and autofix | ||
ruff check --fix posthog/schema.py | ||
|
||
# HACK: Datamodel-codegen output for enum-type fields with a default is invalid – the default value is a plain string, | ||
# and not the expected enum member. We fix this using sed, which is pretty hacky, but does the job. | ||
# Specifically, we need to replace `Optional[PropertyOperator] = "exact"` | ||
# with `Optional[PropertyOperator] = PropertyOperator("exact")` to make the default value valid. | ||
# Remove this when https://github.com/koxudaxi/datamodel-code-generator/issues/1929 is resolved. | ||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
# sed needs `-i` to be followed by `''` on macOS | ||
sed -i '' -e 's/Optional\[PropertyOperator\] = \("[A-Za-z_]*"\)/Optional[PropertyOperator] = PropertyOperator(\1)/g' posthog/schema.py | ||
else | ||
sed -i -e 's/Optional\[PropertyOperator\] = \("[A-Za-z_]*"\)/Optional[PropertyOperator] = PropertyOperator(\1)/g' posthog/schema.py | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import datetime | ||
from typing import Dict, Optional, cast | ||
from typing import Optional, cast | ||
|
||
from zoneinfo import ZoneInfo | ||
|
||
|
@@ -20,7 +20,7 @@ class LicensedTestMixin: | |
def license_required_response( | ||
self, | ||
message: str = "This feature is part of the premium PostHog offering. Self-hosted licenses are no longer available for purchase. Please contact [email protected] to discuss options.", | ||
) -> Dict[str, Optional[str]]: | ||
) -> dict[str, Optional[str]]: | ||
return { | ||
"type": "server_error", | ||
"code": "payment_required", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.