Skip to content

Commit 3dd04cb

Browse files
committed
fix(ci): use pr url to obtain contributors PR number
gh pr create does not support --json/--jq flags, which caused the contributors workflow to fail with 'unknown flag: --json'. Capture the PR URL printed by gh pr create and parse the number from it. Signed-off-by: Xiangyu Wang <wxyucs@gmail.com> Signed-off-by: OpenCode (claude-opus-4.7) <noreply@opencode.ai> Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com>
1 parent 392bab1 commit 3dd04cb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/contributors.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ jobs:
5858
pr_number="$(gh pr list --base main --head "$branch" --state open --json number --jq '.[0].number // empty')"
5959
6060
if [ -z "$pr_number" ]; then
61-
pr_number="$(gh pr create --base main --head "$branch" --title "$title" --body "" --json number --jq '.number')"
61+
pr_url="$(gh pr create --base main --head "$branch" --title "$title" --body "")"
62+
pr_number="${pr_url##*/}"
6263
else
6364
gh pr edit "$pr_number" --title "$title" --body ""
6465
fi

0 commit comments

Comments
 (0)