@@ -173,14 +173,27 @@ exports.getStringAsArray = getStringAsArray;
173173
174174"use strict" ;
175175
176+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
177+ if ( k2 === undefined ) k2 = k ;
178+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
179+ } ) : ( function ( o , m , k , k2 ) {
180+ if ( k2 === undefined ) k2 = k ;
181+ o [ k2 ] = m [ k ] ;
182+ } ) ) ;
183+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
184+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
185+ } ) : function ( o , v ) {
186+ o [ "default" ] = v ;
187+ } ) ;
176188var __importStar = ( this && this . __importStar ) || function ( mod ) {
177189 if ( mod && mod . __esModule ) return mod ;
178190 var result = { } ;
179- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
180- result [ "default" ] = mod ;
191+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
192+ __setModuleDefault ( result , mod ) ;
181193 return result ;
182194} ;
183195Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
196+ exports . issue = exports . issueCommand = void 0 ;
184197const os = __importStar ( __nccwpck_require__ ( 87 ) ) ;
185198const utils_1 = __nccwpck_require__ ( 278 ) ;
186199/**
@@ -259,6 +272,25 @@ function escapeProperty(s) {
259272
260273"use strict" ;
261274
275+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
276+ if ( k2 === undefined ) k2 = k ;
277+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
278+ } ) : ( function ( o , m , k , k2 ) {
279+ if ( k2 === undefined ) k2 = k ;
280+ o [ k2 ] = m [ k ] ;
281+ } ) ) ;
282+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
283+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
284+ } ) : function ( o , v ) {
285+ o [ "default" ] = v ;
286+ } ) ;
287+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
288+ if ( mod && mod . __esModule ) return mod ;
289+ var result = { } ;
290+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
291+ __setModuleDefault ( result , mod ) ;
292+ return result ;
293+ } ;
262294var __awaiter = ( this && this . __awaiter ) || function ( thisArg , _arguments , P , generator ) {
263295 function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
264296 return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
@@ -268,14 +300,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
268300 step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
269301 } ) ;
270302} ;
271- var __importStar = ( this && this . __importStar ) || function ( mod ) {
272- if ( mod && mod . __esModule ) return mod ;
273- var result = { } ;
274- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
275- result [ "default" ] = mod ;
276- return result ;
277- } ;
278303Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
304+ exports . getState = exports . saveState = exports . group = exports . endGroup = exports . startGroup = exports . info = exports . warning = exports . error = exports . debug = exports . isDebug = exports . setFailed = exports . setCommandEcho = exports . setOutput = exports . getBooleanInput = exports . getInput = exports . addPath = exports . setSecret = exports . exportVariable = exports . ExitCode = void 0 ;
279305const command_1 = __nccwpck_require__ ( 351 ) ;
280306const file_command_1 = __nccwpck_require__ ( 717 ) ;
281307const utils_1 = __nccwpck_require__ ( 278 ) ;
@@ -342,7 +368,9 @@ function addPath(inputPath) {
342368}
343369exports . addPath = addPath ;
344370/**
345- * Gets the value of an input. The value is also trimmed.
371+ * Gets the value of an input.
372+ * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
373+ * Returns an empty string if the value is not defined.
346374 *
347375 * @param name name of the input to get
348376 * @param options optional. See InputOptions.
@@ -353,9 +381,34 @@ function getInput(name, options) {
353381 if ( options && options . required && ! val ) {
354382 throw new Error ( `Input required and not supplied: ${ name } ` ) ;
355383 }
384+ if ( options && options . trimWhitespace === false ) {
385+ return val ;
386+ }
356387 return val . trim ( ) ;
357388}
358389exports . getInput = getInput ;
390+ /**
391+ * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
392+ * Support boolean input list: `true | True | TRUE | false | False | FALSE` .
393+ * The return value is also in boolean type.
394+ * ref: https://yaml.org/spec/1.2/spec.html#id2804923
395+ *
396+ * @param name name of the input to get
397+ * @param options optional. See InputOptions.
398+ * @returns boolean
399+ */
400+ function getBooleanInput ( name , options ) {
401+ const trueValue = [ 'true' , 'True' , 'TRUE' ] ;
402+ const falseValue = [ 'false' , 'False' , 'FALSE' ] ;
403+ const val = getInput ( name , options ) ;
404+ if ( trueValue . includes ( val ) )
405+ return true ;
406+ if ( falseValue . includes ( val ) )
407+ return false ;
408+ throw new TypeError ( `Input does not meet YAML 1.2 "Core Schema" specification: ${ name } \n` +
409+ `Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` ) ;
410+ }
411+ exports . getBooleanInput = getBooleanInput ;
359412/**
360413 * Sets the value of an output.
361414 *
@@ -506,14 +559,27 @@ exports.getState = getState;
506559"use strict" ;
507560
508561// For internal use, subject to change.
562+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
563+ if ( k2 === undefined ) k2 = k ;
564+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
565+ } ) : ( function ( o , m , k , k2 ) {
566+ if ( k2 === undefined ) k2 = k ;
567+ o [ k2 ] = m [ k ] ;
568+ } ) ) ;
569+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
570+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
571+ } ) : function ( o , v ) {
572+ o [ "default" ] = v ;
573+ } ) ;
509574var __importStar = ( this && this . __importStar ) || function ( mod ) {
510575 if ( mod && mod . __esModule ) return mod ;
511576 var result = { } ;
512- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
513- result [ "default" ] = mod ;
577+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
578+ __setModuleDefault ( result , mod ) ;
514579 return result ;
515580} ;
516581Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
582+ exports . issueCommand = void 0 ;
517583// We use any as a valid input type
518584/* eslint-disable @typescript-eslint/no-explicit-any */
519585const fs = __importStar ( __nccwpck_require__ ( 747 ) ) ;
@@ -544,6 +610,7 @@ exports.issueCommand = issueCommand;
544610// We use any as a valid input type
545611/* eslint-disable @typescript-eslint/no-explicit-any */
546612Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
613+ exports . toCommandValue = void 0 ;
547614/**
548615 * Sanitizes an input into a string so it can be passed into issueCommand safely
549616 * @param input input to sanitize into a string
@@ -576,6 +643,7 @@ class Context {
576643 * Hydrate the context from the environment
577644 */
578645 constructor ( ) {
646+ var _a , _b , _c ;
579647 this . payload = { } ;
580648 if ( process . env . GITHUB_EVENT_PATH ) {
581649 if ( fs_1 . existsSync ( process . env . GITHUB_EVENT_PATH ) ) {
@@ -595,6 +663,9 @@ class Context {
595663 this . job = process . env . GITHUB_JOB ;
596664 this . runNumber = parseInt ( process . env . GITHUB_RUN_NUMBER , 10 ) ;
597665 this . runId = parseInt ( process . env . GITHUB_RUN_ID , 10 ) ;
666+ this . apiUrl = ( _a = process . env . GITHUB_API_URL ) !== null && _a !== void 0 ? _a : `https://api.github.com` ;
667+ this . serverUrl = ( _b = process . env . GITHUB_SERVER_URL ) !== null && _b !== void 0 ? _b : `https://github.com` ;
668+ this . graphqlUrl = ( _c = process . env . GITHUB_GRAPHQL_URL ) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql` ;
598669 }
599670 get issue ( ) {
600671 const payload = this . payload ;
@@ -639,7 +710,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
639710var __importStar = ( this && this . __importStar ) || function ( mod ) {
640711 if ( mod && mod . __esModule ) return mod ;
641712 var result = { } ;
642- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
713+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
643714 __setModuleDefault ( result , mod ) ;
644715 return result ;
645716} ;
@@ -682,7 +753,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
682753var __importStar = ( this && this . __importStar ) || function ( mod ) {
683754 if ( mod && mod . __esModule ) return mod ;
684755 var result = { } ;
685- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
756+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
686757 __setModuleDefault ( result , mod ) ;
687758 return result ;
688759} ;
@@ -732,7 +803,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
732803var __importStar = ( this && this . __importStar ) || function ( mod ) {
733804 if ( mod && mod . __esModule ) return mod ;
734805 var result = { } ;
735- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
806+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
736807 __setModuleDefault ( result , mod ) ;
737808 return result ;
738809} ;
@@ -2032,7 +2103,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
20322103var request = __nccwpck_require__ ( 234 ) ;
20332104var universalUserAgent = __nccwpck_require__ ( 429 ) ;
20342105
2035- const VERSION = "4.6.1 " ;
2106+ const VERSION = "4.6.2 " ;
20362107
20372108class GraphqlError extends Error {
20382109 constructor ( request , response ) {
@@ -2305,29 +2376,18 @@ exports.paginatingEndpoints = paginatingEndpoints;
23052376
23062377Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
23072378
2308- function _defineProperty ( obj , key , value ) {
2309- if ( key in obj ) {
2310- Object . defineProperty ( obj , key , {
2311- value : value ,
2312- enumerable : true ,
2313- configurable : true ,
2314- writable : true
2315- } ) ;
2316- } else {
2317- obj [ key ] = value ;
2318- }
2319-
2320- return obj ;
2321- }
2322-
23232379function ownKeys ( object , enumerableOnly ) {
23242380 var keys = Object . keys ( object ) ;
23252381
23262382 if ( Object . getOwnPropertySymbols ) {
23272383 var symbols = Object . getOwnPropertySymbols ( object ) ;
2328- if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) {
2329- return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ;
2330- } ) ;
2384+
2385+ if ( enumerableOnly ) {
2386+ symbols = symbols . filter ( function ( sym ) {
2387+ return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ;
2388+ } ) ;
2389+ }
2390+
23312391 keys . push . apply ( keys , symbols ) ;
23322392 }
23332393
@@ -2354,9 +2414,25 @@ function _objectSpread2(target) {
23542414 return target ;
23552415}
23562416
2417+ function _defineProperty ( obj , key , value ) {
2418+ if ( key in obj ) {
2419+ Object . defineProperty ( obj , key , {
2420+ value : value ,
2421+ enumerable : true ,
2422+ configurable : true ,
2423+ writable : true
2424+ } ) ;
2425+ } else {
2426+ obj [ key ] = value ;
2427+ }
2428+
2429+ return obj ;
2430+ }
2431+
23572432const Endpoints = {
23582433 actions : {
23592434 addSelectedRepoToOrgSecret : [ "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" ] ,
2435+ approveWorkflowRun : [ "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" ] ,
23602436 cancelWorkflowRun : [ "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" ] ,
23612437 createOrUpdateEnvironmentSecret : [ "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" ] ,
23622438 createOrUpdateOrgSecret : [ "PUT /orgs/{org}/actions/secrets/{secret_name}" ] ,
@@ -2470,6 +2546,11 @@ const Endpoints = {
24702546 previews : [ "corsair" ]
24712547 }
24722548 } ] ,
2549+ createContentAttachmentForRepo : [ "POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments" , {
2550+ mediaType : {
2551+ previews : [ "corsair" ]
2552+ }
2553+ } ] ,
24732554 createFromManifest : [ "POST /app-manifests/{code}/conversions" ] ,
24742555 createInstallationAccessToken : [ "POST /app/installations/{installation_id}/access_tokens" ] ,
24752556 deleteAuthorization : [ "DELETE /applications/{client_id}/grant" ] ,
@@ -2532,8 +2613,11 @@ const Endpoints = {
25322613 } ] ,
25332614 getAnalysis : [ "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" ] ,
25342615 getSarif : [ "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}" ] ,
2616+ listAlertInstances : [ "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" ] ,
25352617 listAlertsForRepo : [ "GET /repos/{owner}/{repo}/code-scanning/alerts" ] ,
2536- listAlertsInstances : [ "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" ] ,
2618+ listAlertsInstances : [ "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" , { } , {
2619+ renamed : [ "codeScanning" , "listAlertInstances" ]
2620+ } ] ,
25372621 listRecentAnalyses : [ "GET /repos/{owner}/{repo}/code-scanning/analyses" ] ,
25382622 updateAlert : [ "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" ] ,
25392623 uploadSarif : [ "POST /repos/{owner}/{repo}/code-scanning/sarifs" ]
@@ -3015,6 +3099,11 @@ const Endpoints = {
30153099 previews : [ "squirrel-girl" ]
30163100 }
30173101 } ] ,
3102+ createForRelease : [ "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" , {
3103+ mediaType : {
3104+ previews : [ "squirrel-girl" ]
3105+ }
3106+ } ] ,
30183107 createForTeamDiscussionCommentInOrg : [ "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" , {
30193108 mediaType : {
30203109 previews : [ "squirrel-girl" ]
@@ -3060,7 +3149,7 @@ const Endpoints = {
30603149 previews : [ "squirrel-girl" ]
30613150 }
30623151 } , {
3063- deprecated : "octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/rest/reference/reactions/#delete-a-reaction-legacy"
3152+ deprecated : "octokit.rest. reactions.deleteLegacy() is deprecated, see https://docs.github.com/rest/reference/reactions/#delete-a-reaction-legacy"
30643153 } ] ,
30653154 listForCommitComment : [ "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" , {
30663155 mediaType : {
@@ -3115,6 +3204,7 @@ const Endpoints = {
31153204 }
31163205 } ] ,
31173206 compareCommits : [ "GET /repos/{owner}/{repo}/compare/{base}...{head}" ] ,
3207+ compareCommitsWithBasehead : [ "GET /repos/{owner}/{repo}/compare/{basehead}" ] ,
31183208 createCommitComment : [ "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" ] ,
31193209 createCommitSignatureProtection : [ "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" , {
31203210 mediaType : {
@@ -3127,7 +3217,7 @@ const Endpoints = {
31273217 createDeploymentStatus : [ "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" ] ,
31283218 createDispatchEvent : [ "POST /repos/{owner}/{repo}/dispatches" ] ,
31293219 createForAuthenticatedUser : [ "POST /user/repos" ] ,
3130- createFork : [ "POST /repos/{owner}/{repo}/forks{?org,organization} " ] ,
3220+ createFork : [ "POST /repos/{owner}/{repo}/forks" ] ,
31313221 createInOrg : [ "POST /orgs/{org}/repos" ] ,
31323222 createOrUpdateEnvironment : [ "PUT /repos/{owner}/{repo}/environments/{environment_name}" ] ,
31333223 createOrUpdateFileContents : [ "PUT /repos/{owner}/{repo}/contents/{path}" ] ,
@@ -3229,6 +3319,7 @@ const Endpoints = {
32293319 getLatestRelease : [ "GET /repos/{owner}/{repo}/releases/latest" ] ,
32303320 getPages : [ "GET /repos/{owner}/{repo}/pages" ] ,
32313321 getPagesBuild : [ "GET /repos/{owner}/{repo}/pages/builds/{build_id}" ] ,
3322+ getPagesHealthCheck : [ "GET /repos/{owner}/{repo}/pages/health" ] ,
32323323 getParticipationStats : [ "GET /repos/{owner}/{repo}/stats/participation" ] ,
32333324 getPullRequestReviewProtection : [ "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" ] ,
32343325 getPunchCardStats : [ "GET /repos/{owner}/{repo}/stats/punch_card" ] ,
@@ -3437,7 +3528,7 @@ const Endpoints = {
34373528 }
34383529} ;
34393530
3440- const VERSION = "4.15 .0" ;
3531+ const VERSION = "5.3 .0" ;
34413532
34423533function endpointsToMethods ( octokit , endpointsMap ) {
34433534 const newMethods = { } ;
@@ -3521,13 +3612,21 @@ function decorate(octokit, scope, methodName, defaults, decorations) {
35213612}
35223613
35233614function restEndpointMethods ( octokit ) {
3615+ const api = endpointsToMethods ( octokit , Endpoints ) ;
3616+ return {
3617+ rest : api
3618+ } ;
3619+ }
3620+ restEndpointMethods . VERSION = VERSION ;
3621+ function legacyRestEndpointMethods ( octokit ) {
35243622 const api = endpointsToMethods ( octokit , Endpoints ) ;
35253623 return _objectSpread2 ( _objectSpread2 ( { } , api ) , { } , {
35263624 rest : api
35273625 } ) ;
35283626}
3529- restEndpointMethods . VERSION = VERSION ;
3627+ legacyRestEndpointMethods . VERSION = VERSION ;
35303628
3629+ exports . legacyRestEndpointMethods = legacyRestEndpointMethods ;
35313630exports . restEndpointMethods = restEndpointMethods ;
35323631//# sourceMappingURL=index.js.map
35333632
0 commit comments