|
1 | 1 | DESCRIPTION > |
2 | 2 | Nightly copy pipe that precomputes per-org per-project metrics for the org page. |
3 | 3 | 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). |
4 | 5 |
|
5 | 6 | TAGS "Organization page" |
6 | 7 |
|
7 | 8 | NODE org_page_projects_contribution_activity_types |
8 | 9 | DESCRIPTION > |
9 | | - Collaboration and code contribution activity types (mirrors leaderboards filter) |
| 10 | + Code contribution activity types |
10 | 11 |
|
11 | 12 | SQL > |
12 | | - SELECT activityType, platform FROM activityTypes FINAL WHERE isCollaboration OR isCodeContribution |
| 13 | + SELECT activityType, platform FROM activityTypes FINAL WHERE isCodeContribution |
13 | 14 |
|
14 | 15 | NODE org_page_projects_org_segment_activity |
15 | 16 | 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) |
17 | 18 |
|
18 | 19 | SQL > |
19 | 20 | SELECT |
|
25 | 26 | AND ar.platform = at.platform |
26 | 27 | WHERE |
27 | 28 | ar.organizationId != '' |
28 | | - AND ar.timestamp >= toStartOfDay(now() - toIntervalDay(365)) |
| 29 | + AND ar.timestamp >= toStartOfDay(now() - toIntervalDay(730)) |
29 | 30 | AND ar.timestamp < toStartOfDay(now() + toIntervalDay(1)) |
30 | 31 | GROUP BY ar.organizationId, ar.segmentId |
31 | 32 |
|
@@ -136,9 +137,9 @@ SQL > |
136 | 137 | ifNull(m.prsOpened, 0) AS totalPrsOpened, |
137 | 138 | ifNull(m.orgPrsOpened, 0) AS orgPrsOpened, |
138 | 139 | ( |
139 | | - -- Maintainers: 3 pts if org has at least 1 active maintainer (24-month window) |
| 140 | + -- Maintainers: 10 pts if org has at least 1 active maintainer (24-month window) |
140 | 141 | -- 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 |
142 | 143 | WHEN |
143 | 144 | ifNull(pa.scoreContributorCount, 0) = 0 |
144 | 145 | OR ifNull(oa.scoreOrgContributorCount, 0) = 0 |
|
0 commit comments