Skip to content

Commit

Permalink
Fix check for existing PRs (#7137)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna authored Dec 6, 2023
1 parent f3b82e0 commit 2cda9d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scripts/brew_formula_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ ssh-agent bash -c 'ssh-add /secrets/ssh-secrets/ssh-privatekey; ssh -o StrictHos

echo "Added ssh private key\n"

PR_EXISTS=$(gh pr list | grep -c "${PR_BRANCH}" || true)
if [ $PR_EXISTS -eq 0 ]; then
PR_EXISTS=$(GH_PAGER="" gh pr list --json number -H "${PR_BRANCH}")
if [ "$PR_EXISTS" = "[]" ]; then
gh pr create --title "$PR_TITLE" --body "$PR_BODY" --repo "${UPSTREAM_ORG}/${REPO}"
fi

4 changes: 2 additions & 2 deletions scripts/create_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ssh-agent bash -c 'ssh-add /secrets/ssh-secrets/ssh-privatekey; ssh -o StrictHos

gh auth login --with-token < /secrets/github-secrets/token

PR_EXISTS=$(gh pr list | grep -c "${PR_BRANCH}" || true)
if [ $PR_EXISTS -eq 0 ]; then
PR_EXISTS=$(GH_PAGER="" gh pr list --json number -H "${PR_BRANCH}")
if [ "$PR_EXISTS" = "[]" ]; then
gh pr create --title "$PR_TITLE" --body "$PR_BODY"
fi
4 changes: 2 additions & 2 deletions scripts/golden_create_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ssh-agent bash -c 'ssh-add /secrets/ssh-secrets/ssh-privatekey; ssh -o StrictHos

gh auth login --with-token < /secrets/github-secrets/token

PR_EXISTS=$(gh pr list | grep -c "${PR_BRANCH}" || true)
if [ $PR_EXISTS -eq 0 ]; then
PR_EXISTS=$(GH_PAGER="" gh pr list --json number -H "${PR_BRANCH}")
if [ "$PR_EXISTS" = "[]" ]; then
gh pr create --title "$PR_TITLE" --body "$PR_BODY"
fi

0 comments on commit 2cda9d6

Please sign in to comment.