@@ -103,15 +103,15 @@ export async function linkGitHubRepository(
103103 existingConns . push ( refreshedConn ) ;
104104 }
105105
106- let { remoteUri, connection } = await promptRepositoryUri ( projectId , location , existingConns ) ;
106+ let { remoteUri, connection } = await promptRepositoryUri ( projectId , existingConns ) ;
107107 while ( remoteUri === "" ) {
108108 await utils . openInBrowser ( "https://github.com/apps/google-cloud-build/installations/new" ) ;
109109 await promptOnce ( {
110110 type : "input" ,
111111 message :
112112 "Press ENTER once you have finished configuring your installation's access settings." ,
113113 } ) ;
114- const selection = await promptRepositoryUri ( projectId , location , existingConns ) ;
114+ const selection = await promptRepositoryUri ( projectId , existingConns ) ;
115115 remoteUri = selection . remoteUri ;
116116 connection = selection . connection ;
117117 }
@@ -130,12 +130,11 @@ export async function linkGitHubRepository(
130130
131131async function promptRepositoryUri (
132132 projectId : string ,
133- location : string ,
134133 connections : gcb . Connection [ ]
135134) : Promise < { remoteUri : string ; connection : gcb . Connection } > {
136135 const remoteUriToConnection : Record < string , gcb . Connection > = { } ;
137136 for ( const conn of connections ) {
138- const { id } = parseConnectionName ( conn . name ) ! ;
137+ const { location , id } = parseConnectionName ( conn . name ) ! ;
139138 const resp = await gcb . fetchLinkableRepositories ( projectId , location , id ) ;
140139 if ( resp . repositories && resp . repositories . length > 0 ) {
141140 for ( const repo of resp . repositories ) {
0 commit comments