spectral-action icon indicating copy to clipboard operation
spectral-action copied to clipboard

Runtime type-check error for workflow_dispatch runs

Open behnam-oneschema opened this issue 2 months ago • 3 comments

When running my ci workflow with a manual dispatch, get this

Context

Step's details:

Run stoplightio/spectral-action@latest
  with:
    file_glob: docs/[...].yaml
    repo_token: ***
    event_name: workflow_dispatch

Current Behavior

Error: member 0
└─ required property "pull_request"
   └─ cannot decode undefined, should be Record<string, unknown>
member 1
└─ required property "after"
   └─ cannot decode undefined, should be string

Expected Behavior

No errors, like the action runs from PRs and pulls.

Possible Workaround/Solution

It looks like extending this runtime type to not expect a pull_request field all the times should do the job: https://github.com/stoplightio/spectral-action/blob/6416fd018ae38e60136775066eb3e98172143141/src/octokit.ts#L25-L39

Steps to Reproduce

Create a workflow with:

name: ci
on:
  push:
  workflow_dispatch:

and use this to run this action.

  • Version used: latest

behnam-oneschema avatar Oct 04 '25 00:10 behnam-oneschema

@stoplight-qa, @stoplight-bot, is this repo/github-action maintained? It's been broken for over 5 weeks now and there seem to be no movement towards fixing the issues.

Related issue: https://github.com/stoplightio/spectral-action/issues/680

behnam-oneschema avatar Nov 12 '25 21:11 behnam-oneschema

@behnam-oneschema sorry for the long wait on this - our team is looking into the issue.

If you already have a configured environment, could you check whether the problem also occurs with version 0.8.12? Confirming this would help us with the investigation and speed up the fix.

Thanks for your patience!

MichakrawSB avatar Nov 18 '25 07:11 MichakrawSB

Thanks, @MichakrawSB. I don't see any errors at the moment. Please feel free to close this, and I'll file a new one if I notice anything similar.

behnam-oneschema avatar Nov 21 '25 19:11 behnam-oneschema