Skip to content

Get the last year of commit activity

GET
/repos/{owner}/{repo}/stats/commit_activity

Returns the last year of commit activity grouped by week. The days array is a group of commits per day, starting on Sunday.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Response

Media type application/json
Array<object>
Commit Activity

Commit Activity

object
days
required
Array<integer>
total
required
integer
week
required
integer
Examples
Example default
[
{
"days": [
0,
3,
26,
20,
39,
1,
0
],
"total": 89,
"week": 1336280400
}
]

Accepted

Media type application/json
object
Examples
Example default
null

A header with no content is returned.