Skip to content

Commit 5ba9297

Browse files
authored
Merge branch 'main' into fix/sitemap-pipes
2 parents 9392d2d + 8c8ab13 commit 5ba9297

7 files changed

Lines changed: 1808 additions & 182 deletions

File tree

frontend/package-lock.json

Lines changed: 23 additions & 177 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/libs/tinybird/datasources/project_insights_copy_ds.datasource

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ DESCRIPTION >
2929
- `forksPrevious365Days` column is the count of forks in the previous 365 days (365-730 days ago).
3030
- `activeContributorsPrevious365Days` column is the unique count of active contributors in the previous 365 days (365-730 days ago).
3131
- `activeOrganizationsPrevious365Days` column is the unique count of active organizations in the previous 365 days (365-730 days ago).
32+
- `status` column is the current status of the project (e.g., 'active', 'archived').
3233

3334
TAGS "Project insights", "Metrics"
3435

@@ -38,6 +39,7 @@ SCHEMA >
3839
`slug` String,
3940
`logoUrl` String,
4041
`isLF` UInt8,
42+
`status` String,
4143
`contributorCount` UInt64,
4244
`organizationCount` UInt64,
4345
`softwareValue` UInt64,

services/libs/tinybird/datasources/segments.datasource

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ SCHEMA >
4242

4343
ENGINE ReplacingMergeTree
4444
ENGINE_PARTITION_KEY toYear(createdAt)
45-
ENGINE_SORTING_KEY slug
45+
ENGINE_SORTING_KEY slug, id
4646
ENGINE_VER updatedAt

services/libs/tinybird/pipes/health_score_retention.pipe

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ SQL >
88
memberId != ''
99
AND segmentId = (SELECT segmentId FROM segments_filtered)
1010
AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded)
11+
AND (type, platform) IN (SELECT activityType, platform FROM activityTypes_filtered)
1112
{% if defined(repos) %} AND channel IN (SELECT channel FROM repos_to_channels) {% end %}
1213
{% if defined(endDate) %}
1314
AND timestamp >= toStartOfQuarter(
@@ -30,7 +31,9 @@ SQL >
3031
SELECT segmentId, groupUniqArray(memberId) AS currentQuarterMembers
3132
FROM activityRelations_deduplicated_cleaned_bucket_union
3233
WHERE
33-
memberId != '' AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded)
34+
memberId != ''
35+
AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded)
36+
AND (type, platform) IN (SELECT activityType, platform FROM activityTypes_filtered)
3437
{% if defined(endDate) %}
3538
AND timestamp >= toStartOfQuarter(
3639
parseDateTimeBestEffort(
@@ -60,6 +63,7 @@ SQL >
6063
memberId != ''
6164
AND segmentId = (SELECT segmentId FROM segments_filtered)
6265
AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded)
66+
AND (type, platform) IN (SELECT activityType, platform FROM activityTypes_filtered)
6367
{% if defined(endDate) %}
6468
AND timestamp >= toStartOfQuarter(
6569
parseDateTimeBestEffort(
@@ -82,7 +86,9 @@ SQL >
8286
SELECT segmentId, groupUniqArray(memberId) AS previousQuarterMembers
8387
FROM activityRelations_deduplicated_cleaned_bucket_union
8488
WHERE
85-
memberId != '' AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded)
89+
memberId != ''
90+
AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded)
91+
AND (type, platform) IN (SELECT activityType, platform FROM activityTypes_filtered)
8692
{% if defined(endDate) %}
8793
AND timestamp >= toStartOfQuarter(
8894
parseDateTimeBestEffort(

0 commit comments

Comments
 (0)