@@ -14,17 +14,17 @@ const misc_1 = require("./misc");
1414// eslint-disable-next-line camelcase
1515const getRepoProject = ( projectName , logger , octokit , context ) => __awaiter ( void 0 , void 0 , void 0 , function * ( ) {
1616 var _a , _b ;
17- return ( ( _a = context . payload . repository ) === null || _a === void 0 ? void 0 : _a . has_projects ) ? ( _b = ( yield octokit . paginate ( octokit . projects . listForRepo , Object . assign ( Object . assign ( { } , context . repo ) , { state : 'open' } ) ) ) . find ( item => item . name === projectName ) ) === null || _b === void 0 ? void 0 : _b . id : undefined ;
17+ return ( ( _a = context . payload . repository ) === null || _a === void 0 ? void 0 : _a . has_projects ) ? ( _b = ( yield octokit . paginate ( octokit . rest . projects . listForRepo , Object . assign ( Object . assign ( { } , context . repo ) , { state : 'open' } ) ) ) . find ( item => item . name === projectName ) ) === null || _b === void 0 ? void 0 : _b . id : undefined ;
1818} ) ;
1919exports . getRepoProject = getRepoProject ;
2020const getOrgProject = ( projectName , logger , octokit , context ) => __awaiter ( void 0 , void 0 , void 0 , function * ( ) {
2121 var _c ;
22- return misc_1 . isActive ( 'ORG' ) && 'organization' in context . payload ? ( _c = ( yield octokit . paginate ( octokit . projects . listForOrg , { org : context . repo . owner , state : 'open' } ) ) . find ( item => item . name === projectName ) ) === null || _c === void 0 ? void 0 : _c . id : undefined ;
22+ return misc_1 . isActive ( 'ORG' ) && 'organization' in context . payload ? ( _c = ( yield octokit . paginate ( octokit . rest . projects . listForOrg , { org : context . repo . owner , state : 'open' } ) ) . find ( item => item . name === projectName ) ) === null || _c === void 0 ? void 0 : _c . id : undefined ;
2323} ) ;
2424exports . getOrgProject = getOrgProject ;
2525const getUserProject = ( projectName , logger , octokit , context ) => __awaiter ( void 0 , void 0 , void 0 , function * ( ) {
2626 var _d ;
27- return misc_1 . isActive ( 'USER' ) && ! ( 'organization' in context . payload ) ? ( _d = ( yield octokit . paginate ( octokit . projects . listForUser , { username : context . repo . owner , state : 'open' } ) ) . find ( item => item . name === projectName ) ) === null || _d === void 0 ? void 0 : _d . id : undefined ;
27+ return misc_1 . isActive ( 'USER' ) && ! ( 'organization' in context . payload ) ? ( _d = ( yield octokit . paginate ( octokit . rest . projects . listForUser , { username : context . repo . owner , state : 'open' } ) ) . find ( item => item . name === projectName ) ) === null || _d === void 0 ? void 0 : _d . id : undefined ;
2828} ) ;
2929exports . getUserProject = getUserProject ;
3030const getProjectIds = ( projectName , logger , octokit , context ) => __awaiter ( void 0 , void 0 , void 0 , function * ( ) {
0 commit comments