Skip to content

Commit 42af9be

Browse files
author
Justin Palmer
committed
docs for commit activity response
1 parent 31a4cfb commit 42af9be

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

content/v3/repos/statistics.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ and cached. Subsequent request should return the data.
3131

3232
## Get the last year of commit activity data
3333

34+
Returns the last year of commit activity grouped by week. The `days` array
35+
is a group of commits per day, starting on `Sunday`.
36+
3437
GET /repos/:owner/:repo/stats/commit_activity
3538

3639
### Response
3740

3841
<%= headers 200 %>
42+
<%= json(:repo_stats_commit_activity) %>
3943

4044
## Get the number of additions and deletions per week
4145

lib/resources.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,13 @@ def text_html(response, status, head = {})
11391139
}
11401140
]
11411141
}]
1142+
1143+
1144+
REPO_STATS_COMMIT_ACTIVITY = [{
1145+
:days => [0, 3, 26, 20, 39, 1, 0],
1146+
:total => 89,
1147+
:week => "2012-05-06"
1148+
}]
11421149
end
11431150
end
11441151

0 commit comments

Comments
 (0)