Changeset View
Changeset View
Standalone View
Standalone View
contrib/buildbot/server.py
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | def backportCheck(): | ||||
if len(match.groups()) >= 2: | if len(match.groups()) >= 2: | ||||
remaining = match.group(2) | remaining = match.group(2) | ||||
return '[[{}/{} | PR{}]]{}'.format( | return '[[{}/{} | PR{}]]{}'.format( | ||||
baseUrl, PRNum, PRNum, remaining) | baseUrl, PRNum, PRNum, remaining) | ||||
return repl | return repl | ||||
line = re.sub( | line = re.sub( | ||||
r'PR(\d{3}\d+)', | r'PR[ #]*(\d{3}\d+)', | ||||
replacePRWithLink( | replacePRWithLink( | ||||
'https://github.com/bitcoin/bitcoin/pull'), | 'https://github.com/bitcoin/bitcoin/pull'), | ||||
line) | line) | ||||
# Be less aggressive about serving libsecp256k1 links. Check | # Be less aggressive about serving libsecp256k1 links. Check | ||||
# for some reference to the name first. | # for some reference to the name first. | ||||
if re.search('secp', line, re.IGNORECASE): | if re.search('secp', line, re.IGNORECASE): | ||||
line = re.sub(r'PR(\d{2}\d?)([^\d]|$)', replacePRWithLink( | line = re.sub(r'PR[ #]*(\d{2}\d?)([^\d]|$)', replacePRWithLink( | ||||
'https://github.com/bitcoin-core/secp256k1/pull'), line) | 'https://github.com/bitcoin-core/secp256k1/pull'), line) | ||||
newSummary += line | newSummary += line | ||||
if foundPRs > 0: | if foundPRs > 0: | ||||
phab.updateRevisionSummary(revisionId, newSummary) | phab.updateRevisionSummary(revisionId, newSummary) | ||||
commentMessage = ("[Bot Message]\n" | commentMessage = ("[Bot Message]\n" | ||||
"One or more PR numbers were detected in the summary.\n" | "One or more PR numbers were detected in the summary.\n" | ||||
▲ Show 20 Lines • Show All 733 Lines • Show Last 20 Lines |