-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Linear integration / destination #30917
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
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 introduces a new Linear integration that enables fetching and displaying Linear teams, adds support for Linear’s OAuth via GraphQL, and updates both frontend and backend to integrate with PostHog's existing patterns.
- Added kea logic in /frontend/src/lib/integrations/linearIntegrationLogic.ts for loading Linear teams.
- Updated /frontend/src/lib/integrations/integrationsLogic.ts to map the new 'linear' kind and filter integrations.
- Introduced LinearTeamPicker in /frontend/src/lib/integrations/LinearIntegrationHelpers.tsx for team selection.
- Extended API support in /frontend/src/lib/api.ts to fetch Linear team data.
- Added Linear OAuth support and team fetching in backend endpoints and settings.
13 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
frontend/src/scenes/settings/environment/ErrorTrackingIntegrations.tsx
Outdated
Show resolved
Hide resolved
…g into err-dn/linear-integration
📸 UI snapshots have been updated16 snapshot changes in total. 0 added, 16 modified, 0 deleted:
Triggered by this commit. |
Size Change: +149 B (0%) Total Size: 13.2 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated16 snapshot changes in total. 0 added, 16 modified, 0 deleted:
Triggered by this commit. |
if oauth_config.token_info_graphql_query: | ||
token_info_res = requests.post( | ||
oauth_config.token_info_url, | ||
headers={"Authorization": f"Bearer {config['access_token']}"}, | ||
json={"query": oauth_config.token_info_graphql_query}, | ||
) |
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.
@PostHog/team-cdp this is probably the most interesting part for ya'll. Linear only has a GraphQL API so I had to change the request type slightly to exchange the token
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.
the hipsters api
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.
looks good - just need to document the oauth app
import { HogFunctionTemplate, SUB_TEMPLATE_COMMON } from '../../types' | ||
|
||
export const template: HogFunctionTemplate = { | ||
status: 'alpha', |
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.
Experimental destinations are hidden by default and can only be installed with the direct link. This should probably be beta
instead
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.
I actually made it alpha
because I wanted to test the bug I mentioned above about the Hog templating. I'm also working on a GitHub integration and some more native integrations with issues so will release them all together
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
Problem
Let customers send issues from PostHog to their issue tracking tool
Changes