File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11import type { Finding } from "./types.d.js" ;
2+ import process from "node:process" ;
23import core from "@actions/core" ;
34import { Octokit } from '@octokit/core' ;
45import { toFindingsMap } from "./toFindingsMap.js"
@@ -31,7 +32,8 @@ export default async function () {
3132 closedIssueUrls . push ( response . data . html_url ) ;
3233 core . info ( `Closed issue: ${ response . data . title } (${ repoWithOwner } #${ response . data . number } )` ) ;
3334 } catch ( error ) {
34- core . error ( `Failed to close issue for finding: ${ error } ` ) ;
35+ core . setFailed ( `Failed to close issue for finding: ${ error } ` )
36+ process . exit ( 1 ) ;
3537 }
3638 }
3739 }
@@ -52,7 +54,8 @@ export default async function () {
5254 core . info ( `Created issue: ${ response . data . title } (${ repoWithOwner } #${ response . data . number } )` ) ;
5355 }
5456 } catch ( error ) {
55- core . error ( `Failed to open/reopen issue for finding: ${ error } ` ) ;
57+ core . setFailed ( `Failed to open/reopen issue for finding: ${ error } ` ) ;
58+ process . exit ( 1 ) ;
5659 }
5760 }
5861
Original file line number Diff line number Diff line change 1+ import process from "node:process" ;
12import core from "@actions/core" ;
23import { Octokit } from '@octokit/core' ;
34import { fixIssue } from "./fixIssue.js" ;
@@ -16,7 +17,8 @@ export default async function () {
1617 await fixIssue ( octokit , repoWithOwner , issueUrl ) ;
1718 core . info ( `Assigned ${ repoWithOwner } #${ issueUrl . split ( '/' ) . pop ( ) } to Copilot!` ) ;
1819 } catch ( error ) {
19- core . error ( `Failed to assign ${ repoWithOwner } #${ issueUrl . split ( '/' ) . pop ( ) } to Copilot: ${ error } ` ) ;
20+ core . setFailed ( `Failed to assign ${ repoWithOwner } #${ issueUrl . split ( '/' ) . pop ( ) } to Copilot: ${ error } ` ) ;
21+ process . exit ( 1 ) ;
2022 }
2123 }
2224 core . info ( "Finished 'fix' action" ) ;
You can’t perform that action at this time.
0 commit comments