Skip to content

Commit abc178e

Browse files
joanagmaiaclaude
andcommitted
fix: align org page critical projects scoring with spec (IN-1174)
- narrow activity/contributor counts to code-only types (drop isCollaboration) - widen activity window from 365 to 730 days (24 months) - raise maintainers score from 3.0 to 10.0 to match dbt model Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
1 parent 485a47b commit abc178e

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

services/libs/tinybird/pipes/org_page_projects.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DESCRIPTION >
2-
Returns the list of projects an organization contributed to in the last 365 days,
2+
Returns the list of projects an organization contributed to in the last 730 days (24 months),
33
read from the precomputed org_page_projects_copy_ds.
44

55
TAGS "Organization page"

services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
DESCRIPTION >
22
Nightly copy pipe that precomputes per-org per-project metrics for the org page.
33
Writes one row per (organizationId, segmentId) into org_page_projects_copy_ds.
4+
Activity and contributor counts use code-only activity types over the last 730 days (24 months).
45

56
TAGS "Organization page"
67

@@ -9,11 +10,11 @@ DESCRIPTION >
910
Collaboration and code contribution activity types (mirrors leaderboards filter)
1011

1112
SQL >
12-
SELECT activityType, platform FROM activityTypes FINAL WHERE isCollaboration OR isCodeContribution
13+
SELECT activityType, platform FROM activityTypes FINAL WHERE isCodeContribution
1314

1415
NODE org_page_projects_org_segment_activity
1516
DESCRIPTION >
16-
Collaboration/code activity and contributor counts per org per project segment in the last 365 days
17+
Code-only activity and contributor counts per org per project segment in the last 730 days (24 months)
1718

1819
SQL >
1920
SELECT
@@ -25,7 +26,7 @@ SQL >
2526
AND ar.platform = at.platform
2627
WHERE
2728
ar.organizationId != ''
28-
AND ar.timestamp >= toStartOfDay(now() - toIntervalDay(365))
29+
AND ar.timestamp >= toStartOfDay(now() - toIntervalDay(730))
2930
AND ar.timestamp < toStartOfDay(now() + toIntervalDay(1))
3031
GROUP BY ar.organizationId, ar.segmentId
3132

@@ -138,7 +139,7 @@ SQL >
138139
(
139140
-- Maintainers: 3 pts if org has at least 1 active maintainer (24-month window)
140141
-- Contributors: 0 if no share; 1.1 if share in (0, 0.1%]; share + 1.0 otherwise
141-
CASE WHEN ifNull(mt.scoreMaintainersCount, 0) >= 1 THEN 3.0 ELSE 0.0 END + CASE
142+
CASE WHEN ifNull(mt.scoreMaintainersCount, 0) >= 1 THEN 10.0 ELSE 0.0 END + CASE
142143
WHEN
143144
ifNull(pa.scoreContributorCount, 0) = 0
144145
OR ifNull(oa.scoreOrgContributorCount, 0) = 0

0 commit comments

Comments
 (0)