Skip to content
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

error in v5.4.2 #746

Closed
jinganix opened this issue Jul 23, 2023 · 3 comments
Closed

error in v5.4.2 #746

jinganix opened this issue Jul 23, 2023 · 3 comments

Comments

@jinganix
Copy link

jinganix commented Jul 23, 2023

There are two workflows PR and CI in the repo: https://github.com/jinganix/ddz/actions

CI: https://github.com/jinganix/ddz/blob/master/.github/workflows/ci.yml
PR: https://github.com/jinganix/ddz/blob/master/.github/workflows/pr.yml

PR workflow works fine in v5.4.1 and v5.4.2:

CI workflow works fine in v5.4.1, but fails in v5.4.2:

The error message is:

Error: You have commit messages with errors

error trying to get list of pull request's commits
Cannot read property 'map' of undefined
TypeError: Cannot read property 'map' of undefined
    at getPushEventCommits (/run.js:57:56)
    at getEventCommits (/run.js:65:62)
    at commitLinterAction (/run.js:166:34)
    at Object.<anonymous> (/run.js:168:1)
    at Module._compile (node:internal/modules/cjs/loader:[10](https://github.com/jinganix/ddz/actions/runs/5632512219/job/15264988759#step:4:11)95:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:[11](https://github.com/jinganix/ddz/actions/runs/5632512219/job/15264988759#step:4:12)24:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:[12](https://github.com/jinganix/ddz/actions/runs/5632512219/job/15264988759#step:4:13))
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:[17](https://github.com/jinganix/ddz/actions/runs/5632512219/job/15264988759#step:4:18):47
Error: You have commit messages with errors

The CI works fine again if I specify the version: uses: wagoid/commitlint-github-action@v5.4.1:

The error also occurred in another repo

@jinganix jinganix changed the title error in version 5.4.2 error in v5.4.2 Jul 23, 2023
@wagoid
Copy link
Owner

wagoid commented Jul 23, 2023

Hi @jinganix! I think that's because you have scheduled commits, let me throw a quick fix

@wagoid wagoid closed this as completed in 6249453 Jul 23, 2023
wagoid added a commit that referenced this issue Jul 23, 2023
fix: make sure action passes when event doesn't have commits fixes #746
@wagoid
Copy link
Owner

wagoid commented Jul 23, 2023

Issue fixed @jinganix, let me know if it still persists 💪

@jinganix
Copy link
Author

it works fine now, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants