-
Couldn't load subscription status.
- Fork 5.5k
9417 linearb #18665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9417 linearb #18665
Conversation
…vices, add search incidents action, and update version to 0.2.0. Bump create incident action version to 0.0.3 and update dependencies.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a new "Search Incidents" action, adds propDefinitions and API helpers (getTeams, getServices, getIncidents) to the LinearB app, refactors Create Incident props to use app propDefinitions and bumps action/package/source versions and platform dependency. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant UI as Pipedream UI
participant SA as Search Incidents Action
participant APP as LinearB App
participant API as LinearB REST API
U->>UI: Configure action (filters, maxResults)
UI->>APP: Request prop options for `teams`/`services`
APP->>API: GET /teams, GET /services
API-->>APP: Teams, Services lists
APP-->>UI: Options (names)
U->>SA: Trigger with selected filters
SA->>APP: paginate(getIncidents, payload, limit)
loop pages until limit
APP->>API: POST /incidents/search (filters)
API-->>APP: Incidents page
APP-->>SA: Page results
end
SA-->>U: Return incidents and summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/linearb/actions/create-incident/create-incident.mjs (1)
68-73: Document case sensitivity requirements for consistency.The search-incidents action notes "Lowercase only" for repository URLs (and teams/services in the app propDefinitions), but this action lacks similar guidance. Consider adding a note to the repositoryUrls description to clarify case requirements and ensure consistency across actions.
repositoryUrls: { type: "string[]", label: "Repository URLs", - description: "The list of repos urls related to this incident. Eg. `https://github.com/myorg/repo1.git`", + description: "The list of repos urls related to this incident. **Lowercase only**. Eg. `https://github.com/myorg/repo1.git`", optional: true, },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
components/linearb/actions/create-incident/create-incident.mjs(2 hunks)components/linearb/actions/search-incidents/search-incidents.mjs(1 hunks)components/linearb/linearb.app.mjs(2 hunks)components/linearb/package.json(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/linearb/actions/search-incidents/search-incidents.mjs (2)
components/linearb/actions/create-incident/create-incident.mjs (1)
response(98-112)components/linearb/linearb.app.mjs (1)
response(98-105)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
🔇 Additional comments (8)
components/linearb/package.json (1)
3-3: LGTM! Version bumps are appropriate.The package version increment to 0.2.0 correctly reflects the addition of new features (search action and propDefinitions), and the platform dependency update to ^3.1.0 aligns with the enhanced functionality in this PR.
Also applies to: 16-16
components/linearb/actions/create-incident/create-incident.mjs (1)
7-7: LGTM! PropDefinition refactoring improves maintainability.The version bump and transition to propDefinition wiring for teams and services centralizes prop definitions in the app module, following DRY principles and ensuring consistency across actions.
Also applies to: 54-67
components/linearb/actions/search-incidents/search-incidents.mjs (3)
101-103: LGTM! Summary generation is correct.The pluralization logic correctly handles singular and plural forms based on the result count.
36-59: Verify expected date format for search-incidents filters.
We couldn’t locate documentation on whether the search-incidents action accepts ISO 8601 timestamps or plainYYYY-MM-DD. Confirm the API’s expected date format for these filters and align the create-incident and search-incidents actions accordingly.
79-99: Issued_at payload structure is correctThe LinearB incidents search endpoint accepts
issued_atas a nested object withbefore/afterkeys, so no change is needed.components/linearb/linearb.app.mjs (3)
42-47: LGTM! Default parameter improves robustness.Adding a default empty object for the
headersparameter prevents potential undefined errors and makes the method more resilient.
70-89: LGTM! New API methods are well-structured.The new methods
getTeams,getServices, andgetIncidentsare correctly implemented:
getTeamsappropriately uses the V2 API endpointgetIncidentscorrectly uses POST for the search operation- All methods follow the existing pattern and properly spread additional arguments
8-37: Ignore pagination mismatch warning. ThegetTeamsandgetServicesmethods acceptparams.pagevia their args spread, so passingpageis correct.Likely an incorrect or invalid review comment.
…-deploy-created.mjs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to QA as this is description-only comment
components/linearb/actions/search-incidents/search-incidents.mjs
Outdated
Show resolved
Hide resolved
… for issued and incident times
|
/approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
components/linearb/actions/search-incidents/search-incidents.mjs (1)
86-89: Consider conditionally including theissued_atfilter.If both
issuedAtBeforeandissuedAtAfterare undefined, the API receives anissued_atobject with undefined properties. This may cause unexpected behavior if the API doesn't handle undefined values gracefully.Consider refactoring to only include the
issued_atfield when at least one value is provided:data: { - issued_at: { - before: this.issuedAtBefore, - after: this.issuedAtAfter, - }, + ...(this.issuedAtBefore || this.issuedAtAfter + ? { + issued_at: { + ...(this.issuedAtBefore && { before: this.issuedAtBefore }), + ...(this.issuedAtAfter && { after: this.issuedAtAfter }), + }, + } + : {}), started_at: this.startedAt,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/linearb/actions/search-incidents/search-incidents.mjs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/linearb/actions/search-incidents/search-incidents.mjs (2)
components/linearb/actions/create-incident/create-incident.mjs (1)
response(98-112)components/linearb/linearb.app.mjs (1)
response(98-105)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Publish TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/linearb/actions/search-incidents/search-incidents.mjs (1)
90-95: No action needed Axios’s JSON serialization omits undefined values, so optional filter props aren’t sent when unset.
Resolves #9417
Summary by CodeRabbit
New Features
Refactor
Chores