File tree Expand file tree Collapse file tree
features/onboarding/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1473,15 +1473,18 @@ export class PostHogAPIClient {
14731473 }
14741474 }
14751475
1476- async getIntegrations ( ) {
1476+ async getIntegrations ( kind ?: string ) {
14771477 const teamId = await this . getTeamId ( ) ;
1478- return this . getIntegrationsForProject ( teamId ) ;
1478+ return this . getIntegrationsForProject ( teamId , kind ) ;
14791479 }
14801480
1481- async getIntegrationsForProject ( projectId : number ) {
1481+ async getIntegrationsForProject ( projectId : number , kind ?: string ) {
14821482 const url = new URL (
14831483 `${ this . api . baseUrl } /api/environments/${ projectId } /integrations/` ,
14841484 ) ;
1485+ if ( kind ) {
1486+ url . searchParams . set ( "kind" , kind ) ;
1487+ }
14851488 const response = await this . api . fetcher . fetch ( {
14861489 method : "get" ,
14871490 url,
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export function usePrefetchSignalData(): void {
3636 queryClient . prefetchQuery ( {
3737 queryKey : [ "integrations" , "list" ] ,
3838 queryFn : async ( ) => {
39- const integrations = await client . getIntegrations ( ) ;
39+ const integrations = await client . getIntegrations ( "github" ) ;
4040 const ghIntegration = (
4141 integrations as { id : number ; kind : string } [ ]
4242 ) . find ( ( i ) => i . kind === "github" ) ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export function useIntegrations() {
7171
7272 const query = useAuthenticatedQuery (
7373 integrationKeys . list ( ) ,
74- ( client ) => client . getIntegrations ( ) as Promise < Integration [ ] > ,
74+ ( client ) => client . getIntegrations ( "github" ) as Promise < Integration [ ] > ,
7575 ) ;
7676
7777 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments