8000 Accept GitHub issues numbered only 32426 or above by menkotoglou · Pull Request #519 · python/core-workflow · GitHub
[go: up one dir, main page]

Skip to content

Accept GitHub issues numbered only 32426 or above #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Distinqush if gh-issue is number or < 32426 errors
  • Loading branch information
menkotoglou committed Dec 18, 2023
commit f864c05abd807622bb273a03b8e7bdfb67c0dd76
15 changes: 8 additions & 7 deletions blurb/blurb.py
A0CB
Original file line number Diff line number Diff line change
Expand Up @@ -956,13 +956,14 @@ def init_tmp_with_template():
failure = str(e)

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

if failure:
print()
Expand Down
0