Skip to content

Commit 887e9d3

Browse files
committed
feat: add project info to repositories
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
1 parent e72807b commit 887e9d3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

services/libs/tinybird/pipes/project_insights_copy.pipe

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,24 @@ SQL >
120120

121121
NODE project_insights_copy_repo_base
122122
DESCRIPTION >
123-
Returns base repository information with populated metrics from repositories_populated_ds
123+
Returns base repository information with populated metrics from repositories_populated_ds, enriched with project data
124124

125125
SQL >
126126
SELECT
127127
rp.id AS id,
128128
rp.url AS repoUrl,
129129
rp.url AS name,
130-
'' AS slug,
131-
'' AS logoUrl,
132-
toUInt8(0) AS isLF,
130+
COALESCE(ip.slug, '') AS slug,
131+
COALESCE(ip.logoUrl, '') AS logoUrl,
132+
COALESCE(ip.isLF, toUInt8(0)) AS isLF,
133133
if(r.archived = true, 'archived', 'active') AS status,
134134
rp.contributorCount AS contributorCount,
135135
rp.organizationCount AS organizationCount,
136136
rp.softwareValue AS softwareValue,
137137
rp.firstCommit AS firstCommit
138138
FROM repositories_populated_ds AS rp
139139
JOIN repositories r FINAL ON r.id = rp.id
140+
LEFT JOIN insightsProjects ip FINAL ON r.insightsProjectId = ip.id
140141

141142
NODE project_insights_copy_repo_period_metrics
142143
DESCRIPTION >

0 commit comments

Comments
 (0)