@@ -94,9 +94,9 @@ def get_issue_structure(config, issues, version):
94
94
# format issue summary to remove backticks
95
95
# (necessary for next-gen)
96
96
97
- issue_summary = issue .fields .summary .encode ( "utf-8" ). replace ('`' , '' )
97
+ issue_summary = issue .fields .summary .replace ('`' , '' )
98
98
99
- issue_pair = (issue .key . encode ( "utf-8" ) , issue_summary )
99
+ issue_pair = (issue .key , issue_summary )
100
100
101
101
if len (components ) == 0 :
102
102
# if there isn't a component put this in the last grouping.
@@ -169,11 +169,11 @@ def generate_changelog_rst(config, headings, fixVersion):
169
169
170
170
if len (issues ) == 1 :
171
171
r .content ("{1} {0}" .format (issues [0 ][1 ], r .role (
172
- "issue" , issues [0 ][0 ])), wrap = False )
172
+ "issue" , issues [0 ][0 ])))
173
173
else :
174
174
for issue in issues :
175
175
r .li ("{1} {0}" .format (issue [1 ], r .role (
176
- "issue" , issue [0 ])), wrap = False )
176
+ "issue" , issue [0 ])))
177
177
r .newline ()
178
178
179
179
# repeat the above formatting with minor variations to do the nesting.
@@ -190,11 +190,11 @@ def generate_changelog_rst(config, headings, fixVersion):
190
190
sub_issues = headings [sub ]
191
191
if len (sub_issues ) == 0 :
192
192
r .content ("{1} {0}" .format (sub_issues [0 ][1 ].strip (), r .role (
193
- "issue" , sub_issues [0 ][0 ])), wrap = False )
193
+ "issue" , sub_issues [0 ][0 ])))
194
194
else :
195
195
for issue in sub_issues :
196
196
r .li ("{1} {0}" .format (issue [1 ].strip (), r .role (
197
- "issue" , issue [0 ])), wrap = False )
197
+ "issue" , issue [0 ])))
198
198
r .newline ()
199
199
200
200
return r
@@ -207,18 +207,19 @@ def write_changelog_file(rst, fixVersion):
207
207
fn = fixVersion + ".rst"
208
208
outputDir = os .path .join (
209
209
sourceDir , "source/includes/changelogs/releases" , fn )
210
- rst .write (outputDir )
211
- logger .info (
212
- "wrote changelog '{0}'. Commit this file independently." .format (outputDir ))
213
210
214
- print (
215
- "wrote changelog '{0}'. Commit this file independently." . format ( outputDir ))
211
+ with open ( outputDir , 'w' ) as f :
212
+ f . write ( str ( rst ))
216
213
214
+ logger .info (
215
+ "wrote changelog '{0}'. Commit this file independently." .format (outputDir ))
217
216
217
+ print (
218
+ "wrote changelog '{0}'. Commit this file independently." .format (outputDir ))
218
219
219
220
def main ():
220
221
# Prompt user for the version to generate the changelog for:
221
- fixVersion = raw_input ("Enter changelog version: " )
222
+ fixVersion = input ("Enter changelog version: " )
222
223
223
224
# Get list of JIRA issues to include in changelog
224
225
issues = get_jira_issues (fixVersion )
0 commit comments