Rules
FP107 · optional-forwarded-to-required
A required input of a callee is fed from an optional input that has no default.
| Code | Name | Category | Default severity |
|---|---|---|---|
FP107 | optional-forwarded-to-required | Inputs | 🟡 warning |
Why it matters
The call looks complete, so GitHub never complains about the required input, but when the outer caller omits the optional value the callee receives an empty string. The "required" guarantee is lost one level up.
How to fix
Make the outer input required too, give it a default, or add a fallback: $\{\{ inputs.x || 'value' \}\}.
Example
# pipeline.yml
inputs:
config: { type: string, required: false }
jobs:
test:
uses: ./.github/workflows/test.yml
with:
config: ${{ inputs.config }} # test.yml: config is requiredConfigure
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP107: off
# or: optional-forwarded-to-required: errorExplain it in the terminal:
flowpact explain FP107