mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: use pulls API instead of gh pr view for PR/issue detection
gh pr view can't distinguish PRs from issues — it succeeds for both.
Use the REST API endpoint repos/{owner}/{repo}/pulls/{number} which
returns 404 for issues.
This commit is contained in:
5
.github/workflows/pr-qa.yaml
vendored
5
.github/workflows/pr-qa.yaml
vendored
@@ -96,7 +96,8 @@ jobs:
|
||||
echo "number=${NUM}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [ -n "$NUM" ]; then
|
||||
if gh pr view "$NUM" --repo "$REPO" --json number >/dev/null 2>&1; then
|
||||
# Use the API to check if it's a PR (gh pr view can't distinguish)
|
||||
if gh api "repos/${REPO}/pulls/${NUM}" --jq '.number' >/dev/null 2>&1; then
|
||||
echo "target_type=pr" >> "$GITHUB_OUTPUT"
|
||||
echo "Target: PR #$NUM"
|
||||
else
|
||||
@@ -492,7 +493,7 @@ jobs:
|
||||
echo "number=${NUM}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [ -n "$NUM" ]; then
|
||||
if gh pr view "$NUM" --repo "$REPO" --json number >/dev/null 2>&1; then
|
||||
if gh api "repos/${REPO}/pulls/${NUM}" --jq '.number' >/dev/null 2>&1; then
|
||||
echo "target_type=pr" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "target_type=issue" >> "$GITHUB_OUTPUT"
|
||||
|
||||
Reference in New Issue
Block a user