Skip to content

Commit

Permalink
Specify branch for PR creation
Browse files Browse the repository at this point in the history
This is now effectively required due to a GitHub CLI bug that has been
fixed in recent versions but not yet propagated to GitHub Actions
runners.

<cli/cli#6485>
  • Loading branch information
victorlin committed Jan 14, 2025
1 parent 8a6e56f commit bdbdb63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/preview_on_downstream_repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
pr_url=$(gh pr list --head "$branch" --json url | jq -r '.[0].url')
if [ "$pr_url" = "null" ]; then
pr_url="$(gh pr create --title "$title" --body "$body" --draft)"
pr_url="$(gh pr create --head "$branch" --title "$title" --body "$body" --draft)"
echo "Pull request created: $pr_url" >> "$GITHUB_STEP_SUMMARY"
else
echo "Pull request updated: $pr_url" >> "$GITHUB_STEP_SUMMARY"
Expand Down

0 comments on commit bdbdb63

Please sign in to comment.