also scrape PRs when the full URL is pasted
This commit is contained in:
parent
e52d94bea9
commit
d7919b6989
1 changed files with 8 additions and 3 deletions
|
@ -138,10 +138,15 @@ for label in labels:
|
|||
pr_list_formatted = set()
|
||||
pr_list = pr_list.group(1)
|
||||
for p in pr_list.split(","):
|
||||
if not re.match(r"#\d", p.strip()):
|
||||
if re.match(r"#\d", p.strip()):
|
||||
prs.add(p.strip())
|
||||
pr_list_formatted.add("`PR" + str(p.strip()) + "`_")
|
||||
elif re.match(r"https://github.com/matrix-org/matrix-doc/pulls/\d", p.strip()):
|
||||
pr = "#" + p.strip().replace('https://github.com/matrix-org/matrix-doc/pulls/', '')
|
||||
prs.add(pr)
|
||||
pr_list_formatted.add("`PR" + str(pr) + "`_")
|
||||
else:
|
||||
raise RuntimeWarning
|
||||
prs.add(p.strip())
|
||||
pr_list_formatted.add("`PR" + str(p.strip()) + "`_")
|
||||
text_file.write(" - " + ', '.join(pr_list_formatted))
|
||||
text_file.write("\n")
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue