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

Action raises errors for non PR check runs #10

Open
dlackty opened this issue May 28, 2022 · 0 comments · May be fixed by #11
Open

Action raises errors for non PR check runs #10

dlackty opened this issue May 28, 2022 · 0 comments · May be fixed by #11

Comments

@dlackty
Copy link

dlackty commented May 28, 2022

While trying to debug #9 , I set up a sample project and found an issue that this action now only works with pull requests:

/action/lib/github_client.rb:40:in `request_http': Not Found: {"message":"Not Found","documentation_url":"https://docs.github.com/rest"} (RuntimeError)
[236](https://github.com/polydice/railsgoat/runs/6637854982?check_suite_focus=true#step:4:237)
	from /action/lib/github_client.rb:19:in `post'
[237](https://github.com/polydice/railsgoat/runs/6637854982?check_suite_focus=true#step:4:238)
	from /action/lib/github_check_run_service.rb:47:in `client_post_pull_requests'
[238](https://github.com/polydice/railsgoat/runs/6637854982?check_suite_focus=true#step:4:239)
	from /action/lib/github_check_run_service.rb:31:in `block in run'
[239](https://github.com/polydice/railsgoat/runs/6637854982?check_suite_focus=true#step:4:240)
	from /action/lib/github_check_run_service.rb:28:in `each'
[240](https://github.com/polydice/railsgoat/runs/6637854982?check_suite_focus=true#step:4:241)
	from /action/lib/github_check_run_service.rb:28:in `each_slice'
[241](https://github.com/polydice/railsgoat/runs/6637854982?check_suite_focus=true#step:4:242)
	from /action/lib/github_check_run_service.rb:28:in `run'
[242](https://github.com/polydice/railsgoat/runs/6637854982?check_suite_focus=true#step:4:243)
	from /action/lib/index.rb:34:in `<main>'

Specifically, the following code causes the issue:

https://github.com/cookpad/brakeman-linter-action/blob/v2.0.1-rc.1/lib/github_check_run_service.rb#L62-L64

Maybe we should check if this is an action run triggered by PR before calling this GitHub API?

@dlackty dlackty linked a pull request Aug 19, 2022 that will close this issue
1 task
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

Successfully merging a pull request may close this issue.

1 participant