Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
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
5 changes: 5 additions & 0 deletions blurb/blurb.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ def finish_entry():

no_changes = metadata.get('no changes')

lowest_possible_gh_issue_number = 32426

issue_keys = {
'gh-issue': 'GitHub',
'bpo': 'bpo',
Expand All @@ -486,6 +488,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) < lowest_possible_gh_issue_number:
throw("The gh-issue number must be 32426 or above, not a PR number.")

if key in issue_keys:
try:
int(value)
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