refactored method to calculate commits for the current year