-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Blocked] Warnings about unexpected inputs #26
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 I'll reach out to support and ask about it, we can leave the issue open for the time being |
👋 I've received a report from users of an action I maintain with similar warnings. In my case I define an input as a pattern rather than a static name to support user defined named sets of files included in a diff . The current action.yml file descriptor lacks an ability to express input names as patterns. Since inputs are just a conventionally named env variable in thier implementation I can have users just declare INPUT_ env names instead. That feels less than ideal for an interface. Is there any other way to suppress these on an per-action level? I understand why GitHub might have added these warnings. In my case, it makes a working action look broken. |
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 :) |
@gr2m thanks! Any ETA? |
Nothing that I heard. Did you check in with support? I think they are aware of the problem, but I'm not sure what the current state is, i have no insights myself. |
One issue is that the README in this repository suggests using the |
Very good idea! Would you like to send a PR? |
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 200 status code is returned. Related to #26.
@gr2m: Where is the |
The one in this repository: https://github.com/octokit/request-action/blob/master/action.yml |
@gr2m: Can I open a PR with two dozen common input names to avoid the most frequent warnings? |
sure, thank you! I was expecting GitHub to fix that swiftly but looks like it got lost in the backlog. |
also if you could reach out to https://support.github.com/contact as well that'd be helpful, it will prioritize the request to add some kind of flag to suppress warnings for undefined parameters |
There is an open issue on the actions runner repository to address this problem: The runner is open source and written in C#, I'm sure they'd accept a good PR. It's not something the actions team has currently on their roadmap. |
Any traction on above Warnings issue? I had a jackpot moment when I came across this action as it would save me on wrapping octokit steps in JavaScript (@actions/github-script), however those pesky warning Annotations are unpresentable to developers/business in a professional setting making every workflow look broken :-/ |
Can you reach out to support to bump the priority for getting this fixed? It’s been so long since there has been any movement in this :( |
+1 |
1 similar comment
+1 |
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/[email protected]
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 }} |
@cardinalby thank you. Can you say me what is the solution for issues? I use this:
If I do the same first without env variabeln I get no more results
|
@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 |
Danke Thanks for the answer. How do I specify q without listing it under with? |
See my initial answer, you can pass |
Thank you. I misunderstood that. This works really well. |
This comment was marked as off-topic.
This comment was marked as off-topic.
* Pass inputs to octokit as env variables instead of under the "with" section, to avoid "Unexpected inputs" warning (see octokit/request-action#26) * Change the set-output method to instead directly set output parameters to avoid warning "The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files" (see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/) * Update the http-request-action and octokit/request-action to latest
* Pass inputs to octokit as env variables instead of under the "with" section, to avoid "Unexpected inputs" warning (see octokit/request-action#26) * Change the set-output method to instead directly set output parameters to avoid warning "The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files" (see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/) * Update the http-request-action and octokit/request-action to latest
Shouldn't it be possible to have only a single |
I'm not sure if we implemented it for the action, but the underlying Octokit supports data: |
owner: ...
repo: ...
# etc I think it's less elegant though |
… warning (#34) BUILD-5711 Use fixed SHA for octokit/request-action That way we get predictable outputs (immutable) BUILD-5711 Fix warnings "Unexpected inputs" Following octokit/request-action#26 (comment)
Hello, I have a step in my workflow like:
When the workflow runs, I see Annotations about unexpected inputs, and in the workflow output, I see:
How do I prevent these warnings from appearing?
The text was updated successfully, but these errors were encountered: