Modifed get_commits_list function