1
0

Add per-repo counts to EGG
All checks were successful
Build Docker and Deploy / Build Docker (push) Successful in 21s
Build Docker and Deploy / Deploy to Server (push) Successful in 16s

This commit is contained in:
2025-07-12 18:32:22 +02:00
parent 6d54e5b9ba
commit e5c9b1c2a0
10 changed files with 133 additions and 21 deletions

30
www/extern/egg/db_queryday.sql vendored Normal file
View File

@@ -0,0 +1,30 @@
SELECT
[commitdate] AS [commitdate],
[repo_id] AS [repo_id],
[repo_name] AS [repo_name],
[source] AS [source],
COUNT(*) AS count
FROM
(
SELECT
commits.[hash] AS [hash],
min([author_email]) AS [mail1],
min([committer_email]) AS [mail2],
date(min([date])) AS [commitdate],
min(repositories.[id]) AS [repo_id],
min(repositories.[name]) AS [repo_name],
min(branches.[id]) AS [branch_id],
min(branches.[name]) AS [branch_name],
min(repositories.[source]) AS [source]
FROM commits
LEFT JOIN metadata ON commits.[hash] = metadata.[hash]
LEFT JOIN branches ON commits.[branch_id] = branches.[id]
LEFT JOIN repositories ON branches.[repo_id] = repositories.[id]
GROUP BY commits.[hash]
HAVING (strftime('%Y', commitdate) = :year AND (/*{IDENTITY_COND}*/))
)
GROUP BY [commitdate], [repo_id], [repo_name], [source]
ORDER BY [repo_name]