extract commit retrieval logic into methods
extract params built by date into a method