Repository navigation
Fix settings.integration_events() to request the events path - #131
Conversation
The method requested orgs/{org}/settings/integrations/{id}, which has no
GET route, so it always failed. The events listing lives under /events
and checks integration:list.
settings.integration_events() to request the events path
PR SummaryLow Risk Overview The method’s return type is updated from Reviewed by Cursor Bugbot for commit 5007b6f. Configure here. |
|
bugbot run |
Eric Hibbs (flowstate)
left a comment
There was a problem hiding this comment.
Path fix checks out against the API: the bare integrations/{integration_id} path only routes PUT and DELETE, and GET …/events requires integration:list. The new test fails on the old path.
Non-blocking, fine as a follow-up: GET …/events returns a bare JSON array, but integration_events() is annotated -> dict and the test mocks {"results": [...]}. Worth aligning the annotation and fixture with the real shape at some point.
GET .../integrations/{integration_id}/events answers with a bare JSON
array of events. The method was annotated -> dict and fell back to {},
and its test mocked a {"results": [...]} wrapper the API never sends.
The annotation and fallback are now a list, and the fixture has the
shape of a real event.
|
Took the nit in this PR instead of a follow-up (5007b6f). |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5007b6f. Configure here.
settings.integration_events()always failed. It requestedGET orgs/{org_slug}/settings/integrations/{integration_id}, and that path has noGETroute: the API only definesPUTandDELETEthere.Root Cause
The method's path stops at the integration ID. The integration events listing is one segment deeper, at
.../integrations/{integration_id}/events.Fix
orgs/{org_slug}/settings/integrations/{integration_id}/events. The endpoint checksintegration:list.listand fall back to[]. The endpoint returns a bare JSON array of events, not an object.Unit tests pass: 194 passed, 1 skipped.
#130 adds a scope table to the README that lists this method with the
/eventspath, so merge this PR before that one.Public Changelog
Fixed
settings.integration_events(), which requested a path with no GET route and always failed.Refs: CE-462