From 7ce6a99036374c5653d1da8e010abfc0ec4b6ef1 Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Mon, 27 Jun 2022 20:14:20 +0900 Subject: [PATCH] test --- .github/workflows/add-to-project.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index f55de1d65..7d600a7cf 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -58,9 +58,18 @@ jobs: shell: bash -xe {0} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }} - PROJECT: "てすと" + TARGET: ${{ github.event.issue.node_id || github.event.pull_request.node_id }} + PROJECT: "PRO_kwLOHRQYxM4A3d8I" steps: - run: | - gh issue edit $NUMBER --add-project $PROJECT + gh api graphql \ + -F "target=$TARGET" \ + -F "projectId=$PROJECT" \ + -f query=' + mutation($target: ID!, $projectId: ID!) { + updateIssue(input: {id: $target, projectIds: [$projectId]}) { + issue { + number + } + } + }'