INNER CODE UNIT · Python
handle_compatibility_issue
Steam-Headless/docker-steam-headless · .github/scripts/manage-compatibility-report.py:196
def handle_compatibility_issue(owner, repo, issue_number, token, repo_root):
api_base = f"https://api.github.com/repos/{owner}/{repo}"
issue = github_api_request(f"{api_base}/issues/{issue_number}", token=token)
body = issue.get("body", "")
existing_labels = [lbl["name"] for lbl in issue.get("labels", [])]
# Extract fields from issue markdown body (handling current and legacy headings)
os_raw = extract_heading_value(body, ["Host Operating System"])
os_ver_raw = extract_heading_value(body, ["Host OS Version", "Host OS Version / Release"])
gpu_vendor_raw = extract_heading_value(body, ["GPU Vendor", "GPU Manufacturer / Vendor"])
gpu_model_raw = extract_heading_value(body, ["GPU Model"])
deployment_mode_raw = extract_heading_value(body, ["Deployment Mode"])
overall_status_raw = extract_heading_value(body, ["Overall Compatibility Result", "Overall Result"])
if not (os_raw and gpu_vendor_raw and gpu_model_raw):
print(f"Issue #{issue_number} is missing core compatibility form fields. Skipping.")
return