Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onlyOnError option #51

Closed

Conversation

sergejmueller
Copy link

Trigger a notification only on error.

Sergej Müller and others added 2 commits December 9, 2018 14:55
Trigger a notification only on error.
@Turbo87
Copy link
Owner

Turbo87 commented Dec 10, 2018

This is not much different from the default behavior. Can you explain why you think that this should be included too?

inoyakaigor pushed a commit to inoyakaigor/webpack-notifier-2 that referenced this pull request Dec 10, 2019
inoyakaigor pushed a commit to inoyakaigor/webpack-notifier-2 that referenced this pull request Dec 10, 2019
# Conflicts:
#	CHANGELOG.md
@Gvozd
Copy link
Collaborator

Gvozd commented Nov 4, 2020

This option different from current default behaviour, when build succeed(with no errors)
This option fully ignored alwaysNotify, excludeWarnings options, and lastBuildSucceeded
And only shows failed builds

Comparasion:

  1. Success build, that fixed after previos error - are shown by default. But are not shown with onlyOnError
  2. Warnings - are shown by default. But are not shown with onlyOnError

code may be simplification for the greater of clarity:

if (stats.hasErrors()) {
    error = findFirstDFS(stats.compilation, 'errors');
 } else if (this.options.onlyOnError) {
    return;
 } else if (stats.hasWarnings() && !this.options.excludeWarnings) {
... // current code

@Gvozd
Copy link
Collaborator

Gvozd commented Nov 15, 2020

rebased manually

@Gvozd Gvozd closed this Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants