From 6b075b98a2a009748f2692251fad7ba1d9d2a691 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Wed, 5 Nov 2025 14:59:36 -0500 Subject: [PATCH] Adding PR URL as output. --- action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/action.yml b/action.yml index 99a1284..2304028 100644 --- a/action.yml +++ b/action.yml @@ -82,11 +82,20 @@ runs: echo "pr_number=$pr_number" >> $GITHUB_OUTPUT - name: Skip PR Creation + id: skip-pr-creation if: steps.check-opened-pr-step.outputs.pr_number != '' shell: bash run: | echo -e "✅ A PR already exists for ${{ github.ref_name }} (PR #${{ steps.check-opened-pr-step.outputs.pr_number }})" + created_pr_url=$(tea pr ls --state open \ + -r ${{ github.repository }} \ + -f index,url \ + -o simple \ + | grep ${{ steps.check-opened-pr-step.outputs.pr_number }}' | awk '{print $2}') + + echo "pr_url=$created_pr_url" >> $GITHUB_OUTPUT + - name: PR Creation shell: bash if: steps.check-opened-pr-step.outputs.pr_number == '' @@ -126,9 +135,12 @@ runs: env: EXISTING_PR: ${{ steps.check-opened-pr-step.outputs.pr_number }} CREATED_PR: ${{ steps.pr-creation.outputs.created_pr_index }} + EXISTING_URL: ${{ steps.skip-pr-creation.outputs.pr_url }} + CREATED_URL: ${{ steps.pr-creation.outputs.pr_url }} run: | if [ -n "$EXISTING_PR" ]; then echo "pr_number=$EXISTING_PR" >> $GITHUB_OUTPUT + echo "pr_url=$" else echo "pr_number=$CREATED_PR" >> $GITHUB_OUTPUT fi