-
Notifications
You must be signed in to change notification settings - Fork 47
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
Cannot read property 'head' of undefined #200
Comments
I get the same. Here is my workflow file .github/workflows/main.yml:
The checks also pass for me. |
I got this error as well but only when I run action on pull request. When I configure action to execute on push, action performs linting successfully. Here is my workflow file: on:
- pull_request
name: Spectral Lint
jobs:
spectralChecks:
name: Spectral checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Spectral checks
uses: stoplightio/[email protected]
with:
file_glob: '*.yaml' |
This still seems to be happening with v0.6.1 . Here are the offending lines: spectral-action/src/octokit.ts Lines 44 to 47 in 7db38ab
I used $ jq .pull_request.head.sha < ${GITHUB_EVENT_PATH}
"626a9aa05ab0032c6253f56e741752b263464e5e" The SHA looks correct. |
@bzmw I found a potential fix. You can test it by using the hotfix branch # Run Spectral
- uses: genesiscloud/spectral-action@fix/pull_request_sha
with:
file_glob: 'reference/v2/Index.yaml' |
This is still an issue. |
Describe the bug
During a run of the Github Actions I get the following:
To Reproduce
main.yml
Additional context
This also results in a 'pass' for the Github 'Check' which is surprising, I would expect an error on the command output to exit with 0 and show this as a failure.
The text was updated successfully, but these errors were encountered: