MCPcopy Create free account
hub / github.com/apache/arrow / get_candidate_fix_version

Function get_candidate_fix_version

dev/merge_arrow_pr.py:195–218  ·  view source on GitHub ↗
(mainline_versions,
                              maintenance_branches=())

Source from the content-addressed store, hash-verified

193
194
195def get_candidate_fix_version(mainline_versions,
196 maintenance_branches=()):
197
198 all_versions = [getattr(v, "name", v) for v in mainline_versions]
199
200 def version_tuple(x):
201 # Parquet versions are something like cpp-1.2.0
202 numeric_version = getattr(x, "name", x).split("-", 1)[-1]
203 return tuple(int(_) for _ in numeric_version.split("."))
204 all_versions = sorted(all_versions, key=version_tuple, reverse=True)
205
206 # Only suggest versions starting with a number, like 0.x but not JS-0.x
207 mainline_versions = all_versions
208 major_versions = [v for v in mainline_versions if v.endswith('.0.0')]
209
210 if len(mainline_versions) > len(major_versions):
211 # If there is a future major release, suggest that
212 mainline_versions = major_versions
213
214 mainline_versions = [v for v in mainline_versions
215 if f"maint-{v}" not in maintenance_branches]
216 default_fix_versions = fix_version_from_branch(mainline_versions)
217
218 return default_fix_versions
219
220
221def format_issue_output(issue_type, issue_id, status,

Callers 1

prompt_for_fix_versionFunction · 0.85

Calls 2

lenFunction · 0.85
fix_version_from_branchFunction · 0.85

Tested by

no test coverage detected