Convert to a dictionary suitable for YAML serialization. Extracts JIRA IDs from the title and adds them to links.
(self)
| 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 | """ |
no test coverage detected