{"version":"2.0.42","anchor":"enhanced-github-authentication-detection","canonical_anchor":"enhanced-github-authentication-detection","heading":"Enhanced GitHub Authentication Detection","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.0.42\/e\/enhanced-github-authentication-detection","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.0.42","markdown":"### Enhanced GitHub Authentication Detection\n\n**What:** GitHub CLI authentication detection now uses JSON output parsing for more reliable credential extraction.\n\n**How it works:** The `gh auth status` command is now called with `--active --json hosts` flags, parsing structured JSON instead of text output. This improves reliability across different `gh` CLI versions and configurations.\n\n**Details:**\n\n- New function `Xi5()` at line 426046 uses `gh auth status --active --json hosts` for structured output\n- Parses JSON response to extract `hosts` object and active account login\n- Handles multiple GitHub hosts (github.com, Enterprise instances) by iterating through host entries\n- Replaces old shell parsing approach that used `sh -c \"gh auth status 2>&1 | head -n 1\"` and regex matching\n- **Evidence**: `Xi5() at line 426046-426076`\n\n**Why it matters:** More robust GitHub authentication detection prevents false negatives and works consistently across different GitHub CLI versions and Enterprise configurations."}