gregsdennis / dependencies-action

A GitHub Action that enforces PR dependencies
MIT License
33 stars 10 forks source link

Check fails even if body is empty #18

Open Sashasugar opened 1 year ago

Sashasugar commented 1 year ago

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 commented 1 year ago

@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:

https://github.com/gregsdennis/dependencies-action/blob/e1985f289b7fe06a25327acd061e78bc74865800/index.js#L84-L87