diff --git a/action.yml b/action.yml index 7cfdbab..3e92932 100644 --- a/action.yml +++ b/action.yml @@ -140,6 +140,7 @@ runs: -a "${{ inputs.assignee }}" \ -L "${{ inputs.pr-label }}" \ --output simple \ + | grep -m1 '#' | awk '{print $1}' \ | tr -d '#') @@ -147,6 +148,11 @@ runs: pr_comments_url="${{ inputs.url }}/api/v1/repos/${{ github.repository }}/issues/${created_pr_index}/comments" + if [[ -z "${created_pr_index}" ]]; then + echo "::error::tea pr create returned an empty PR index — check tea output format" + exit 1 + fi + { echo "created_pr_index=${created_pr_index}" echo "pr_url=${created_pr_url}"