Skip to content

Commit c9c3e4a

Browse files
menkotoglouhugovkpradyunsg
authored
Accept GitHub issues numbered only 32426 or above (#519)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
1 parent d752290 commit c9c3e4a

10 files changed

+17
-8
lines changed

blurb/blurb.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ def finish_entry():
473473

474474
no_changes = metadata.get('no changes')
475475

476+
lowest_possible_gh_issue_number = 32426
477+
476478
issue_keys = {
477479
'gh-issue': 'GitHub',
478480
'bpo': 'bpo',
@@ -486,6 +488,9 @@ def finish_entry():
486488
# we'll complain about the *first* error
487489
# we see in the blurb file, which is a
488490
# better user experience.
491+
if key == "gh-issue" and int(value) < lowest_possible_gh_issue_number:
492+
throw(f"The gh-issue number must be {lowest_possible_gh_issue_number} or above, not a PR number.")
493+
489494
if key in issue_keys:
490495
try:
491496
int(value)

blurb/tests/fail/small-gh-number.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. gh-issue: 100
2+
.. section: Library
3+
4+
This is an invalid blurb. GitHub issues should be 32426 or above.

blurb/tests/pass/basic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. gh-issue: 0
2+
.. gh-issue: 40000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/basic.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. gh-issue: 0
2+
.. gh-issue: 40000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/case-insensitive.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. GH-Issue: 0
2+
.. GH-Issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/case-insensitive.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. gh-issue: 0
2+
.. gh-issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/no-break-long-words.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 1234
2-
.. gh-issue: 0
2+
.. gh-issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/no-break-long-words.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 1234
2-
.. gh-issue: 0
2+
.. gh-issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/no-break-on-hyphens.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 7333
2-
.. gh-issue: 21121
2+
.. gh-issue: 41121
33
.. nonce: ZLsRil
44
.. section: Library
55

blurb/tests/pass/no-break-on-hyphens.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 7333
2-
.. gh-issue: 21121
2+
.. gh-issue: 41121
33
.. nonce: ZLsRil
44
.. section: Library
55

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy