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

Github-Check gives POST 404 error when used inside a cron job #832

Open
rickstaa opened this issue Dec 13, 2020 · 5 comments
Open

Github-Check gives POST 404 error when used inside a cron job #832

rickstaa opened this issue Dec 13, 2020 · 5 comments
Labels

Comments

@rickstaa
Copy link
Member

rickstaa commented Dec 13, 2020

I currently use a GitHub action that checks whether the following action still works inside the Linux, Mac and Windows runners. This action works fine when it is run with a pull request. When it is run because of a scheduled cron job I, however, get a reviewdog: post failed for flake8: failed to create check: POST https://api.github.com/repos///check-runs: 404 Not Found [] error. You can see the action workflow log here.

After some digging into the reviewdog code, I narrowed the error down to the info variable not being correct.

info := &BuildInfo{
Owner: event.Repository.Owner.Login,
Repo: event.Repository.Name,
PullRequest: event.PullRequest.Number,
Branch: event.PullRequest.Head.Ref,
SHA: event.PullRequest.Head.Sha,

It, therefore, looks like something goes wrong when the tool parses the GITHUB_EVENT_PATH variable. I am however not fully up to date with the codebase. Does anybody know why the BuildInfo is not parsed correctly when running in a cron job.

@rickstaa
Copy link
Member Author

rickstaa commented Jan 7, 2021

Closing this due to inactivity and since I haven't experienced the bug anymore.

@fviolette
Copy link

I'm experiencing this today, also on a schedule run. Any pointers, including information that would not be set on the repo side? Action is https://github.com/errata-ai/vale-action

@uoboda-splunk
Copy link

Facing the same issue. Do you plan to fix it?

@rickstaa
Copy link
Member Author

@fviolette and @uoboda-splunk I opened the issue again to bring it to the attention of the other maintainers.

@QuLogic
Copy link

QuLogic commented Dec 14, 2022

SHA: event.PullRequest.Head.Sha,

For a schedule event, won't there be no PullRequest portion of the context? I expect you want to look at the GITHUB_SHA environment variable, or perhaps event.sha (not sure if that's there on schedule events).

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

No branches or pull requests

4 participants