mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 06:47:09 +01:00
fix: skip the webhook for non-scheduled, successful runs
This commit is contained in:
parent
41e145556f
commit
f991aceda2
2 changed files with 8 additions and 2 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -174,6 +174,7 @@ class TestReporter {
|
|||
this.onlySummary = core.getInput('only-summary', { required: false }) === 'true';
|
||||
this.token = core.getInput('token', { required: true });
|
||||
this.slackWebhook = core.getInput('slack-url', { required: false });
|
||||
this.githubEvent = core.getInput('github-event', { required: false });
|
||||
this.resultsEndpoint = core.getInput('test-results-endpoint', { required: false });
|
||||
this.resultsEndpointSecret = core.getInput('test-results-endpoint-secret', { required: false });
|
||||
this.context = (0, github_utils_1.getCheckRunContext)();
|
||||
|
|
@ -408,7 +409,9 @@ class TestReporter {
|
|||
});
|
||||
}
|
||||
});
|
||||
yield webhook.send(req);
|
||||
if (this.githubEvent === 'schedule' || failed > 0) {
|
||||
yield webhook.send(req);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue