diff --git a/.github/workflows/pr-on-branch-push.yml b/.github/workflows/pr-on-branch-push.yml index 04b91a5..46c98fa 100644 --- a/.github/workflows/pr-on-branch-push.yml +++ b/.github/workflows/pr-on-branch-push.yml @@ -40,12 +40,12 @@ jobs: - name: Get linked issue number to PR id: get_issue_number run: | - ISSUE_NUMBER=$(jq --raw-output .issue.url <<< "$(curl -s -H "Authorization: token $GITHUB_TOKEN" ${{ github.event.pull_request.issue_url }})") + ISSUE_URL=$(jq --raw-output '.issue.url' <<< "${{ github.event.pull_request }}") + ISSUE_NUMBER=$(curl -sSL -H "Authorization: token $GITHUB_TOKEN" $ISSUE_URL | jq --raw-output '.number') echo "::set-output name=issue_number::$ISSUE_NUMBER" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Copy labels from linked issues if: ${{ steps.get_issue_number.outputs.issue_number }} uses: michalvankodev/copy-issue-labels@v1.3.0