diff --git a/.github/workflows/fmulero-test.yml b/.github/workflows/fmulero-test.yml index c9e44ebf75bc..17c2e39acd3d 100644 --- a/.github/workflows/fmulero-test.yml +++ b/.github/workflows/fmulero-test.yml @@ -18,11 +18,17 @@ jobs: - name: Get issue info id: get-issue run: | - issue_info=$(curl -s --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -X GET -G ${{ github.event.project_card.content_url }}) - assignees=$(echo $issue_info | jq -r '.assignees') - creator=$(echo $issue_info | jq -r '.user.login') + issue_info=$(curl -s --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -X GET -G "${{ github.event.project_card.content_url }}" ) + assignees="$(echo $issue_info | jq -r '.assignees')" + creator="$(echo $issue_info | jq -r '.user.login')" + pull_request="$(echo $issue_info | jq -r '.pull_request')" + type="pull_request" + if [[ "${pull_request}" == "null" ]]; then + type="issue" + fi echo "::set-output name=assignees::${assignees}" echo "::set-output name=creator::${creator}" + echo "::set-output name=type::${type}" - name: Dump getissue outputs env: ISSUE_OUTPUTS: ${{ toJson(steps.get-issue.outputs) }}