Versioned API schema
GitHub REST API email objects instead of strings master_branch default_branch media type beta changes
Client receives email objects/default_branch fields where old media-type code expects string emails/master_branch.
Agent Quick Fix
Repair against the current GitHub REST API contract, then keep the change narrow and source-backed.
Product: GitHub REST API
Current-contract area: Legacy beta media type changes response properties
Likely root cause: Client receives email objects/default_branch fields where old media-type code expects string emails/master_branch.
Repair direction: Verifier exercises the changed field/status/enum plus an unaffected endpoint to prevent a brittle one-off patch. Exercise strict and permissive parsing plus one downstream behavior tied to the changed field.
Symptom
Client receives email objects/default_branch fields where old media-type code expects string emails/master_branch.
Why This Happens
Several historical response shapes are locally plausible; only the selected current API version determines fields, enums, media types, and status codes.
Common Wrong Fixes
- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.
Codex Search Keywords
These are the search terms observed in a neutral Codex validation run for this failure shape.
GitHub REST API email objects instead of strings master_branch default_branch media type beta changes
site:docs.github.com REST API default_branch master_branch email object GitHub API media type
"master_branch" "default_branch" "GitHub API"
"master_branch" "api.github.com" "default_branch"
GitHub REST API "default_branch" repository response docs
https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28
'Response schema' in https://docs.github.com/en/rest/users/emails?apiVersion=2022-11-28
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28
Source Trail
GitHub source file/reference:
- GitHub REST API 2026-03-10 breaking changes: https://docs.github.com/en/rest/about-the-rest-api/breaking-changes?apiVersion=2026-03-10
- GitHub source file or repository reference: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28
- GitHub source file or repository reference: https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28
- GitHub REST API 2026-03-10 breaking changes: https://docs.github.com/en/rest/about-the-rest-api/breaking-changes?apiVersion=2026-03-10
- GitHub source file or repository reference: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28
- GitHub source file or repository reference: https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28