File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def update_records(issue, issue_number=None):
36
36
issue_labels = ["`" + label ["name" ] + "`" for label in issue ["labels" ]]
37
37
issue_link = issue ["html_url" ]
38
38
39
- with open ("README.md" , "r+ " ) as file :
39
+ with open ("README.md" , "r" ) as file :
40
40
lines = file .readlines ()
41
41
42
42
table_start_index = None
@@ -55,8 +55,7 @@ def update_records(issue, issue_number=None):
55
55
lines [existing_issue_index ] = new_line
56
56
else :
57
57
lines .insert (table_start_index , new_line )
58
-
59
- file .seek (0 )
58
+ with open ("README.md" , "w" ) as file :
60
59
file .writelines (lines )
61
60
62
61
return "Successfully updated Records of README.md"
@@ -143,4 +142,4 @@ def main(issue_number):
143
142
args = parser .parse_args ()
144
143
main (args .issue_number )
145
144
except Exception as e :
146
- print (f"Error: { e } " )
145
+ print (f"Error: { e } " )
You can’t perform that action at this time.
0 commit comments