Skip to content

Commit 52d9d83

Browse files
authored
Include first commit in contributor summary (#89)
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
1 parent 0d3b1b9 commit 52d9d83

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/build/db.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,19 @@ SELECT
135135
FROM contribution
136136
WHERE author_id = contributor.author_id
137137
),
138+
'first_commit', (
139+
SELECT json_object(
140+
'owner', owner,
141+
'repository', repository,
142+
'sha', sha,
143+
'ts', extract('epoch' FROM ts)::BIGINT
144+
) FROM contribution
145+
WHERE author_id = contributor.author_id
146+
AND kind = 'commit'
147+
AND sha IS NOT NULL
148+
ORDER BY ts ASC, owner ASC, repository ASC, sha ASC
149+
LIMIT 1
150+
),
138151
'first_contribution', (
139152
SELECT json_object(
140153
'kind', kind,

0 commit comments

Comments
 (0)