File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -151,18 +151,22 @@ export default async function githubAppRoutes(fastify: FastifyInstance) {
151151 try {
152152 // Get user's installation ID
153153 const installationId = await getUserInstallationId ( req . userId , db ) ;
154+ console . log ( 'getUserInstallationId result:' , { userId : req . userId , installationId } ) ;
154155
155156 if ( ! installationId ) {
156157 return reply . status ( 404 ) . send ( { error : 'No GitHub App installation found' } ) ;
157158 }
158159
159160 // Get Octokit for this installation
161+ console . log ( 'Getting octokit for installation:' , installationId ) ;
160162 const octokit = await getInstallationOctokit ( installationId ) ;
161163
162164 // List repositories accessible to this installation
165+ console . log ( 'Fetching repos from GitHub API...' ) ;
163166 const { data } = await octokit . rest . apps . listReposAccessibleToInstallation ( {
164167 per_page : 100 ,
165168 } ) ;
169+ console . log ( 'GitHub API returned:' , { total_count : data . total_count , repos_count : data . repositories ?. length } ) ;
166170
167171 // If available=true, filter out already connected repos
168172 let repos = data . repositories . map ( ( repo : any ) => ( {
You can’t perform that action at this time.
0 commit comments