File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -2065,7 +2065,14 @@ function run() {
2065
2065
} ) ;
2066
2066
// check if the test coverage is falling below delta/tolerance.
2067
2067
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 ) ;
2069
2076
}
2070
2077
}
2071
2078
catch ( error ) {
Original file line number Diff line number Diff line change @@ -57,7 +57,14 @@ async function run(): Promise<void> {
57
57
58
58
// check if the test coverage is falling below delta/tolerance.
59
59
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 )
61
68
}
62
69
} catch ( error ) {
63
70
core . setFailed ( error )
You can’t perform that action at this time.
0 commit comments