Skip to content

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Oct 7, 2025

Resolves #9417

Summary by CodeRabbit

  • New Features

    • Added a “Search Incidents” action with filters for teams, services, repositories, dates, statuses, and result limits.
    • Exposed dynamic selectable inputs for Teams and Services for easier selection.
  • Refactor

    • Updated Create Incident to use the shared dynamic Teams and Services selectors.
  • Chores

    • Bumped LinearB package to v0.2.0 and updated platform dependency to ^3.1.0.
…vices, add search incidents action, and update version to 0.2.0. Bump create incident action version to 0.0.3 and update dependencies.
@luancazarine luancazarine linked an issue Oct 7, 2025 that may be closed by this pull request
Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Oct 7, 2025 3:42pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 7, 2025 3:42pm
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary of Changes
LinearB app enhancements
components/linearb/linearb.app.mjs
Added propDefinitions for teams and services (dynamic options); added getTeams, getServices, and getIncidents methods; changed getHeaders(headers)getHeaders(headers = {}).
New action: Search Incidents
components/linearb/actions/search-incidents/search-incidents.mjs
New exported action "Search Incidents" with props (app, teams, services, repositoryUrls, issuedAtBefore/After, startedAt, endedAt, statuses, maxResults) and run using app.paginate over getIncidents; returns incidents and summary.
Create Incident props refactor
components/linearb/actions/create-incident/create-incident.mjs
Version bumped 0.0.20.0.3; replaced explicit string[] declarations for props.teams and props.services with `propDefinition: [app, "teams"
Package metadata
components/linearb/package.json
Package version bumped 0.1.00.2.0; dependency @pipedream/platform updated ^1.6.0^3.1.0.
Source version bump / import order
components/linearb/sources/new-deploy-created/new-deploy-created.mjs
Import order adjusted; source version bumped 0.0.10.0.2.

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 
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A rabbit nibbles keys at dawn's soft light,
New searches hop out, tidy and bright.
Teams and services line up in a row,
Incidents found where the wild data grow.
Versioned paws leave a jaunty trace—thump! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning Issue #9417 requested triggers on deploy, merge, pickup, pull request, and review events and actions to report data to other apps and send issues to GitHub. This PR only implements the deploy trigger and two actions (create-incident and search-incidents) without adding the merge, pickup, pull request, or review triggers or the GitHub issue action. As a result, it does not fully satisfy the linked issue requirements. Please implement the remaining event triggers for merge, pickup, pull request, and review, and add the requested action for sending issues to GitHub to fully address issue #9417.
Description Check ⚠️ Warning The PR description only contains “Resolves #9417” and does not follow the repository’s template, which requires a “## WHY” section explaining the motivation for the changes. It lacks the context needed to understand why these updates are necessary and fails to provide any detail beyond the issue reference. Because it omits required template sections, the description is incomplete. Please update the PR description to follow the template by adding a “## WHY” section that explains the rationale for these changes and include any additional relevant context or details.
Title Check ❓ Inconclusive The title only includes the issue number and app name and does not describe any of the changes introduced in this pull request, making it too vague to convey the primary purpose. A reviewer scanning history would not know which sources or actions were added or updated. Because it fails to summarize the main changes in a concise sentence, it does not meet the criteria for a clear PR title. Please update the title to a concise summary of the main changes, for example “Add LinearB search-incidents action and update create-incident props and version,” so that the purpose of this PR is immediately clear.
✅ Passed checks (2 passed)
Check name Status Explanation
Out of Scope Changes Check ✅ Passed All modifications—including the new search-incidents action, updates to create-incident props and versions, the added app methods, and the package version bump—directly support the objectives of issue #9417 and no unrelated code changes have been introduced.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 9417-linearb

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ed64584 and 6861b50.

📒 Files selected for processing (1)
  • components/linearb/sources/new-deploy-created/new-deploy-created.mjs (1 hunks)
⏰ 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: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/linearb/sources/new-deploy-created/new-deploy-created.mjs (2)

3-3: LGTM!

The import reordering and version bump are appropriate changes.

Also applies to: 9-9


54-56: Ensure consistent timestamp fields
Sorting by published_at (line 54) but tracking lastResource.created_at (line 82 via getLastCreatedAt()) may miss or duplicate events if those fields differ. Confirm whether the LinearB API guarantees they’re aligned, or switch to using the same field throughout (e.g. sort_by: "created_at" or filter on published_at exclusively).


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c1a754 and ed64584.

⛔ 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 plain YYYY-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 correct

The LinearB incidents search endpoint accepts issued_at as a nested object with before/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, and getIncidents are correctly implemented:

  • getTeams appropriately uses the V2 API endpoint
  • getIncidents correctly uses POST for the search operation
  • All methods follow the existing pattern and properly spread additional arguments

8-37: Ignore pagination mismatch warning. The getTeams and getServices methods accept params.page via their args spread, so passing page is correct.

Likely an incorrect or invalid review comment.

Copy link
Collaborator

@GTFalcao GTFalcao left a 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

Comment on lines +39 to +57
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`)",
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants