stoplightio / spectral-action

GitHub Action wrapper for Spectral - a JSON/YAML/OpenAPI/AsyncAPI/etc linter with custom rule support.
https://stoplight.io/open-source/spectral
Apache License 2.0
90 stars 46 forks source link

Improperly defined required inputs in `action.yml` #649

Closed kanadgupta closed 1 year ago

kanadgupta commented 1 year ago

Context

There are several inputs (repo_token, event_name) in the action.yml file that are denoted as required but have default values that are automatically populated by the GitHub Actions runner. These shouldn't be listed as required since they're getting flagged in GitHub Actions linters as missing parameters.

Current Behavior

When writing a GitHub Action workflow using this action, popular GitHub Actions extensions like this will flag the workflow as missing required parameters, even though the workflow runs just fine without them.

CleanShot 2023-01-05 at 14 57 47@2x

Expected Behavior

I should be able to use this in my workflow and only need to define the file_glob parameter.

Possible Workaround/Solution

Change this line and this line to be required: false.