Commit 80f70b3
fix: fallback to issue comment API when PR review comment fetch fails
When the triggering event is pull_request_review_comment but the actual
comment created was a fallback issue comment (due to pending review error),
the update-comment-link script would fail with 404 because it only tried
the PR review comment API.
This change wraps the PR review comment fetch in its own try-catch so it
can fall through to try the issue comment API when the PR review comment
fetch fails (e.g., 404).
This fixes the scenario where:
1. User triggers @cuvvy via PR review comment
2. Initial comment reply fails with "user_id can only have one pending review"
3. Fallback creates an issue comment instead
4. Claude runs successfully
5. update-comment-link fails trying to fetch the issue comment via pulls API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent d0b730a commit 80f70b3
1 file changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | | - | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
| |||
0 commit comments