Skip to content

Commit

Permalink
Update package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jandroav authored Sep 5, 2024
1 parent 9b1fa38 commit e3fce7f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ jobs:
# Search for open pull requests with the specified title in the Homebrew/homebrew-core repo
pr_exists=$(gh pr list --repo Homebrew/homebrew-core --state open --search "$pr_title" --json title --jq ".[] | select(.title == \"$pr_title\") | .title" || true)
echo "pr_exists: $pr_exists"
# Trim any leading/trailing whitespace (if any) from pr_exists
pr_exists=$(echo "$pr_exists" | xargs)
echo "pr_exists: '$pr_exists'"
# Set the environment variable based on whether the PR exists
if [ -n "$pr_exists" ] && [ "$pr_exists" != "null" ]; then
if [ -n "$pr_exists" ]; then
echo "PR_EXISTS=true" >> $GITHUB_ENV
else
echo "PR_EXISTS=false" >> $GITHUB_ENV
Expand Down

0 comments on commit e3fce7f

Please sign in to comment.