@@ -1336,6 +1336,32 @@ function parseJson (txt, reviver, context) {
13361336}
13371337
13381338
1339+ /***/ } ) ,
1340+
1341+ /***/ 82 :
1342+ /***/ ( function ( __unusedmodule , exports ) {
1343+
1344+ "use strict" ;
1345+
1346+ // We use any as a valid input type
1347+ /* eslint-disable @typescript-eslint/no-explicit-any */
1348+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1349+ /**
1350+ * Sanitizes an input into a string so it can be passed into issueCommand safely
1351+ * @param input input to sanitize into a string
1352+ */
1353+ function toCommandValue ( input ) {
1354+ if ( input === null || input === undefined ) {
1355+ return '' ;
1356+ }
1357+ else if ( typeof input === 'string' || input instanceof String ) {
1358+ return input ;
1359+ }
1360+ return JSON . stringify ( input ) ;
1361+ }
1362+ exports . toCommandValue = toCommandValue ;
1363+ //# sourceMappingURL=utils.js.map
1364+
13391365/***/ } ) ,
13401366
13411367/***/ 87 :
@@ -1468,6 +1494,42 @@ function legacy (fs) {
14681494}
14691495
14701496
1497+ /***/ } ) ,
1498+
1499+ /***/ 102 :
1500+ /***/ ( function ( __unusedmodule , exports , __webpack_require__ ) {
1501+
1502+ "use strict" ;
1503+
1504+ // For internal use, subject to change.
1505+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
1506+ if ( mod && mod . __esModule ) return mod ;
1507+ var result = { } ;
1508+ if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
1509+ result [ "default" ] = mod ;
1510+ return result ;
1511+ } ;
1512+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1513+ // We use any as a valid input type
1514+ /* eslint-disable @typescript-eslint/no-explicit-any */
1515+ const fs = __importStar ( __webpack_require__ ( 747 ) ) ;
1516+ const os = __importStar ( __webpack_require__ ( 87 ) ) ;
1517+ const utils_1 = __webpack_require__ ( 82 ) ;
1518+ function issueCommand ( command , message ) {
1519+ const filePath = process . env [ `GITHUB_${ command } ` ] ;
1520+ if ( ! filePath ) {
1521+ throw new Error ( `Unable to find environment variable for file command ${ command } ` ) ;
1522+ }
1523+ if ( ! fs . existsSync ( filePath ) ) {
1524+ throw new Error ( `Missing file at path: ${ filePath } ` ) ;
1525+ }
1526+ fs . appendFileSync ( filePath , `${ utils_1 . toCommandValue ( message ) } ${ os . EOL } ` , {
1527+ encoding : 'utf8'
1528+ } ) ;
1529+ }
1530+ exports . issueCommand = issueCommand ;
1531+ //# sourceMappingURL=file-command.js.map
1532+
14711533/***/ } ) ,
14721534
14731535/***/ 104 :
@@ -1573,6 +1635,13 @@ const serializers = {
15731635 : `${ emoji } ${ capitalize ( item . payload . action ) } ` ;
15741636 return `${ line } PR ${ toUrlFormat ( item ) } in ${ toUrlFormat ( item . repo . name ) } ` ;
15751637 } ,
1638+ ReleaseEvent : ( item ) => {
1639+ return `🚀 ${ capitalize ( item . payload . action ) } release ${ toUrlFormat (
1640+ item . payload . release . name
1641+ ? item . payload . release . name
1642+ : item . payload . release . tag_name
1643+ ) } in ${ toUrlFormat ( item . repo . name ) } `;
1644+ } ,
15761645} ;
15771646
15781647Toolkit . run (
@@ -1615,7 +1684,9 @@ Toolkit.run(
16151684 ) ;
16161685
16171686 if ( ! content . length ) {
1618- tools . exit . failure ( "No PullRequest/Issue/IssueComment events found" ) ;
1687+ tools . exit . failure (
1688+ "No PullRequest/Issue/IssueComment/Release events found"
1689+ ) ;
16191690 }
16201691
16211692 if ( content . length < 5 ) {
@@ -5345,6 +5416,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
53455416} ;
53465417Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
53475418const os = __importStar ( __webpack_require__ ( 87 ) ) ;
5419+ const utils_1 = __webpack_require__ ( 82 ) ;
53485420/**
53495421 * Commands
53505422 *
@@ -5398,28 +5470,14 @@ class Command {
53985470 return cmdStr ;
53995471 }
54005472}
5401- /**
5402- * Sanitizes an input into a string so it can be passed into issueCommand safely
5403- * @param input input to sanitize into a string
5404- */
5405- function toCommandValue ( input ) {
5406- if ( input === null || input === undefined ) {
5407- return '' ;
5408- }
5409- else if ( typeof input === 'string' || input instanceof String ) {
5410- return input ;
5411- }
5412- return JSON . stringify ( input ) ;
5413- }
5414- exports . toCommandValue = toCommandValue ;
54155473function escapeData ( s ) {
5416- return toCommandValue ( s )
5474+ return utils_1 . toCommandValue ( s )
54175475 . replace ( / % / g, '%25' )
54185476 . replace ( / \r / g, '%0D' )
54195477 . replace ( / \n / g, '%0A' ) ;
54205478}
54215479function escapeProperty ( s ) {
5422- return toCommandValue ( s )
5480+ return utils_1 . toCommandValue ( s )
54235481 . replace ( / % / g, '%25' )
54245482 . replace ( / \r / g, '%0D' )
54255483 . replace ( / \n / g, '%0A' )
@@ -6173,6 +6231,12 @@ function convertBody(buffer, headers) {
61736231 // html4
61746232 if ( ! res && str ) {
61756233 res = / < m e t a [ \s ] + ?h t t p - e q u i v = ( [ ' " ] ) c o n t e n t - t y p e \1[ \s ] + ?c o n t e n t = ( [ ' " ] ) ( .+ ?) \2/ i. exec ( str ) ;
6234+ if ( ! res ) {
6235+ res = / < m e t a [ \s ] + ?c o n t e n t = ( [ ' " ] ) ( .+ ?) \1[ \s ] + ?h t t p - e q u i v = ( [ ' " ] ) c o n t e n t - t y p e \3/ i. exec ( str ) ;
6236+ if ( res ) {
6237+ res . pop ( ) ; // drop last quote
6238+ }
6239+ }
61766240
61776241 if ( res ) {
61786242 res = / c h a r s e t = ( .* ) / i. exec ( res . pop ( ) ) ;
@@ -7180,7 +7244,7 @@ function fetch(url, opts) {
71807244 // HTTP fetch step 5.5
71817245 switch ( request . redirect ) {
71827246 case 'error' :
7183- reject ( new FetchError ( `redirect mode is set to error: ${ request . url } ` , 'no-redirect' ) ) ;
7247+ reject ( new FetchError ( `uri requested responds with a redirect, redirect mode is set to error: ${ request . url } ` , 'no-redirect' ) ) ;
71847248 finalize ( ) ;
71857249 return ;
71867250 case 'manual' :
@@ -7219,7 +7283,8 @@ function fetch(url, opts) {
72197283 method : request . method ,
72207284 body : request . body ,
72217285 signal : request . signal ,
7222- timeout : request . timeout
7286+ timeout : request . timeout ,
7287+ size : request . size
72237288 } ;
72247289
72257290 // HTTP-redirect fetch step 9
@@ -7835,6 +7900,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
78357900} ;
78367901Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
78377902const command_1 = __webpack_require__ ( 431 ) ;
7903+ const file_command_1 = __webpack_require__ ( 102 ) ;
7904+ const utils_1 = __webpack_require__ ( 82 ) ;
78387905const os = __importStar ( __webpack_require__ ( 87 ) ) ;
78397906const path = __importStar ( __webpack_require__ ( 622 ) ) ;
78407907/**
@@ -7861,9 +7928,17 @@ var ExitCode;
78617928 */
78627929// eslint-disable-next-line @typescript-eslint/no-explicit-any
78637930function exportVariable ( name , val ) {
7864- const convertedVal = command_1 . toCommandValue ( val ) ;
7931+ const convertedVal = utils_1 . toCommandValue ( val ) ;
78657932 process . env [ name ] = convertedVal ;
7866- command_1 . issueCommand ( 'set-env' , { name } , convertedVal ) ;
7933+ const filePath = process . env [ 'GITHUB_ENV' ] || '' ;
7934+ if ( filePath ) {
7935+ const delimiter = '_GitHubActionsFileCommandDelimeter_' ;
7936+ const commandValue = `${ name } <<${ delimiter } ${ os . EOL } ${ convertedVal } ${ os . EOL } ${ delimiter } ` ;
7937+ file_command_1 . issueCommand ( 'ENV' , commandValue ) ;
7938+ }
7939+ else {
7940+ command_1 . issueCommand ( 'set-env' , { name } , convertedVal ) ;
7941+ }
78677942}
78687943exports . exportVariable = exportVariable ;
78697944/**
@@ -7879,7 +7954,13 @@ exports.setSecret = setSecret;
78797954 * @param inputPath
78807955 */
78817956function addPath ( inputPath ) {
7882- command_1 . issueCommand ( 'add-path' , { } , inputPath ) ;
7957+ const filePath = process . env [ 'GITHUB_PATH' ] || '' ;
7958+ if ( filePath ) {
7959+ file_command_1 . issueCommand ( 'PATH' , inputPath ) ;
7960+ }
7961+ else {
7962+ command_1 . issueCommand ( 'add-path' , { } , inputPath ) ;
7963+ }
78837964 process . env [ 'PATH' ] = `${ inputPath } ${ path . delimiter } ${ process . env [ 'PATH' ] } ` ;
78847965}
78857966exports . addPath = addPath ;
@@ -15325,7 +15406,7 @@ module.exports = options => {
1532515406/***/ 969 :
1532615407/***/ ( function ( module ) {
1532715408
15328- module . exports = { "_from" :"signale@^1.4.0" , "_id" :"signale@1.4.0" , "_inBundle" :false , "_integrity" :"sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==" , "_location" :"/signale" , "_phantomChildren" :{ } , "_requested" :{ "type" :"range" , "registry" :true , "raw" :"signale@^1.4.0" , "name" :"signale" , "escapedName" :"signale" , "rawSpec" :"^1.4.0" , "saveSpec" :null , "fetchSpec" :"^1.4.0" } , "_requiredBy" :[ "/actions-toolkit" ] , "_resolved" :"https://registry.npmjs.org/signale/-/signale-1.4.0.tgz" , "_shasum" :"c4be58302fb0262ac00fc3d886a7c113759042f1" , "_spec" :"signale@^1.4.0" , "_where" :"/Users/jamesgeorge007/CodeSpace/scripting/JavaScript/GitHub-Actions/github-activity-readme/node_modules/actions-toolkit" , "author" :{ "name" :"Klaus Sinani" , "email" :"klaussinani@gmail.com" , "url" :"https://klaussinani.github.io" } , "bugs" :{ "url" :"https://github.com/klaussinani/signale/issues" } , "bundleDependencies" :false , "dependencies" :{ "chalk" :"^2.3.2" , "figures" :"^2.0.0" , "pkg-conf" :"^2.1.0" } , "deprecated" :false , "description" :"👋 Hackable console logger" , "devDependencies" :{ "xo" :"*" } , "engines" :{ "node" :">=6" } , "files" :[ "index.js" , "signale.js" , "types.js" ] , "homepage" :"https://github.com/klaussinani/signale#readme" , "keywords" :[ "hackable" , "colorful" , "console" , "logger" ] , "license" :"MIT" , "maintainers" :[ { "name" :"Mario Sinani" , "email" :"mariosinani@protonmail.ch" , "url" :"https://mariocfhq.github.io" } ] , "name" :"signale" , "options" :{ "default" :{ "displayScope" :true , "displayBadge" :true , "displayDate" :false , "displayFilename" :false , "displayLabel" :true , "displayTimestamp" :false , "underlineLabel" :true , "underlineMessage" :false , "underlinePrefix" :false , "underlineSuffix" :false , "uppercaseLabel" :false } } , "repository" :{ "type" :"git" , "url" :"git+https://github.com/klaussinani/signale.git" } , "scripts" :{ "test" :"xo" } , "version" :"1.4.0" , "xo" :{ "space" :2 } } ;
15409+ module . exports = { "name" :"signale" , "version" :"1.4.0" , "description" :"👋 Hackable console logger" , "license" :"MIT" , "repository" :"klaussinani/signale" , "author" :{ "name" :"Klaus Sinani" , "email" :"klaussinani@gmail.com" , "url" :"https://klaussinani.github.io" } , "maintainers" :[ { "name" :"Mario Sinani" , "email" :"mariosinani@protonmail.ch" , "url" :"https://mariocfhq.github.io" } ] , "engines" :{ "node" :">=6" } , "files" :[ "index.js" , "signale.js" , "types.js" ] , "keywords" :[ "hackable" , "colorful" , "console" , "logger" ] , "scripts" :{ "test" :"xo" } , "dependencies" :{ "chalk" :"^2.3.2" , "figures" :"^2.0.0" , "pkg-conf" :"^2.1.0" } , "devDependencies" :{ "xo" :"*" } , "options" :{ "default" :{ "displayScope" :true , "displayBadge" :true , "displayDate" :false , "displayFilename" :false , "displayLabel" :true , "displayTimestamp" :false , "underlineLabel" :true , "underlineMessage" :false , "underlinePrefix" :false , "underlineSuffix" :false , "uppercaseLabel" :false } } , "xo" :{ "space" :2 } } ;
1532915410
1533015411/***/ } ) ,
1533115412
0 commit comments