[Linear] Add Base Integration#3080
[Linear] Add Base Integration#3080ainiroadmike-openclaw wants to merge 2 commits intosuperplanehq:mainfrom
Conversation
Implements a new component to retrieve billable GitHub Actions usage for orgs and repos. - Adds Get Workflow Usage action component - Supports org-wide and per-repo usage queries - Filters by time range (year/month/day) and runner OS/SKU - Returns total minutes and breakdown by OS - Updates GitHub App manifest to request admin:read permission for billing API access Fixes superplanehq#2277
Implements Linear project management integration for SuperPlane. Features: - Personal API key authentication - GraphQL client for Linear API - Create Issue action component - On Issue Created trigger with team/label filtering - Webhook handler for Linear events - Team resource listing - Comprehensive tests Components: - linear.createIssue: Create issues with team, title, description, assignee, priority, state, labels - linear.onIssueCreated: Trigger workflows on new issue creation Fixes superplanehq#2485
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on March 12
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| } | ||
|
|
||
| usageData.MinutesUsed = response.TotalPaidMinutesUsed | ||
| usageData.TotalPaidMinutes = response.TotalPaidMinutesUsed |
There was a problem hiding this comment.
MinutesUsed and TotalPaidMinutes always have identical values
High Severity
usageData.MinutesUsed and usageData.TotalPaidMinutes are both assigned from response.TotalPaidMinutesUsed, making them always identical. The response struct declares TotalMinutesUsed (total billable minutes) as a separate field, but it's never read. MinutesUsed was likely intended to use response.TotalMinutesUsed to distinguish total usage from paid-only usage. The same issue occurs in both the org-wide and per-repo code paths.
Additional Locations (1)
| return nil | ||
| } | ||
| return metadata.Team | ||
| } |
There was a problem hiding this comment.
|
|
||
| if _, err := client.Do(context.Background(), req, &response); err != nil { | ||
| continue | ||
| } |
There was a problem hiding this comment.
Per-repo API errors silently swallowed producing incomplete data
Medium Severity
In the per-repo code path, both the request creation error and the API call error are handled with continue, silently skipping failed repositories. The caller receives partial billing data with no indication that some repos failed. For a billing/cost monitoring component, silently undercounting usage is worse than returning an error.
| return err | ||
| } | ||
|
|
||
| req.Header.Set("Authorization", apiKey) |
There was a problem hiding this comment.
Linear API auth header missing Bearer token prefix
High Severity
The Authorization header is set to the raw API key without the Bearer prefix. Linear's API requires the Authorization: Bearer <token> format, consistent with every other integration in this codebase (cloudflare, cursor, dash0, daytona all use "Bearer " + token). This causes all Linear API calls to fail with an authentication error, rendering the entire integration non-functional.


Summary
Adds Linear project management integration to SuperPlane with base components for issue tracking workflows.
Changes
linear.createIssue- Create issues with full field supportlinear.onIssueCreated- React to new issues with team/label filteringComponents
Create Issue (Action)
On Issue Created (Trigger)
Use Cases
Reference
Closes #2485
Demo video will be added after initial review.