Skip to content

Commit a956c67

Browse files
authored
feat: include GitHub handles (#3857)
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
1 parent 95dffe6 commit a956c67

20 files changed

Lines changed: 35 additions & 30 deletions

services/libs/tinybird/datasources/leaderboards_copy_ds.datasource

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DESCRIPTION >
1616
- `previousPeriodValue` is the comparison metric from the previous period (0 for non-temporal leaderboards).
1717
- `collectionsSlugs` list of collection slugs the project belongs to.
1818
- `isLF` indicates whether the project is a LF project (1 = true, 0 = false).
19-
- `githubHandle` is the GitHub username for contributor leaderboards (empty string for non-contributor leaderboards).
19+
- `githubHandleArray` is the array of GitHub usernames for contributor leaderboards (empty array for non-contributor leaderboards).
2020

2121
TAGS "Analytics, Leaderboards, Project rankings"
2222

@@ -33,7 +33,7 @@ SCHEMA >
3333
`previousPeriodValue` Float64,
3434
`collectionsSlugs` Array(String),
3535
`isLF` UInt8,
36-
`githubHandle` String,
36+
`githubHandleArray` Array(String),
3737
`status` String,
3838
`totalCount` UInt64
3939

services/libs/tinybird/datasources/members_sorted.datasource

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ DESCRIPTION >
1313
- `displayName` is the member's preferred display name across platforms.
1414
- `score` is the computed activity/engagement score for the member.
1515
- `publicName` is the denormalized public display name for efficient queries.
16-
- `githubHandle` is the member's GitHub username from memberIdentities (empty string if not available).
16+
- `githubHandleArray` is the member's GitHub usernames from memberIdentities (empty array if not available).
1717

1818
SCHEMA >
1919
`id` String,
@@ -31,7 +31,7 @@ SCHEMA >
3131
`displayName` String,
3232
`score` Int32,
3333
`publicName` String,
34-
`githubHandle` String
34+
`githubHandleArray` Array(String)
3535

3636
ENGINE MergeTree
3737
ENGINE_PARTITION_KEY toYear(joinedAt)

services/libs/tinybird/pipes/contributor_dependency.pipe

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DESCRIPTION >
1414
- `activity_type`: Optional string filter for single activity type (e.g., 'authored-commit')
1515
- `activity_types`: Optional array of activity types (e.g., ['authored-commit', 'co-authored-commit'])
1616
- `onlyContributions`: Optional boolean, defaults to 1 (contributions only), set to 0 for all activities
17-
- Response: `id`, `displayName`, `githubHandle`, `contributionCount`, `contributionPercentage`, `roles`, `contributionPercentageRunningTotal`, `totalContributorCount`
17+
- Response: `id`, `displayName`, `githubHandleArray`, `contributionCount`, `contributionPercentage`, `roles`, `contributionPercentageRunningTotal`, `totalContributorCount`
1818

1919
NODE contributions_percentage_running_total
2020
SQL >
@@ -24,7 +24,7 @@ SQL >
2424
SELECT
2525
id,
2626
displayName,
27-
githubHandle,
27+
githubHandleArray,
2828
contributionCount,
2929
contributionPercentage,
3030
roles,

services/libs/tinybird/pipes/contributors_leaderboard.pipe

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DESCRIPTION >
1818
- `offset`: Optional integer for result pagination, defaults to 0
1919
- Response:
2020
- Count mode (`count=true`): `count` (total number of contributors)
21-
- Data mode (default): `id`, `avatar`, `displayName`, `githubHandle`, `contributionCount`, `contributionPercentage`, `roles`
21+
- Data mode (default): `id`, `avatar`, `displayName`, `githubHandleArray`, `contributionCount`, `contributionPercentage`, `roles`
2222

2323
NODE memberId_aggregates
2424
SQL >
@@ -55,7 +55,7 @@ SQL >
5555
m.id,
5656
m.avatar,
5757
case when is_non_lf.result then m.publicName else m.displayName end as displayName,
58-
m.githubHandle,
58+
m.githubHandleArray,
5959
ma.contributionCount,
6060
ma.contributionPercentage,
6161
mr.roles

services/libs/tinybird/pipes/leaderboards.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ SQL >
2222
previousPeriodValue,
2323
collectionsSlugs,
2424
isLF,
25-
githubHandle,
25+
githubHandleArray,
2626
status,
2727
totalCount
2828
FROM leaderboards_copy_ds

services/libs/tinybird/pipes/leaderboards_avg_commits_per_author.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ SQL >
4949
0.0 as previousPeriodValue,
5050
p.collectionsSlugs as collectionsSlugs,
5151
p.isLF as isLF,
52-
'' as githubHandle,
52+
[] as githubHandleArray,
5353
p.status as status,
5454
count() OVER () as totalCount
5555
FROM leaderboards_avg_commits_per_author_projects p

services/libs/tinybird/pipes/leaderboards_codebase_size.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ SQL >
4141
0.0 as previousPeriodValue,
4242
p.collectionsSlugs as collectionsSlugs,
4343
p.isLF as isLF,
44-
'' as githubHandle,
44+
[] as githubHandleArray,
4545
p.status as status,
4646
count() OVER () as totalCount
4747
FROM leaderboards_codebase_size_projects p

services/libs/tinybird/pipes/leaderboards_commits.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ SQL >
6060
cast(coalesce(pp.commits, 0) as Float64) as previousPeriodValue,
6161
p.collectionsSlugs as collectionsSlugs,
6262
p.isLF as isLF,
63-
'' as githubHandle,
63+
[] as githubHandleArray,
6464
p.status as status,
6565
count() OVER () as totalCount
6666
FROM leaderboards_commits_projects p

services/libs/tinybird/pipes/leaderboards_forks.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SQL >
3939
cast(coalesce(m.previousForks, 0) as Float64) as previousPeriodValue,
4040
p.collectionsSlugs as collectionsSlugs,
4141
p.isLF as isLF,
42-
'' as githubHandle,
42+
[] as githubHandleArray,
4343
p.status as status,
4444
count() OVER () as totalCount
4545
FROM leaderboards_forks_projects p

services/libs/tinybird/pipes/leaderboards_issue_response.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ SQL >
6161
cast(coalesce(pp.averageResponseTimeSeconds, 0) as Float64) as previousPeriodValue,
6262
p.collectionsSlugs as collectionsSlugs,
6363
p.isLF as isLF,
64-
'' as githubHandle,
64+
[] as githubHandleArray,
6565
p.status as status,
6666
count() OVER () as totalCount
6767
FROM leaderboards_issue_response_projects p

0 commit comments

Comments
 (0)