File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 25
25
- [ ] hook after changelog is generated (api calls)
26
26
- [ ] add support for change_type maps
27
27
"""
28
+ import os
28
29
import re
29
30
from collections import defaultdict
30
31
from typing import Dict , Iterable , List , Optional
@@ -157,6 +158,14 @@ def get_metadata(filepath: str) -> Dict:
157
158
unreleased_title : Optional [str ] = None
158
159
latest_version : Optional [str ] = None
159
160
latest_version_position : Optional [int ] = None
161
+ if not os .path .isfile (filepath ):
162
+ return {
163
+ "unreleased_start" : None ,
164
+ "unreleased_end" : None ,
165
+ "latest_version" : None ,
166
+ "latest_version_position" : None ,
167
+ }
168
+
160
169
with open (filepath , "r" ) as changelog_file :
161
170
for index , line in enumerate (changelog_file ):
162
171
line = line .strip ().lower ()
You can’t perform that action at this time.
0 commit comments