diff --git a/blurb/blurb.py b/blurb/blurb.py index 7557c23..14f2a7f 100755 --- a/blurb/blurb.py +++ b/blurb/blurb.py @@ -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', @@ -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(f"The gh-issue number must be {lowest_possible_gh_issue_number} or above, not a PR number.") + if key in issue_keys: try: int(value) diff --git a/blurb/tests/fail/small-gh-number.rst b/blurb/tests/fail/small-gh-number.rst new file mode 100644 index 0000000..9e702fb --- /dev/null +++ b/blurb/tests/fail/small-gh-number.rst @@ -0,0 +1,4 @@ +.. gh-issue: 100 +.. section: Library + +This is an invalid blurb. GitHub issues should be 32426 or above. \ No newline at end of file diff --git a/blurb/tests/pass/basic.rst b/blurb/tests/pass/basic.rst index 9667423..e6b0b75 100644 --- a/blurb/tests/pass/basic.rst +++ b/blurb/tests/pass/basic.rst @@ -1,5 +1,5 @@ .. date: 2017-05-02 -.. gh-issue: 0 +.. gh-issue: 40000 .. nonce: xyz .. section: Library diff --git a/blurb/tests/pass/basic.rst.res b/blurb/tests/pass/basic.rst.res index 9667423..e6b0b75 100644 --- a/blurb/tests/pass/basic.rst.res +++ b/blurb/tests/pass/basic.rst.res @@ -1,5 +1,5 @@ .. date: 2017-05-02 -.. gh-issue: 0 +.. gh-issue: 40000 .. nonce: xyz .. section: Library diff --git a/blurb/tests/pass/case-insensitive.rst b/blurb/tests/pass/case-insensitive.rst index 8148b68..ca1cbd5 100644 --- a/blurb/tests/pass/case-insensitive.rst +++ b/blurb/tests/pass/case-insensitive.rst @@ -1,5 +1,5 @@ .. date: 2017-05-02 -.. GH-Issue: 0 +.. GH-Issue: 35000 .. nonce: xyz .. section: Library diff --git a/blurb/tests/pass/case-insensitive.rst.res b/blurb/tests/pass/case-insensitive.rst.res index 9667423..4f1aad5 100644 --- a/blurb/tests/pass/case-insensitive.rst.res +++ b/blurb/tests/pass/case-insensitive.rst.res @@ -1,5 +1,5 @@ .. date: 2017-05-02 -.. gh-issue: 0 +.. gh-issue: 35000 .. nonce: xyz .. section: Library diff --git a/blurb/tests/pass/no-break-long-words.rst b/blurb/tests/pass/no-break-long-words.rst index 334f913..10f5d9e 100644 --- a/blurb/tests/pass/no-break-long-words.rst +++ b/blurb/tests/pass/no-break-long-words.rst @@ -1,5 +1,5 @@ .. date: 1234 -.. gh-issue: 0 +.. gh-issue: 35000 .. nonce: xyz .. section: Library diff --git a/blurb/tests/pass/no-break-long-words.rst.res b/blurb/tests/pass/no-break-long-words.rst.res index 334f913..10f5d9e 100644 --- a/blurb/tests/pass/no-break-long-words.rst.res +++ b/blurb/tests/pass/no-break-long-words.rst.res @@ -1,5 +1,5 @@ .. date: 1234 -.. gh-issue: 0 +.. gh-issue: 35000 .. nonce: xyz .. section: Library diff --git a/blurb/tests/pass/no-break-on-hyphens.rst b/blurb/tests/pass/no-break-on-hyphens.rst index 4b46c52..48bd427 100644 --- a/blurb/tests/pass/no-break-on-hyphens.rst +++ b/blurb/tests/pass/no-break-on-hyphens.rst @@ -1,5 +1,5 @@ .. date: 7333 -.. gh-issue: 21121 +.. gh-issue: 41121 .. nonce: ZLsRil .. section: Library diff --git a/blurb/tests/pass/no-break-on-hyphens.rst.res b/blurb/tests/pass/no-break-on-hyphens.rst.res index 0b6e892..cb76b62 100644 --- a/blurb/tests/pass/no-break-on-hyphens.rst.res +++ b/blurb/tests/pass/no-break-on-hyphens.rst.res @@ -1,5 +1,5 @@ .. date: 7333 -.. gh-issue: 21121 +.. gh-issue: 41121 .. nonce: ZLsRil .. section: Library
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: