From 4a395e85d7cb12d4af1972e5d4996304a88dfb00 Mon Sep 17 00:00:00 2001 From: reinamora Date: Tue, 10 Sep 2024 14:16:27 -0500 Subject: [PATCH] chore: add with discussiond details --- .github/workflows/new_discussion_to_project.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new_discussion_to_project.yml b/.github/workflows/new_discussion_to_project.yml index f687b23..3ca6e89 100644 --- a/.github/workflows/new_discussion_to_project.yml +++ b/.github/workflows/new_discussion_to_project.yml @@ -16,8 +16,20 @@ jobs: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} + - name: Get discussion details + id: get-discussion + uses: actions/github-script@v6 + with: + github-token: ${{ steps.generate_token.outputs.token }} + script: | + console.log('Event payload:', JSON.stringify(context.payload, null, 2)); + const discussionId = context.payload.discussion.node_id; + console.log('Discussion ID:', discussionId); + return discussionId; + - name: Add to project uses: actions/add-to-project@v1.0.2 with: project-url: https://github.com/orgs/stampchain-io/projects/3 - github-token: ${{ steps.generate_token.outputs.token }} \ No newline at end of file + github-token: ${{ steps.generate_token.outputs.token }} + content-id: ${{ steps.get-discussion.outputs.result }} \ No newline at end of file