MCPcopy Create free account
hub / github.com/ipython/ipython / already_backported

Function already_backported

tools/backport_pr.py:118–124  ·  view source on GitHub ↗

return set of PRs that have been backported already

(branch, since_tag=None)

Source from the content-addressed store, hash-verified

116backport_re = re.compile(r"(?:[Bb]ackport|[Mm]erge).*#(\d+)")
117
118def already_backported(branch, since_tag=None):
119 """return set of PRs that have been backported already"""
120 if since_tag is None:
121 since_tag = check_output(['git','describe', branch, '--abbrev=0']).decode('utf8').strip()
122 cmd = ['git', 'log', '%s..%s' % (since_tag, branch), '--oneline']
123 lines = check_output(cmd).decode('utf8')
124 return set(int(num) for num in backport_re.findall(lines))
125
126def should_backport(labels=None, milestone=None, project='ipython/ipython'):
127 """return set of PRs marked for backport"""

Callers 1

backport_pr.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected