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
Show file tree
Hide file tree
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
Fix old test cases to comply with GH issue number range
  • Loading branch information
menkotoglou committed Dec 18, 2023
commit 724fefb23e4a6ec7d8bffd766c74d6167580f204
8000
8 changes: 3 additions & 5 deletions blurb/blurb.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ def finish_entry():
# we'll complain about the *first* error
# we see in the blurb file, which is a
# better user experience.
if key == "gh-issue" and int(value) < 32426:
throw("The gh-issue number should be 32426 or above.")

if key in issue_keys:
try:
int(value)
Expand Down Expand Up @@ -959,11 +962,6 @@ def init_tmp_with_template():
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
4 changes: 4 additions & 0 deletions blurb/tests/fail/small-gh-number.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. gh-issue: 100
.. section: Library

This is an invalid blurb. GitHub issues should be 32426 or above.
2 changes: 1 addition & 1 deletion blurb/tests/pass/basic.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 2017-05-02
.. gh-issue: 0
.. gh-issue: 40000
.. nonce: xyz
.. section: Library

Expand Down
2 changes: 1 addition & 1 deletion blurb/tests/pass/basic.rst.res
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 2017-05-02
.. gh-issue: 0
.. gh-issue: 40000
.. nonce: xyz
.. section: Library

Expand Down
2 changes: 1 addition & 1 deletion blurb/tests/pass/case-insensitive.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 2017-05-02
.. GH-Issue: 0
.. GH-Issue: 35000
.. nonce: xyz
.. section: Library

Expand Down
2 changes: 1 addition & 1 deletion blurb/tests/pass/case-insensitive.rst.res
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 2017-05-02
.. gh-issue: 0
.. gh-issue: 35000
.. nonce: xyz
.. section: Library

Expand Down
2 changes: 1 addition & 1 deletion blurb/tests/pass/no-break-long-words.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 1234
.. gh-issue: 0
.. gh-issue: 35000
.. nonce: xyz
.. section: Library

Expand Down
2 changes: 1 addition & 1 deletion blurb/tests/pass/no-break-long-words.rst.res
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 1234
.. gh-issue: 0
.. gh-issue: 35000
.. nonce: xyz
.. section: Library

Expand Down
2 changes: 1 addition & 1 deletion blurb/tests/pass/no-break-on-hyphens.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 7333
.. gh-issue: 21121
.. gh-issue: 41121
.. nonce: ZLsRil
.. section: Library

Expand Down
2 changes: 1 addition & 1 deletion blurb/tests/pass/no-break-on-hyphens.rst.res
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. date: 7333
.. gh-issue: 21121
.. gh-issue: 41121
.. nonce: ZLsRil
.. section: Library

Expand Down
0