* Resolve the effective minimum severity from the two supported inputs. * * The two inputs do NOT carry defaults in `action.yml`. That keeps * `core.getInput()` returning `''` when a workflow has not set the input, * which is what lets a workflow that only sets the alias (`minimum-severity`) *
()
| 74 | * emitted so the workflow author can collapse the inputs. |
| 75 | */ |
| 76 | function resolveMinimumSeverityInput(): string { |
| 77 | const primary = core.getInput('min-severity').trim(); |
| 78 | const alias = core.getInput('minimum-severity').trim(); |
| 79 | |
| 80 | if (primary && alias && primary !== alias) { |
| 81 | core.warning( |
| 82 | `Both min-severity (${primary}) and minimum-severity (${alias}) are set; using min-severity. minimum-severity is an alias and should only be set when min-severity is unset.`, |
| 83 | ); |
| 84 | } |
| 85 | |
| 86 | return primary || alias || DEFAULT_MINIMUM_SEVERITY; |
| 87 | } |
| 88 | |
| 89 | function getActionInputs(): ActionInputs { |
| 90 | return { |
no outgoing calls
no test coverage detected
searching dependent graphs…