Skip to content

Commit 73d607b

Browse files
committed
Fix PR workflow against 404s
1 parent 2cdafd9 commit 73d607b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/claude-pr-review.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ jobs:
111111
issue_num=$(echo "$ref" | tr -d '#')
112112
fi
113113
114-
issue_json=$(gh api "repos/$issue_repo/issues/$issue_num" 2>/dev/null || echo "")
115-
if [ -n "$issue_json" ]; then
114+
if issue_json=$(gh api "repos/$issue_repo/issues/$issue_num" 2>/dev/null); then
116115
issues_array=$(echo "$issues_array" | jq --argjson item "$issue_json" '. + [$item]')
117116
fi
118117
done
@@ -182,7 +181,7 @@ jobs:
182181
issue_title=$(jq -r ".[$i].title" /tmp/linked-issues.json)
183182
issue_number=$(jq -r ".[$i].number" /tmp/linked-issues.json)
184183
issue_body=$(jq -r ".[$i].body // \"\"" /tmp/linked-issues.json)
185-
issue_repo=$(jq -r ".[$i].repository_url" /tmp/linked-issues.json | grep -oE '[^/]+/[^/]+$')
184+
issue_repo=$(jq -r ".[$i].repository_url // \"\"" /tmp/linked-issues.json | grep -oE '[^/]+/[^/]+$' || echo "unknown")
186185
issue_state=$(jq -r ".[$i].state" /tmp/linked-issues.json)
187186
188187
prompt+=$'\n'

0 commit comments

Comments
 (0)