request-action: [Blocked] Warnings about unexpected inputs
Hello, I have a step in my workflow like:
- name: Get count of commits ahead of merge base
id: github_compare
uses: octokit/request-action@v2.x
with:
route: GET /repos/:repository/compare/:base...:head
repository: ${{ github.repository }}
base: ${{ github.base_ref }}
head: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
When the workflow runs, I see Annotations about unexpected inputs, and in the workflow output, I see:
##[warning]Unexpected input 'repository', valid inputs are ['route', 'mediaType']
##[warning]Unexpected input 'base', valid inputs are ['route', 'mediaType']
##[warning]Unexpected input 'head', valid inputs are ['route', 'mediaType']
Run octokit/request-action@v2.x
with:
route: GET /repos/:repository/compare/:base...:head
repository: dgholz/my_repo
base: master
head: refs/pull/1/merge
mediaType: {}
env:
GITHUB_TOKEN: ***
GET /repos/:repository/compare/:base...:head
> repository: dgholz/my_repo
> base: master
> head: refs/pull/1/merge
> mediaType: [object Object]
< 200 451ms
How do I prevent these warnings from appearing?
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 26 (11 by maintainers)
Commits related to this issue
- fix(README): Add note about warnings to README (#38) Add some text explaining the cause of the warnings that are shown when using this action. The warnings are normal and can be ignored as long as a ... — committed to octokit/request-action by bryanwweber 4 years ago
- Update action.yml - try prevent Octokit/GHA warnings * Pass inputs to octokit as env variables instead of under the "with" section, to avoid "Unexpected inputs" warning (see https://github.com/octoki... — committed to magna-labs/miqa-test-kickoff by gwenn-magna a year ago
- Update action.yml - prevent Octokit/GHA warnings * Pass inputs to octokit as env variables instead of under the "with" section, to avoid "Unexpected inputs" warning (see octokit/request-action#26) *... — committed to magna-labs/miqa-test-kickoff-only by gwenn-magna a year ago
- Fix try workflow https://github.com/octokit/request-action/issues/26 — committed to yumauri/effector-storage by yumauri a year ago
Unfortunately there is no way to prevent these warnings, it looks like they are a recent change in the GitHub Actions runner. All inputs that are not defined in the
action.ymlfile now trigger this warning, and there is no flag to suppress them at this point ðŸ˜I’ll reach out to support and ask about it, we can leave the issue open for the time being
As a workaround you can pass inputs as env variables as follows:
@KodaCHC It seems to be unrelated to this issue. The library may not allow query parameters in a route (but expects them in as separate params, as you showed in the first example). Back to the issue, try passing them as
INPUT_QandINPUT_PER_PAGEenv variables if you want to avoid warnings.make sure to contact support at support.github.com/contact to let them know about your use case. It will bump the priority. And the more use cases there are, the better. I have hope that a setting to suppress these warnings will be added, the sooner the better 😃