-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: re-add Linear integration #31114
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
Conversation
…g into err-dn/linear-integration
…g into err-dn/linear-integration
…g into err-dn/linear-integration
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.
PR Summary
This PR reintroduces Linear integration support for error tracking in PostHog, reverting a previous revert while maintaining proper migration numbering.
- Added
LinearTeamPicker
component andlinearIntegrationLogic
for selecting and managing Linear teams - Added new
ErrorTrackingIntegrations
component to handle Linear workspace connections - Implemented Linear template for creating issues from PostHog events with proper GraphQL integration
- Added migration
0709_alter_integration_kind.py
to support 'linear' as a valid integration kind - Added environment variables
LINEAR_APP_CLIENT_ID
andLINEAR_APP_CLIENT_SECRET
for OAuth configuration
19 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
linearIntegrations: [ | ||
(s) => [s.integrations], | ||
(integrations) => { | ||
return integrations?.filter((x) => x.kind == 'linear') || [] |
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.
style: The fallback to empty array is only used for linearIntegrations but not for slackIntegrations (line 177). Consider adding the same fallback pattern to slackIntegrations for consistency.
return integrations?.filter((x) => x.kind == 'linear') || [] | |
return integrations?.filter((x) => x.kind == 'slack') || [] |
if (res.status != 200 or res.body.success == false) { | ||
throw Error(f'Failed to create Linear issue: {res.status}: {res.body}'); |
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.
logic: The error check res.body.success == false
assumes the response body has a success property, but the GraphQL response structure might not include this directly. Should check for res.body.data?.issueCreate?.success
instead.
Size Change: +243 B (0%) Total Size: 13.2 MB ℹ️ View Unchanged
|
Problem
Revert of the revert in #31112
Changes
Nothing changes from #30917 except the migration number is one lower because the bad migration has been removed