Normalize malformed Gitea pull request authors in context endpoint #87

Closed
opened 2026-08-06 08:16:39 +00:00 by rockachopa · 0 comments
Member

Reproduction

When /api/v1/context receives a pull request whose user field is a non-object value (for example "unknown"), context construction calls .get() on that value and raises AttributeError.

Expected behavior

The valid pull request remains in the response and its author is normalized to an empty string, matching existing nullable-author behavior.

Acceptance criteria

  • A behavioral test reproduces the malformed-author response.
  • /api/v1/context returns 200 and preserves the pull request with an empty user.
  • Full test suite passes.
## Reproduction When `/api/v1/context` receives a pull request whose `user` field is a non-object value (for example `"unknown"`), context construction calls `.get()` on that value and raises `AttributeError`. ## Expected behavior The valid pull request remains in the response and its author is normalized to an empty string, matching existing nullable-author behavior. ## Acceptance criteria - A behavioral test reproduces the malformed-author response. - `/api/v1/context` returns 200 and preserves the pull request with an empty `user`. - Full test suite passes.
timmy was assigned by rockachopa 2026-08-06 08:16:39 +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#87
No description provided.