MCPcopy Create free account
hub / github.com/apache/solr / write_changelog_yaml

Function write_changelog_yaml

dev-tools/scripts/addDepsToChanges.py:187–208  ·  view source on GitHub ↗

Write each ChangeEntry to a YAML file in changelog/unreleased/

(entries)

Source from the content-addressed store, hash-verified

185
186
187def 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
211def dedupe_entries(entries):

Callers 1

mainFunction · 0.85

Calls 3

yaml_filenameMethod · 0.80
to_yaml_dictMethod · 0.80
dumpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…