Skip to content

Commit 7b2b46d

Browse files
committed
Accept GitHub issues numbered only 32426 or above
1 parent 6784c8e commit 7b2b46d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

blurb/blurb.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -956,9 +956,13 @@ def init_tmp_with_template():
956956
failure = str(e)
957957

958958
if not failure:
959-
assert len(blurb) # if parse_blurb succeeds, we should always have a body
960-
if len(blurb) > 1:
961-
failure = "Too many entries! Don't specify '..' on a line by itself."
959+
with open(tmp_path, "rt", encoding="utf-8") as file:
960+
for line in file:
961+
if line.startswith(".. gh-issue:"):
962+
issue_number = line.split(":")[1].strip()
963+
if issue_number.isdigit() and int(issue_number) < 32426:
964+
failure = "The gh-issue number should be 32426 or above."
965+
break
962966

963967
if failure:
964968
print()

0 commit comments

Comments
 (0)