Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c9c3e4a

Browse filesBrowse 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
Copy full SHA for c9c3e4a

10 files changed

+17
-8
lines changed

‎blurb/blurb.py

Copy file name to clipboardExpand all lines: blurb/blurb.py
+5Lines 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

Copy file name to clipboard
+4Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/basic.rst
+1-1Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/basic.rst.res
+1-1Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/case-insensitive.rst
+1-1Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/case-insensitive.rst.res
+1-1Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/no-break-long-words.rst
+1-1Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/no-break-long-words.rst.res
+1-1Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/no-break-on-hyphens.rst
+1-1Lines 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

Copy file name to clipboardExpand all lines: blurb/tests/pass/no-break-on-hyphens.rst.res
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.