I am using Pygithub for extracting the merge commits
Approach:
Extract all the branches Fetch all the commits using commits = r