octokit / request-action

A GitHub Action to send arbitrary requests to GitHub's REST API
https://github.com/marketplace/actions/GitHub-API-Request
MIT License
369 stars 48 forks source link

`POST /repos/{owner}/{repo}/deployments`: cannot set `required_contexts` parameter #120

Closed y-nk closed 2 years ago

y-nk commented 3 years ago

image

I tried:

The docs of the endpoint: image

Could you have a look ?

( Already filed an issue here: https://github.com/SchemaStore/schemastore/issues/1819 )

gr2m commented 3 years ago

Can you try

required_contexts: |
  []
y-nk commented 3 years ago

@gr2m It went similarly. The issue being in schema store if i ever want to pass something else than declared.

gr2m commented 3 years ago

what exact error did you get? Can you enable debugging as described in https://github.com/octokit/request-action#debugging and share the full logs?

y-nk commented 3 years ago

i've moved away from it at the moment, so i cannot produce log anymore. that said, the log was pretty clear, the schema was invalid since an array was provided, as you could experience from vscode .

sarkis commented 2 years ago

@gr2m would you accept a PR using this strategy: https://github.com/SchemaStore/schemastore/issues/1819#issuecomment-945911086?

It doesn't look like there is any cleaner way to do this since it is an actions limitation.

I went digging through old issues and PRs and found that this is already possible to do thanks to: https://github.com/octokit/request-action/pull/2

I tested this out by using:

with:
  required_contexts: '[]'

should be safe to close this issue, unless I am missing something else :)

y-nk commented 2 years ago

thank you @sarkis