MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / resolve_category

Function resolve_category

tools/commitlist.py:204–211  ·  view source on GitHub ↗
(labels: list[str], body: str)

Source from the content-addressed store, hash-verified

202
203
204def resolve_category(labels: list[str], body: str) -> str:
205 value = label_value(labels, 'release notes:')
206 if value:
207 return split_known_choice(value, PR_CATEGORIES, 'Others')
208 sections = markdown_sections(body)
209 return split_known_choice(
210 section_value(sections, 'PR Category'), PR_CATEGORIES, 'Others'
211 )
212
213
214def resolve_topic(labels: list[str], body: str) -> str:

Callers 1

_fetch_batchMethod · 0.85

Calls 4

label_valueFunction · 0.85
split_known_choiceFunction · 0.85
markdown_sectionsFunction · 0.85
section_valueFunction · 0.85

Tested by

no test coverage detected