octokit / request-action

A GitHub Action to send arbitrary requests to GitHub's REST API

Home Page:https://github.com/marketplace/actions/GitHub-API-Request

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

y-nk opened this issue · comments

image

I tried:

  • required_contexts: "" → yaml does not complain but API does
  • required_contexts: false → yaml does not complain but API does
  • required_contexts: [] → github action does not start, claims some syntax error in the yaml
  • required_contexts: null → github action does start despite the error, but sends undefined instead of null which ends in error (as shown)

The docs of the endpoint:
image

Could you have a look ?

( Already filed an issue here: SchemaStore/schemastore#1819 )

Can you try

required_contexts: |
  []

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

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?

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 .

@gr2m would you accept a PR using this strategy: SchemaStore/schemastore#1819 (comment)?

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: #2

I tested this out by using:

with:
  required_contexts: '[]'

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

thank you @sarkis