Reputation: 22895
I can show/search a list of commits on a specific branch on github like this
I can also filter by author name like
https://github.com/username/repository/commits/branch_name?author=author_name
But I am looking for a way that I can search my commits on a specific date or date range. I tried to find an existing answer but could not find. I also tried some queries like before=2016-07-27
or after=2016-07-27
but it did not work. Any help will be appreciated. Thanks in advance
Upvotes: 46
Views: 29165
Reputation: 1
Note that in 2024 this methodology changed. The new format, currently very poorly documented, is as follows:
https://github.com/{org}/{repo}/graphs/contributors?from=1%2F1%2F2024&to=7%2F31%2F2024
Example:
https://github.com/apache/pinot/graphs/contributors?from=1%2F1%2F2024&to=7%2F31%2F2024
Upvotes: 0
Reputation: 60043
For public or GitHub Pro repositories, when you click on Network (the number next to fork) you can at least browse by date.
For easier navigation use the cursor keys (shift left for the first commit). Click on a bullet to go to that commit.
Upvotes: 5
Reputation: 7483
Per GitHub's REST API v3 documentation for list commits on a repository:
GET /repos/:owner/:repo/commits
includes since
and until
parameters:
+--------+---------+---------------------------------------------------------------+
| Name | Type | Description |
+--------+---------+---------------------------------------------------------------+
| since | string | Only commits after this date will be returned. |
| | | This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
| until | string | Only commits before this date will be returned. |
| | | This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
+--------+---------+---------------------------------------------------------------+
For example, to select commits on master in June 2018 on github/linguist: https://github.com/github/linguist/commits/master?since=2018-05-31&until=2018-07-01
According to the above-linked docs, the branch should be included as a query parameter, e.g. https://github.com/github/linguist/commits?branch=master&since=2018-05-31&until=2018-07-01 but it seems to work fine to use the branch name as a path parameter.
Upvotes: 57