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

Most upvoted comments

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.yml file 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:

      - 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
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          INPUT_REPOSITORY: ${{ github.repository }}
          INPUT_BASE: ${{ github.base_ref }}
          INPUT_HEAD: ${{ github.ref }}

@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_Q and INPUT_PER_PAGE env 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 😃