File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,15 @@ import { getVersion2Client } from './getClient.js';
44
55export const createSoftwareProject = async ( ) => {
66 const client = getVersion2Client ( ) ;
7+ const currentUser = await client . myself . getCurrentUser ( ) ;
8+
9+ if ( ! currentUser . accountId ) throw new Error ( "Couldn't get the current user's account ID" , { cause : { currentUser } } ) ;
710
811 return client . projects
912 . createProject ( {
1013 key : Constants . testProjectKey ,
1114 name : Constants . testProjectName ,
12- leadAccountId : '5b6d7f20e6dba529eefdbad9' ,
15+ leadAccountId : currentUser . accountId ,
1316 projectTypeKey : 'software' ,
1417 } )
1518 . catch ( ( error : AxiosError ) => {
Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ export default defineConfig({
66 enabled : true ,
77 tsconfig : 'tsconfig.lint.json' ,
88 } ,
9+ setupFiles : [ 'dotenv/config' ] ,
910 } ,
1011} ) ;
You can’t perform that action at this time.
0 commit comments