Skip to content

Commit 47a3f4c

Browse files
committed
fixup! Add `-i/--issue option to blurb add
1 parent e71c5a2 commit 47a3f4c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/blurb/blurb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,15 +834,17 @@ def _extract_issue_number(issue, /):
834834
else:
835835
stripped = issue.removeprefix('#')
836836
try:
837-
return int(stripped)
837+
if stripped.isdecimal():
838+
return int(stripped)
838839
except ValueError:
839840
pass
840841

841842
# Allow GitHub URL with or without the scheme
842843
stripped = issue.removeprefix('https://')
843844
stripped = stripped.removeprefix('github.com/python/cpython/issues/')
844845
try:
845-
return int(stripped)
846+
if stripped.isdecimal():
847+
return int(stripped)
846848
except ValueError:
847849
pass
848850

0 commit comments

Comments
 (0)