File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -612,11 +612,11 @@ def _extract_next_filename(self):
612
612
metadata , body = self [- 1 ]
613
613
metadata ['section' ] = sanitize_section (metadata ['section' ])
614
614
metadata ['root' ] = root
615
- if int (metadata ["bpo" ]) > 0 :
616
- path = "{root}/Misc/NEWS.d/next/{section}/{date}.bpo-{bpo}.{nonce}.rst" .format_map (metadata )
617
- else :
618
- # assume it's a GH issue number
615
+ if int (metadata ["gh-issue" ]) > 0 :
619
616
path = "{root}/Misc/NEWS.d/next/{section}/{date}.gh-issue-{gh-issue}.{nonce}.rst" .format_map (metadata )
617
+ elif int (metadata ["bpo" ]) > 0 :
618
+ # assume it's a GH issue number
619
+ path = "{root}/Misc/NEWS.d/next/{section}/{date}.bpo-{bpo}.{nonce}.rst" .format_map (metadata )
620
620
for name in "root section date gh-issue bpo nonce" .split ():
621
621
del metadata [name ]
622
622
return path
@@ -1114,7 +1114,7 @@ def print(*a, sep=" "):
1114
1114
issue_number = metadata ['gh-issue' ]
1115
1115
if int (issue_number ):
1116
1116
body = "gh-issue-" + issue_number + ": " + body
1117
- if metadata .get ("bpo" ):
1117
+ elif metadata .get ("bpo" ):
1118
1118
issue_number = metadata ['bpo' ]
1119
1119
if int (issue_number ):
1120
1120
body = "bpo-" + issue_number + ": " + body
You can’t perform that action at this time.
0 commit comments