def get_merged_prs(start_ref, end_ref):
 ensure_pr_fetch()
 start_unmerged_branches = set((branch.strip() for branch in git.branch(all=True, no_merged=start_ref).splitlines()))
 end_merged_branches = set((branch.strip() for branch in git.branch(all=True, merged=end_ref).splitlines()))
 merged_between_refs = (start_unmerged_branches & end_merged_branches)
 merged_prs = set()
 for branch in merged_between_refs:
  match = PR_BRANCH_RE.search(branch)
  if match:
   merged_prs.add(int(match.group(1)))
 return merged_prs

def get_merged_prs ( start_ref , end_ref ) : ensure_pr_fetch ( ) start_unmerged_branches = set ( ( branch . strip ( ) for branch in git . branch ( all = True , no_merged = start_ref ) . splitlines ( ) ) ) end_merged_branches = set ( ( branch . strip ( ) for branch in git . branch ( all = True , merged = end_ref ) . splitlines ( ) ) ) merged_between_refs = ( start_unmerged_branches & end_merged_branches ) merged_prs = set ( ) for branch in merged_between_refs : match = PR_BRANCH_RE . search ( branch ) if match : merged_prs . add ( int ( match . group ( 1 ) ) ) return merged_prs
return the set of all pull requests that were merged between the start_ref and end_ref .