A code review has highlighted a critical potential bug: a mismatch between the JSON fields requested from the gh CLI (which often use camelCase like createdAt) and the fields it actually returns (which may use snake_case like created_at). This ticket covers verifying the correct field names and standardizing their usage throughout the SyncService to prevent runtime errors.
Acceptance Criteria
- The actual JSON output of
gh issue view <N> --json createdAt,created_at,author,user and gh release view <T> --json publishedAt,published_at is inspected to definitively identify the correct field names returned by the API.
- All
gh CLI calls in SyncService.mjs are updated to request the correct, verified field names.
- All property accessors within the service's logic (e.g.,
issue.createdAt vs. issue.created_at) are updated to match the verified API response, ensuring consistency.
- A new unit or integration test is created to validate the field name mappings for a sample issue and release payload, preventing future regressions.
A code review has highlighted a critical potential bug: a mismatch between the JSON fields requested from the
ghCLI (which often use camelCase likecreatedAt) and the fields it actually returns (which may use snake_case likecreated_at). This ticket covers verifying the correct field names and standardizing their usage throughout theSyncServiceto prevent runtime errors.Acceptance Criteria
gh issue view <N> --json createdAt,created_at,author,userandgh release view <T> --json publishedAt,published_atis inspected to definitively identify the correct field names returned by the API.ghCLI calls inSyncService.mjsare updated to request the correct, verified field names.issue.createdAtvs.issue.created_at) are updated to match the verified API response, ensuring consistency.