@@ -150,7 +150,7 @@ export default class LinkIndex extends Command {
150150
151151 const settings = await readSettingsJson ( settingsFilePath ) ;
152152
153- if ( ! settings . email || ! settings . jwt || ! settings . orgId ) {
153+ if ( ! settings . email || ! settings . apiKey || ! settings . orgId ) {
154154 this . log ( chalk . red ( "Not logged in." ) + " Log in with `hyp login`." ) ;
155155 return ;
156156 }
@@ -169,15 +169,15 @@ export default class LinkIndex extends Command {
169169 }
170170
171171 // call hypermode getRepoId with the installationId and the git url, if it returns a repoId, continue, if not, throw an error
172- const repoId = await sendGetRepoIdReq ( settings . jwt , installationId , remoteUrl ) ;
172+ const repoId = await sendGetRepoIdReq ( settings . apiKey , installationId , remoteUrl ) ;
173173
174174 if ( ! repoId ) {
175175 throw new Error ( "No repoId found for the given installationId and gitUrl" ) ;
176176 }
177177
178178 // get list of the projects for the user in this org, if any have no repoId, ask if they want to link it, or give option of none.
179179 // If they pick an option, connect repo. If none, ask if they want to create a new project, prompt for name, and connect repoId to project
180- const projects = await getProjectsByOrgReq ( settings . jwt , settings . orgId ) ;
180+ const projects = await getProjectsByOrgReq ( settings . apiKey , settings . orgId ) ;
181181
182182 const projectsNoRepoId = projects . filter ( ( project ) => ! project . repoId ) ;
183183
@@ -188,18 +188,18 @@ export default class LinkIndex extends Command {
188188
189189 if ( confirmExistingProject ) {
190190 selectedProject = await promptProjectLinkSelection ( projectsNoRepoId ) ;
191- const completedProject = await sendMapRepoAndFinishProjectCreationReq ( settings . jwt , selectedProject . id , repoId , repoFullName ) ;
191+ const completedProject = await sendMapRepoAndFinishProjectCreationReq ( settings . apiKey , selectedProject . id , repoId , repoFullName ) ;
192192
193193 this . log ( chalk . green ( "Successfully linked project " + completedProject . name + " to repo " + repoName + "! 🎉" ) ) ;
194194 } else {
195195 const projectName = await promptProjectName ( projects ) ;
196- const newProject = await sendCreateProjectReq ( settings . jwt , settings . orgId , projectName , repoId , repoFullName ) ;
196+ const newProject = await sendCreateProjectReq ( settings . apiKey , settings . orgId , projectName , repoId , repoFullName ) ;
197197
198198 this . log ( chalk . green ( "Successfully created project " + newProject . name + " and linked it to repo " + repoName + "! 🎉" ) ) ;
199199 }
200200 } else {
201201 const projectName = await promptProjectName ( projects ) ;
202- const newProject = await sendCreateProjectReq ( settings . jwt , settings . orgId , projectName , repoId , repoFullName ) ;
202+ const newProject = await sendCreateProjectReq ( settings . apiKey , settings . orgId , projectName , repoId , repoFullName ) ;
203203
204204 this . log ( chalk . blueBright ( "Successfully created project " + newProject . name + " and linked it to repo " + repoFullName + "! Setting up CI workflow..." ) ) ;
205205 }
0 commit comments