Details
-
Bug
-
Resolution: Invalid
-
Medium
Description
I spent few hours building a tool to generate git stats across all our company repositories by parsing all commits from Bitbucket APIs and storing them in DB then connecting it to BI tool to create any graphs.
The commit API json returns the following data about each commit
{ "hash": "d566e1c3328809f1dde0123db183e403c2ca2c7c", "repository": {..}, "links": {..}, "author": {..}, "participants": [], "parents": [], "date": "2016-04-02T13:40:04+00:00", "message": "Refactoring and code comments\n", "type": "commit" }
Naturally, you would think date is the author date but ironically, it's the commit date!!! Why on earth would they return a single date and the one you choose isn't the author date?
This is the difference (source):
As the Pro Git Book explains: The author is the person who originally wrote the work, whereas the committer is the person who last applied the work. So if, for instance, you send in a patch to a project, the author date will be when you made the original commit but the committer date will be when the patch was applied.
Why is this important? because all modern devs don't push commits until they're ready. Usually any dev just commits changes atomically and then pushes them end of day or week or every few hours.
The problem is right now the stats shows people with over 60 commits per day when in reality they are distributed among several days.
How long will it take you guys to return both dates?
Attachments
Issue Links
- is related to
-
BCLOUD-14214 View commits by Author Date
- Closed