Skip to content

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

Merged
merged 20 commits into from
Apr 11, 2025
Merged

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Apr 11, 2025

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

@daibhin daibhin changed the title parent db27913 feat: re-add Linear integration Apr 11, 2025
@daibhin daibhin requested review from frankh, a team, hpouillot and oliverb123 April 11, 2025 11:27
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 and linearIntegrationLogic 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 and LINEAR_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') || []
Copy link
Contributor

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.

Suggested change
return integrations?.filter((x) => x.kind == 'linear') || []
return integrations?.filter((x) => x.kind == 'slack') || []

Comment on lines +31 to +32
if (res.status != 200 or res.body.success == false) {
throw Error(f'Failed to create Linear issue: {res.status}: {res.body}');
Copy link
Contributor

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.

Copy link
Contributor

Size Change: +243 B (0%)

Total Size: 13.2 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 13.2 MB +243 B (0%)

compressed-size-action

@MichaelKutsch-ph MichaelKutsch-ph merged commit 9587f83 into master Apr 11, 2025
112 of 113 checks passed
@MichaelKutsch-ph MichaelKutsch-ph deleted the err-dn/linear-integration branch April 11, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants