- Notifications
You must be signed in to change notification settings - 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
base: master
Are you sure you want to change the base?
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, enhances the LinearB app with propDefinitions and API helpers (teams, services, incidents), refactors Create Incident to use app propDefinitions, bumps package and action versions, and updates @pipedream/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)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ 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)
🔇 Additional comments (2)
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.yaml
is 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_at
as a nested object withbefore
/after
keys, 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
headers
parameter prevents potential undefined errors and makes the method more resilient.
70-89
: LGTM! New API methods are well-structured.The new methods
getTeams
,getServices
, andgetIncidents
are correctly implemented:
getTeams
appropriately uses the V2 API endpointgetIncidents
correctly uses POST for the search operation- All methods follow the existing pattern and properly spread additional arguments
8-37
: Ignore pagination mismatch warning. ThegetTeams
andgetServices
methods acceptparams.page
via their args spread, so passingpage
is 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
description: "The specific time when the incident was logged and officially opened. (Format: `YYYY-MM-DD`)", | ||
optional: true, | ||
}, | ||
issuedAtAfter: { | ||
type: "string", | ||
label: "Issued At After", | ||
description: "The specific time when the incident was logged and officially opened. (Format: `YYYY-MM-DD`)", | ||
optional: true, | ||
}, | ||
startedAt: { | ||
type: "string", | ||
label: "Started At", | ||
description: "The specific time when work on the incident commenced. (Format: `YYYY-MM-DD`)", | ||
optional: true, | ||
}, | ||
endedAt: { | ||
type: "string", | ||
label: "Ended At", | ||
description: "The specific time when the incident was successfully resolved. (Format: `YYYY-MM-DD`)", |
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.
These props mention "specific time" but the format specified is date-only. Which is it, date or datetime? This should be more clear
Resolves #9417
Summary by CodeRabbit
New Features
Refactor
Chores