11"use strict" ;
22var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
33 if ( k2 === undefined ) k2 = k ;
4- Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
4+ var desc = Object . getOwnPropertyDescriptor ( m , k ) ;
5+ if ( ! desc || ( "get" in desc ? ! m . __esModule : desc . writable || desc . configurable ) ) {
6+ desc = { enumerable : true , get : function ( ) { return m [ k ] ; } } ;
7+ }
8+ Object . defineProperty ( o , k2 , desc ) ;
59} ) : ( function ( o , m , k , k2 ) {
610 if ( k2 === undefined ) k2 = k ;
711 o [ k2 ] = m [ k ] ;
@@ -28,18 +32,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
2832 } ) ;
2933} ;
3034Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
31- const core = __importStar ( require ( "@actions/core" ) ) ;
35+ const core_1 = require ( "@actions/core" ) ;
3236const github = __importStar ( require ( "@actions/github" ) ) ;
3337function run ( ) {
3438 return __awaiter ( this , void 0 , void 0 , function * ( ) {
3539 try {
36- const issueLabels = core . getInput ( 'issue-labels' ) ;
37- const prLabels = core . getInput ( 'pr-labels' ) ;
40+ const issueLabels = ( 0 , core_1 . getInput ) ( 'issue-labels' ) ;
41+ const prLabels = ( 0 , core_1 . getInput ) ( 'pr-labels' ) ;
3842 if ( ! issueLabels && ! prLabels ) {
3943 throw new Error ( 'Action must have at least one of issue-labels or pr-labels set' ) ;
4044 }
4145 // Get client and context
42- const client = new github . GitHub ( core . getInput ( 'github-token' , { required : true } ) ) ;
46+ const client = new github . GitHub ( ( 0 , core_1 . getInput ) ( 'github-token' , { required : true } ) ) ;
4347 const context = github . context ;
4448 if ( context . payload . action !== 'opened' ) {
4549 console . log ( 'No issue or PR was opened, skipping' ) ;
@@ -82,8 +86,10 @@ function run() {
8286 } ) ;
8387 }
8488 catch ( error ) {
85- core . setFailed ( error . message ) ;
86- return ;
89+ if ( error instanceof Error ) {
90+ ( 0 , core_1 . setFailed ) ( error ) ;
91+ return ;
92+ }
8793 }
8894 } ) ;
8995}
@@ -108,7 +114,7 @@ const isFirstIssue = (client, owner, repo, sender, curIssueNumber) => __awaiter(
108114 return true ;
109115} ) ;
110116// No way to filter pulls by creator
111- const isFirstPull = ( client , owner , repo , sender , curPullNumber , page = 1 ) => __awaiter ( void 0 , void 0 , void 0 , function * ( ) {
117+ const isFirstPull = ( client_1 , owner_1 , repo_1 , sender_1 , curPullNumber_1 , ... args_1 ) => __awaiter ( void 0 , [ client_1 , owner_1 , repo_1 , sender_1 , curPullNumber_1 , ... args_1 ] , void 0 , function * ( client , owner , repo , sender , curPullNumber , page = 1 ) {
112118 // Provide console output if we loop for a while.
113119 console . log ( 'Checking...' ) ;
114120 const { status, data : pulls } = yield client . pulls . list ( {
0 commit comments