Write each ChangeEntry to a YAML file in changelog/unreleased/
(entries)
| 185 | |
| 186 | |
| 187 | def write_changelog_yaml(entries): |
| 188 | """ |
| 189 | Write each ChangeEntry to a YAML file in changelog/unreleased/ |
| 190 | """ |
| 191 | changelog_dir = Path('changelog/unreleased') |
| 192 | |
| 193 | # Create directory if it doesn't exist |
| 194 | changelog_dir.mkdir(parents=True, exist_ok=True) |
| 195 | |
| 196 | count = 0 |
| 197 | for entry in entries: |
| 198 | filename = changelog_dir / entry.yaml_filename() |
| 199 | yaml_data = entry.to_yaml_dict() |
| 200 | |
| 201 | # Write YAML file with proper formatting |
| 202 | with open(filename, 'w') as f: |
| 203 | yaml.dump(yaml_data, f, default_flow_style=False, sort_keys=False, allow_unicode=True) |
| 204 | |
| 205 | print(f"Created: {filename}") |
| 206 | count += 1 |
| 207 | |
| 208 | return count |
| 209 | |
| 210 | |
| 211 | def dedupe_entries(entries): |
no test coverage detected
searching dependent graphs…