From 512839ef7800fa32d78c47f160bdae3293ad22c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 3 Jan 2022 13:02:28 +0100 Subject: [PATCH] chore: simplify project GitHub Action --- .github/workflows/project.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 6968e5ad4..013255890 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -43,8 +43,7 @@ jobs: - name: Add to project env: - ISSUE_ID: ${{ github.event.issue.node_id }} - PR_ID: ${{ github.event.pull_request.node_id }} + ISSUE_OR_PR_ID: ${{ github.event.issue.node_id || github.event.pull_request.node_id }} run: | item_id="$(gh api graphql -f query=' mutation($project: ID!, $item: ID!) { @@ -54,7 +53,7 @@ jobs: } } } - ' -f project=$PROJECT_ID -f item=${ISSUE_ID:-$PR_ID} --jq '.data.addProjectNextItem.projectNextItem.id')" + ' -f project=$PROJECT_ID -f item=$ISSUE_OR_PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')" echo "ITEM_ID=$item_id" >> $GITHUB_ENV