File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -2065,7 +2065,14 @@ function run() {
20652065 } ) ;
20662066 // check if the test coverage is falling below delta/tolerance.
20672067 if ( diffChecker . checkIfTestCoverageFallsBelowDelta ( delta ) ) {
2068- throw Error ( `Current PR reduces the test percentage by ${ delta } ` ) ;
2068+ messageToPost = `Current PR reduces the test coverage percentage by ${ delta } for some tests` ;
2069+ yield githubClient . issues . createComment ( {
2070+ repo : repoName ,
2071+ owner : repoOwner ,
2072+ body : messageToPost ,
2073+ issue_number : prNumber
2074+ } ) ;
2075+ throw Error ( messageToPost ) ;
20692076 }
20702077 }
20712078 catch ( error ) {
Original file line number Diff line number Diff line change @@ -57,7 +57,14 @@ async function run(): Promise<void> {
5757
5858 // check if the test coverage is falling below delta/tolerance.
5959 if ( diffChecker . checkIfTestCoverageFallsBelowDelta ( delta ) ) {
60- throw Error ( `Current PR reduces the test percentage by ${ delta } ` )
60+ messageToPost = `Current PR reduces the test coverage percentage by ${ delta } for some tests`
61+ await githubClient . issues . createComment ( {
62+ repo : repoName ,
63+ owner : repoOwner ,
64+ body : messageToPost ,
65+ issue_number : prNumber
66+ } )
67+ throw Error ( messageToPost )
6168 }
6269 } catch ( error ) {
6370 core . setFailed ( error )
You can’t perform that action at this time.
0 commit comments