Skip to content

Fix PR-comment poster never posting (artifact extracted to wrong path) - #150

Merged
ewels merged 2 commits into
mainfrom
fix-pr-comment-artifact-path
Jun 23, 2026
Merged

Fix PR-comment poster never posting (artifact extracted to wrong path)#150
ewels merged 2 commits into
mainfrom
fix-pr-comment-artifact-path

Conversation

@ewels

@ewels ewels commented Jun 23, 2026

Copy link
Copy Markdown
Member

Follow-up fix to #148. The consolidated pr-comment.yml poster was triggering correctly but never actually posting a comment.

Note

Opened against main rather than dev, matching #148.

The bug

dawidd6/action-download-artifact, when given a single name:, extracts the artifact's contents into the workspace root (Local path: ./). So the producer files landed as ./comment.md, ./header.txt, ./pr_number.txtnot under ./pr-comment/.

The metadata step starts with:

[ -f pr-comment/comment.md ] || exit 0

That path never existed, so the step silently exited 0 (post left unset) and the "Post PR comment" step was always skipped. Confirmed in run 28020783610 — the artifact downloaded fine (inflating: comment.md at root), but steps.meta.outputs.post evaluated to null.

The fix

Add path: pr-comment to the download step so the files land under pr-comment/, where the rest of the workflow already looks for them. No other changes needed.

🤖 Generated with Claude Code

`dawidd6/action-download-artifact` with a single `name:` extracts the
artifact's contents into the workspace root, so `comment.md`,
`header.txt` and `pr_number.txt` landed at `./` — not under
`pr-comment/`. The metadata step's `[ -f pr-comment/comment.md ] || exit 0`
therefore always bailed and no comment was ever posted.

Add `path: pr-comment` to the download step so the files land where the
rest of the workflow expects them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mashehu

mashehu commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

please add debug logging as well

Log the downloaded artifact contents and distinguish "no artifact" from
"artifact present but no comment body" so a future path/artifact mismatch
is visible in the run output rather than silently posting nothing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewels
ewels merged commit 6383571 into main Jun 23, 2026
9 of 11 checks passed
@ewels
ewels deleted the fix-pr-comment-artifact-path branch June 23, 2026 13:49
@ewels ewels mentioned this pull request Jun 23, 2026
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 this pull request may close these issues.

2 participants