'AWS Codecommit, get list of all code commit in a range

I have a list with repo name with two commitids which is from and to. repolist = [['repo1','123432','1231323'],['repo2','123123a','raera']] I want to get the list of all code commits between the commit ids For example when you look at 'repo1', it should show all the commits between 123432 and 1231323. and continue with 'repo2'

This is my code so far.

for i in list:
respone = resources.get_commit(repositoryName=i[0], commitId=i[1])
parent = respone['commit']['parents']

I want look into the parent and check if the parent is same as i[2] if its not same then run the resources.get_commit(repositoryName=i[0], commitId=i[1]) but instead of i[1] it will look at the parent.

How do I look keep looping until the parent and i[2] are same.

I looked at boto3 documentation on codecommit, its looks like currently it doesn't have the ability to get the list.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source