From 2d923b426cb2fd32be3e4f0f884034cd0fc8865b Mon Sep 17 00:00:00 2001 From: Fran Mulero Date: Thu, 15 Sep 2022 17:22:17 +0200 Subject: [PATCH] Debug moving-card events Signed-off-by: Fran Mulero --- .github/workflows/fmulero-test.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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) }}