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

Check fails even if body is empty #18

Open
Sashasugar opened this issue Oct 9, 2023 · 1 comment
Open

Check fails even if body is empty #18

Sashasugar opened this issue Oct 9, 2023 · 1 comment

Comments

@Sashasugar
Copy link

Sashasugar commented Oct 9, 2023

If "depends on" or "blocked by" value isn't set in the body the check is failing on 404

RequestError [HttpError]: Not Found
    at /home/runner/work/_actions/gregsdennis/dependencies-action/main/node_modules/@octokit/request/dist-node/index.js:66:23
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async run (/home/runner/work/_actions/gregsdennis/dependencies-action/main/index.js:78:39) {
  status: 404,

Commit example
image

Expected behaviour is if the body is empty or no string match the check should pass through or have a custom flag to ignore 404 responses

@gregsdennis
Copy link
Owner

gregsdennis commented Oct 10, 2023

@Sashasugar I don't think the reasoning is right. There wouldn't be a 404 because the body is empty.

A 404 might result from the PR not existing, and I don't see how that can happen since the workflow should trigger from a PR creation or change. You'd get a different error if the body was missing.

What does your workflow file look like?


I check for an empty body here:

if (!pullRequest.body){
core.info('body empty')
return;
}

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