-
-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Describe the bug
If the action is executed in a job that doesn't have an attached PR (e.g. one that's triggered on GitHub releases), then the action will fail with
...
Run # Post output.
gh: Not Found (HTTP 404)
Error: Process completed with exit code 1.
This is not particularly descriptive error (it doesn't say what it tried to do when it got a 404), but I believe it's caused by this line being executed:
| Code executed | ||||
|---|---|---|---|---|
| ||||
| Source code | ||||
|
Lines 479 to 480 in 5b5ec65
|
As you can see, it's trying to fetch comments for issue "0", which is likely where the 404 error comes from.
I believe this problem was introduced in #503, since it moved the list_comments=... line out of the if [[ "$create_comment" == "true" && "${{ steps.identifier.outputs.pr }}" != "0" ]]; then gate that it used to be behind.
To Reproduce
Run a workflow triggered on e.g.
on:
release:
types: [published]
Call the action there.
Expected behavior
The action should not attempt to read comments from issue 0.
Screenshots
