File tree 2 files changed +5
-1
lines changed
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';
4
4
5
5
export const createSoftwareProject = async ( ) => {
6
6
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 } } ) ;
7
10
8
11
return client . projects
9
12
. createProject ( {
10
13
key : Constants . testProjectKey ,
11
14
name : Constants . testProjectName ,
12
- leadAccountId : '5b6d7f20e6dba529eefdbad9' ,
15
+ leadAccountId : currentUser . accountId ,
13
16
projectTypeKey : 'software' ,
14
17
} )
15
18
. catch ( ( error : AxiosError ) => {
Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ export default defineConfig({
6
6
enabled : true ,
7
7
tsconfig : 'tsconfig.lint.json' ,
8
8
} ,
9
+ setupFiles : [ 'dotenv/config' ] ,
9
10
} ,
10
11
} ) ;
You can’t perform that action at this time.
0 commit comments