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

Fix --level reviewdog option when fail_on_error is false #99

Merged

Conversation

daniele-pini
Copy link
Contributor

Description

According to the definition of the core.getInput function, the return type is a string:

/**
 * Gets the value of an input.
 * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
 * Returns an empty string if the value is not defined.
 *
 * @param     name     name of the input to get
 * @param     options  optional. See InputOptions.
 * @returns   string
 */
export function getInput(name: string, options?: InputOptions): string {

The default assigned to the value is also a string:

  fail_on_error:
    description: |
      Exit code for reviewdog when errors are found [true,false]
      Default is `false`.
    required: false
    default: "false"

Except fail_on_error was used like a boolean in code. This PR fixes the comparison to check against the 'true' string value.

@jdkato jdkato merged commit 7542b61 into errata-ai:reviewdog Sep 25, 2023
@daniele-pini daniele-pini deleted the fail_on_error_false_level_fix branch September 25, 2023 13:14
@daniele-pini daniele-pini restored the fail_on_error_false_level_fix branch September 25, 2023 13:29
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.

2 participants