@@ -8,7 +8,7 @@ import { fetchProject, fetchProjectBranches, fetchProjects, searchUserProjects }
8
8
import { configBlock } from './components' ;
9
9
import { uninstallWebhook } from './provider' ;
10
10
import { triggerExport , updateCommitWithPreviewLinks } from './sync' ;
11
- import type { GitLabRuntimeContext } from './types' ;
11
+ import type { GitLabRuntimeContext , GitLabSpaceConfiguration } from './types' ;
12
12
import { getSpaceConfigOrThrow , assertIsDefined , verifySignature } from './utils' ;
13
13
import { handleMergeRequestEvent , handlePushEvent } from './webhooks' ;
14
14
@@ -135,7 +135,7 @@ const handleFetchEvent: FetchEventCallback<GitLabRuntimeContext> = async (reques
135
135
const page = pageNumber || 1 ;
136
136
const projects = await fetchProjects ( spaceConfig , {
137
137
page,
138
- per_page : 1 ,
138
+ per_page : 100 ,
139
139
walkPagination : false ,
140
140
} ) ;
141
141
@@ -306,13 +306,13 @@ const handleSpaceInstallationDeleted: EventCallback<
306
306
> = async ( event , context ) => {
307
307
logger . debug ( `space installation deleted for space ${ event . spaceId } , removing webhook` ) ;
308
308
309
- const spaceInstallation = context . environment . spaceInstallation ;
310
- if ( ! spaceInstallation ) {
311
- logger . debug ( `missing space installation, skipping` ) ;
309
+ const configuration = event . previous . configuration as GitLabSpaceConfiguration | undefined ;
310
+ if ( ! configuration ) {
311
+ logger . debug ( `missing space installation configuration , skipping` ) ;
312
312
return ;
313
313
}
314
314
315
- await uninstallWebhook ( spaceInstallation ) ;
315
+ await uninstallWebhook ( configuration ) ;
316
316
} ;
317
317
318
318
export default createIntegration ( {
0 commit comments