MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / resolveMinimumSeverityInput

Function resolveMinimumSeverityInput

code-scan-action/src/main.ts:76–87  ·  view source on GitHub ↗

* 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`) *

()

Source from the content-addressed store, hash-verified

74 * emitted so the workflow author can collapse the inputs.
75 */
76function 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
89function getActionInputs(): ActionInputs {
90 return {

Callers 1

getActionInputsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…