Skip to content

Commit

Permalink
try capturing gh output and parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuo-danswer committed Oct 9, 2024
1 parent d403840 commit 28fe0d1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/hotfix-release-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,13 @@ jobs:
continue
fi
# Create a new PR
PR_URL=$(gh pr create --title "Merge $HOTFIX_BRANCH into $RELEASE_BRANCH" \
# Create a new PR and capture the output
PR_OUTPUT=$(gh pr create --title "Merge $HOTFIX_BRANCH into $RELEASE_BRANCH" \
--body "Automated PR to merge \`$HOTFIX_BRANCH\` into \`$RELEASE_BRANCH\`." \
--head "$HOTFIX_BRANCH" --base "$RELEASE_BRANCH" --json url --jq '.url')
--head "$HOTFIX_BRANCH" --base "$RELEASE_BRANCH")
# Extract the URL from the output
PR_URL=$(echo "$PR_OUTPUT" | grep -Eo 'https://github.com/[^ ]+')
echo "Pull request created: $PR_URL"
Expand Down

0 comments on commit 28fe0d1

Please sign in to comment.