From 7035d6344008904643b38cac2664ed0fffa8b77e Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 16 Dec 2021 14:03:52 +0100 Subject: [PATCH] fix --- .github/workflows/assign-to-project.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/assign-to-project.yml b/.github/workflows/assign-to-project.yml index 39e7d70..b653b02 100644 --- a/.github/workflows/assign-to-project.yml +++ b/.github/workflows/assign-to-project.yml @@ -54,7 +54,7 @@ jobs: return } else { - console.log(`project id: ${project.id}`) + console.log(`project id: ${project.id}.`) } // find the column @@ -70,26 +70,33 @@ jobs: return } else { - console.log(`column id: ${column.id}`) + console.log(`column id: ${column.id}.`) } + console.log('determine content type...') var content_type = null - if (github.event.name === 'issue') { + if (github.event_name === 'issues') { content_type = 'Issue' } - if (github.event.name === 'pull_request') { + if (github.event_name === 'pull_request') { content_type = 'PullRequest' } if (content_type === null) { - core.setFailed(`Unexpected event name "${github.event.name}".`) + core.setFailed(`Unexpected event name "${github.event_name}".`) + return + } + else { + console.log(`content type: ${content_type}.`) } + console.log('create the card...') await github.projects.createCard({ column_id: column.id, //note:, content_id: context.issue.number, content_type: content_type }) + console.log('created') /* await github.issues.update({