Skip to content

Commit

Permalink
Convert review discussion into '(comment)' (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Oct 31, 2024
2 parents d58cc86 + 2d64e5f commit 138ac05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/linkotron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Patterns:
)
COMMENT = re.compile(
rf"^https://github.com/(?P<username>{USERNAME})/(?P<repo>{REPO})/"
r"(pull|issues)/(?P<number>\d+)#issuecomment-\d+/?$"
r"(pull|issues)/(?P<number>\d+)#(issuecomment-\d+|discussion_r\d+)/?$"
)


Expand Down
4 changes: 4 additions & 0 deletions tests/test_linkotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"https://github.com/python/peps/pull/2399#issuecomment-1063409480",
"python/peps#2399 (comment)",
),
(
"https://github.com/python/peps/pull/2399#discussion_r823103351",
"python/peps#2399 (comment)",
),
],
)
def test_shorten(link: str, expected: str) -> None:
Expand Down

0 comments on commit 138ac05

Please sign in to comment.