11/******/ ( ( ) => { // webpackBootstrap
22/******/ var __webpack_modules__ = ( {
33
4- /***/ 264 :
4+ /***/ 473 :
55/***/ ( function ( __unused_webpack_module , exports , __nccwpck_require__ ) {
66
77"use strict" ;
@@ -28,7 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
2828Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
2929exports . issue = exports . issueCommand = void 0 ;
3030const os = __importStar ( __nccwpck_require__ ( 37 ) ) ;
31- const utils_1 = __nccwpck_require__ ( 814 ) ;
31+ const utils_1 = __nccwpck_require__ ( 767 ) ;
3232/**
3333 * Commands
3434 *
@@ -100,7 +100,7 @@ function escapeProperty(s) {
100100
101101/***/ } ) ,
102102
103- /***/ 909 :
103+ /***/ 406 :
104104/***/ ( function ( __unused_webpack_module , exports , __nccwpck_require__ ) {
105105
106106"use strict" ;
@@ -135,12 +135,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
135135} ;
136136Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
137137exports . getIDToken = exports . getState = exports . saveState = exports . group = exports . endGroup = exports . startGroup = exports . info = exports . notice = exports . warning = exports . error = exports . debug = exports . isDebug = exports . setFailed = exports . setCommandEcho = exports . setOutput = exports . getBooleanInput = exports . getMultilineInput = exports . getInput = exports . addPath = exports . setSecret = exports . exportVariable = exports . ExitCode = void 0 ;
138- const command_1 = __nccwpck_require__ ( 264 ) ;
139- const file_command_1 = __nccwpck_require__ ( 694 ) ;
140- const utils_1 = __nccwpck_require__ ( 814 ) ;
138+ const command_1 = __nccwpck_require__ ( 473 ) ;
139+ const file_command_1 = __nccwpck_require__ ( 230 ) ;
140+ const utils_1 = __nccwpck_require__ ( 767 ) ;
141141const os = __importStar ( __nccwpck_require__ ( 37 ) ) ;
142142const path = __importStar ( __nccwpck_require__ ( 17 ) ) ;
143- const oidc_utils_1 = __nccwpck_require__ ( 786 ) ;
143+ const oidc_utils_1 = __nccwpck_require__ ( 149 ) ;
144144/**
145145 * The code to exit an action
146146 */
@@ -419,7 +419,7 @@ exports.getIDToken = getIDToken;
419419
420420/***/ } ) ,
421421
422- /***/ 694 :
422+ /***/ 230 :
423423/***/ ( function ( __unused_webpack_module , exports , __nccwpck_require__ ) {
424424
425425"use strict" ;
@@ -450,7 +450,7 @@ exports.issueCommand = void 0;
450450/* eslint-disable @typescript-eslint/no-explicit-any */
451451const fs = __importStar ( __nccwpck_require__ ( 147 ) ) ;
452452const os = __importStar ( __nccwpck_require__ ( 37 ) ) ;
453- const utils_1 = __nccwpck_require__ ( 814 ) ;
453+ const utils_1 = __nccwpck_require__ ( 767 ) ;
454454function issueCommand ( command , message ) {
455455 const filePath = process . env [ `GITHUB_${ command } ` ] ;
456456 if ( ! filePath ) {
@@ -468,7 +468,7 @@ exports.issueCommand = issueCommand;
468468
469469/***/ } ) ,
470470
471- /***/ 786 :
471+ /***/ 149 :
472472/***/ ( function ( __unused_webpack_module , exports , __nccwpck_require__ ) {
473473
474474"use strict" ;
@@ -484,9 +484,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
484484} ;
485485Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
486486exports . OidcClient = void 0 ;
487- const http_client_1 = __nccwpck_require__ ( 316 ) ;
488- const auth_1 = __nccwpck_require__ ( 25 ) ;
489- const core_1 = __nccwpck_require__ ( 909 ) ;
487+ const http_client_1 = __nccwpck_require__ ( 277 ) ;
488+ const auth_1 = __nccwpck_require__ ( 689 ) ;
489+ const core_1 = __nccwpck_require__ ( 406 ) ;
490490class OidcClient {
491491 static createHttpClient ( allowRetry = true , maxRetry = 10 ) {
492492 const requestOptions = {
@@ -552,7 +552,7 @@ exports.OidcClient = OidcClient;
552552
553553/***/ } ) ,
554554
555- /***/ 814 :
555+ /***/ 767 :
556556/***/ ( ( __unused_webpack_module , exports ) => {
557557
558558"use strict" ;
@@ -599,7 +599,7 @@ exports.toCommandProperties = toCommandProperties;
599599
600600/***/ } ) ,
601601
602- /***/ 25 :
602+ /***/ 689 :
603603/***/ ( ( __unused_webpack_module , exports ) => {
604604
605605"use strict" ;
@@ -665,15 +665,15 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand
665665
666666/***/ } ) ,
667667
668- /***/ 316 :
668+ /***/ 277 :
669669/***/ ( ( __unused_webpack_module , exports , __nccwpck_require__ ) => {
670670
671671"use strict" ;
672672
673673Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
674674const http = __nccwpck_require__ ( 685 ) ;
675675const https = __nccwpck_require__ ( 687 ) ;
676- const pm = __nccwpck_require__ ( 808 ) ;
676+ const pm = __nccwpck_require__ ( 359 ) ;
677677let tunnel ;
678678var HttpCodes ;
679679( function ( HttpCodes ) {
@@ -1092,7 +1092,7 @@ class HttpClient {
10921092 if ( useProxy ) {
10931093 // If using proxy, need tunnel
10941094 if ( ! tunnel ) {
1095- tunnel = __nccwpck_require__ ( 707 ) ;
1095+ tunnel = __nccwpck_require__ ( 0 ) ;
10961096 }
10971097 const agentOptions = {
10981098 maxSockets : maxSockets ,
@@ -1210,7 +1210,7 @@ exports.HttpClient = HttpClient;
12101210
12111211/***/ } ) ,
12121212
1213- /***/ 808 :
1213+ /***/ 359 :
12141214/***/ ( ( __unused_webpack_module , exports ) => {
12151215
12161216"use strict" ;
@@ -1275,21 +1275,21 @@ exports.checkBypass = checkBypass;
12751275
12761276/***/ } ) ,
12771277
1278- /***/ 707 :
1278+ /***/ 0 :
12791279/***/ ( ( module , __unused_webpack_exports , __nccwpck_require__ ) => {
12801280
1281- module . exports = __nccwpck_require__ ( 154 ) ;
1281+ module . exports = __nccwpck_require__ ( 531 ) ;
12821282
12831283
12841284/***/ } ) ,
12851285
1286- /***/ 154 :
1286+ /***/ 531 :
12871287/***/ ( ( __unused_webpack_module , exports , __nccwpck_require__ ) => {
12881288
12891289"use strict" ;
12901290
12911291
1292- var net = __nccwpck_require__ ( 982 ) ;
1292+ var net = __nccwpck_require__ ( 808 ) ;
12931293var tls = __nccwpck_require__ ( 404 ) ;
12941294var http = __nccwpck_require__ ( 685 ) ;
12951295var https = __nccwpck_require__ ( 687 ) ;
@@ -1553,6 +1553,66 @@ if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
15531553exports . debug = debug ; // for test
15541554
15551555
1556+ /***/ } ) ,
1557+
1558+ /***/ 679 :
1559+ /***/ ( ( module ) => {
1560+
1561+ const messages = {
1562+ stale : {
1563+ found : "*_Issues were marked as stale_*" ,
1564+ empty : "No issues were marked as stale"
1565+ } ,
1566+ closed : {
1567+ found : "*_Issues were closed_*" ,
1568+ empty : "There are none! Great job!"
1569+ }
1570+ }
1571+
1572+ /**
1573+ * Format a list of issues to Slack's block kit
1574+ * @see https://api.slack.com/tools/block-kit-builder
1575+ * @param queue
1576+ * @param type - Which type of issue. stale | closed
1577+ */
1578+ const slackMessage = ( queue , type ) => {
1579+ const report = [ ]
1580+
1581+ report . push ( {
1582+ type : "divider" ,
1583+ } )
1584+
1585+ report . push ( {
1586+ type : "section" ,
1587+ text : {
1588+ type : "mrkdwn" ,
1589+ text : `[${ queue . length } ] ${ messages [ type ] . found } ` ,
1590+ } ,
1591+ } )
1592+
1593+ let text = ``
1594+
1595+ queue . map ( ( issue , i ) => {
1596+ text += `${ i + 1 + `. ` } <${ issue . url } |${ issue . title } >\n`
1597+ } )
1598+
1599+ if ( text === `` ) {
1600+ text = messages [ type ] . empty
1601+ }
1602+
1603+ report . push ( {
1604+ type : "section" ,
1605+ text : {
1606+ type : "mrkdwn" ,
1607+ text,
1608+ } ,
1609+ } )
1610+
1611+ return report
1612+ }
1613+
1614+ module . exports = slackMessage
1615+
15561616/***/ } ) ,
15571617
15581618/***/ 491 :
@@ -1595,7 +1655,7 @@ module.exports = require("https");
15951655
15961656/***/ } ) ,
15971657
1598- /***/ 982 :
1658+ /***/ 808 :
15991659/***/ ( ( module ) => {
16001660
16011661"use strict" ;
@@ -1676,11 +1736,17 @@ module.exports = require("util");
16761736var __webpack_exports__ = { } ;
16771737// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
16781738( ( ) => {
1679- const core = __nccwpck_require__ ( 909 )
1680- const slackMessage = "./slack-message"
1739+ const core = __nccwpck_require__ ( 406 )
1740+ const slackMessage = __nccwpck_require__ ( 679 )
16811741
16821742function formatIssues ( issues ) {
1683- return issues . map ( entry => ( {
1743+ const parsedIssues = JSON . parse ( issues )
1744+
1745+ if ( parsedIssues . length === 0 ) {
1746+ return [ ]
1747+ }
1748+
1749+ return parsedIssues . map ( entry => ( {
16841750 title : entry . title ,
16851751 url : `https://github.com/gatsbyjs/gatsby/issues/${ entry . number } `
16861752 } ) )
0 commit comments