Skip to content

Commit c9a28b9

Browse files
authored
Release issue status (Azure#21256)
* Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py
1 parent 8f0d3e6 commit c9a28b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/release_issue_status/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,11 @@ def auto_close_issue(sdk_repo, item):
202202
assignee = issue_info.assignee.login
203203
link = issue_info.html_url
204204
closed_issue_info = f'{package_name},{assignee},{created_at},{closed_at},{link}\n'
205-
with open(_FILE_OUT, 'a+') as file_out:
206-
file_out.write(closed_issue_info)
205+
with open(_FILE_OUT, 'r') as file_read:
206+
lines = file_read.readlines()
207+
with open(_FILE_OUT, 'w') as file_write:
208+
lines.insert(1, closed_issue_info)
209+
file_write.writelines(lines)
207210

208211
def _get_last_released_date(package_name):
209212
pypi_link = f'https://pypi.org/project/{package_name}/#history'

0 commit comments

Comments
 (0)