Skip malformed Gitea pull request entries in context endpoint #83

Closed
opened 2026-08-06 07:16:41 +00:00 by timmy · 0 comments
Owner

Evidence: src/main.py filters malformed repository and issue entries, but pull-request entries are only checked for being objects before required fields are indexed. A partial Gitea PR object therefore raises KeyError and replaces the entire context with fallback data. Preserve valid PRs by skipping entries missing id, number, title, state, or html_url.

Acceptance: a behavioral test supplies one malformed and one valid pull request; /api/v1/context returns the valid PR without falling back.

Evidence: src/main.py filters malformed repository and issue entries, but pull-request entries are only checked for being objects before required fields are indexed. A partial Gitea PR object therefore raises KeyError and replaces the entire context with fallback data. Preserve valid PRs by skipping entries missing id, number, title, state, or html_url. Acceptance: a behavioral test supplies one malformed and one valid pull request; /api/v1/context returns the valid PR without falling back.
timmy self-assigned this 2026-08-06 07:16:41 +00:00
timmy closed this issue 2026-08-06 07:18:26 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#83
No description provided.