Skip to content

Commit 22893de

Browse files
committed
Add a monthly summary of commits
1 parent 053e8c1 commit 22893de

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

sql/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The `metrics` folder has queries that are all around usage of various features i
2424

2525
- `actions-summary.sql` - A monthly summary of runtime hours, seconds waiting in queue before dispatch, and job count for GitHub Actions usage.
2626
- `commit-count.sql` - This pulls a "high score" report of all users, all commits, from all time.
27+
- `commit-summary.sql` - A month-by-month summary of commits pushed to GitHub Enterprise Server (using the commit date).
2728
- `count-tabs.sql` - A report of the custom tabs users put in their repositories.
2829
- `issue-report.sql` - A report of active issues within the past X days.
2930
- `linguist-report.sql` - This returns the "size" of each language in each repository and when the repo was last updated. This can be a very large report.

sql/metrics/commit-summary.sql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* This query generates a monthly summary of commit activity by committed date.
3+
*/
4+
SELECT
5+
month(c.committed_date) as month,
6+
year(c.committed_date) as year,
7+
sum(c.commit_count) as commits
8+
FROM
9+
github_enterprise.commit_contributions c
10+
GROUP BY
11+
month,
12+
year
13+
ORDER BY
14+
year,
15+
month

0 commit comments

Comments
 (0)