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

Method to_yaml_dict

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

Convert to a dictionary suitable for YAML serialization. Extracts JIRA IDs from the title and adds them to links.

(self)

Source from the content-addressed store, hash-verified

61 return f"* PR#{self.pr_num}: {self.message} ({self.author})\n"
62
63 def to_yaml_dict(self) -> dict:
64 """
65 Convert to a dictionary suitable for YAML serialization.
66 Extracts JIRA IDs from the title and adds them to links.
67 """
68 # Extract JIRA IDs from the message
69 title, jira_links = extract_jira_issues_from_title(self.message)
70
71 # Build links: JIRA issues first, then PR
72 links = jira_links.copy() # Start with JIRA links
73 links.append({
74 'name': f'PR#{self.pr_num}',
75 'url': f'https://github.com/apache/solr/pull/{self.pr_num}'
76 })
77
78 return {
79 'title': title,
80 'type': 'dependency_update',
81 'authors': [
82 {
83 'name': self.author
84 }
85 ],
86 'links': links
87 }
88
89 def yaml_filename(self) -> str:
90 """

Callers 1

write_changelog_yamlFunction · 0.80

Calls 3

copyMethod · 0.65
appendMethod · 0.65

Tested by

no test coverage detected