@@ -10714,6 +10714,8 @@ __nccwpck_require__.r(__webpack_exports__);
10714
10714
var core = __nccwpck_require__ ( 2186 ) ;
10715
10715
// EXTERNAL MODULE: ./node_modules/@actions /github/lib/github.js
10716
10716
var github = __nccwpck_require__ ( 5438 ) ;
10717
+ // EXTERNAL MODULE: external "fs"
10718
+ var external_fs_ = __nccwpck_require__ ( 5747 ) ;
10717
10719
// EXTERNAL MODULE: ./node_modules/logfmt/logfmt.js
10718
10720
var logfmt = __nccwpck_require__ ( 5578 ) ;
10719
10721
// EXTERNAL MODULE: ./node_modules/string.prototype.matchall/index.js
@@ -10723,7 +10725,7 @@ var string_prototype_matchall_default = /*#__PURE__*/__nccwpck_require__.n(strin
10723
10725
10724
10726
10725
10727
const findCodeBlocks = ( source ) => {
10726
- const pat = / ( ^ ` ` ` \n ) ( .+ ?) ^ ` ` ` / gms;
10728
+ const pat = / ( ^ ` ` ` \r ? \ n) ( .+ ?) ^ ` ` ` / gms;
10727
10729
return Array . from ( string_prototype_matchall_default ( ) ( source , pat ) , ( m ) => [ m [ 2 ] , m . index + m [ 1 ] . length ] ) ;
10728
10730
} ;
10729
10731
const formatLogItem = ( time , level , msg , fields ) => {
@@ -10784,6 +10786,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
10784
10786
10785
10787
10786
10788
10789
+
10787
10790
( ( ) => __awaiter ( void 0 , void 0 , void 0 , function * ( ) {
10788
10791
const authToken = core . getInput ( 'repo-token' ) ;
10789
10792
const octokit = github . getOctokit ( authToken ) ;
@@ -10802,6 +10805,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
10802
10805
const issue = response . data ;
10803
10806
console . log ( `Issue title: ${ issue . title } ` ) ;
10804
10807
console . log ( `Issue body:\n${ issue . body } \n` ) ;
10808
+ external_fs_ . writeFileSync ( 'issue_body.txt' , issue . body ) ;
10805
10809
console . log ( `Patching issue body...` ) ;
10806
10810
const [ patchedBody , patchCount ] = patchCodeBlocks ( issue . body ) ;
10807
10811
if ( patchCount < 1 ) {
@@ -10822,7 +10826,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
10822
10826
if ( saveResponse . status != 200 ) {
10823
10827
core . setFailed ( `Failed to save issue data. Server responded with ${ response . status } ` ) ;
10824
10828
}
10825
- } ) ) ( ) . catch ( error => core . setFailed ( error . message ) ) ;
10829
+ } ) ) ( ) . catch ( error => core . setFailed ( ` ${ error } ` ) ) ;
10826
10830
10827
10831
} ) ( ) ;
10828
10832
0 commit comments