Skip to content

Commit f3f453e

Browse files
committed
[utils] Add support for URL in github comment regex
1 parent 89ce5b1 commit f3f453e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/update-checkout

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
252252

253253
cross_repos_pr = {}
254254
if github_comment:
255-
repos_with_pr = re.findall(r'apple/[-a-zA-Z0-9_]+#\d+', github_comment)
255+
regex_pr = r'(apple/[-a-zA-Z0-9_]+/pull/\d+|apple/[-a-zA-Z0-9_]+#\d+)'
256+
repos_with_pr = re.findall(regex_pr, github_comment)
256257
print("Found related pull requests:", str(repos_with_pr))
258+
repos_with_pr = [pr.replace('/pull/','#')for pr in repos_with_pr]
257259
cross_repos_pr = dict(pr.split('#') for pr in repos_with_pr)
258260

259261
if clone or clone_with_ssh:

0 commit comments

Comments
 (0)