diff --git a/.github/workflows/create-comment.yml b/.github/workflows/create-comment.yml index dc67b4a..7482f9c 100644 --- a/.github/workflows/create-comment.yml +++ b/.github/workflows/create-comment.yml @@ -8,7 +8,7 @@ jobs: uses: actions/checkout@v2 - name: Run create-discussion-comment - uses: wesleyscholl/create-discussion-comment@v1.0.17 + uses: wesleyscholl/create-discussion-comment@v1.0.18 id: create-comment with: discussion-id: 'D_kwDOKEe7W84AVXOO' diff --git a/action.yml b/action.yml index 9aeb175..d9c21e0 100644 --- a/action.yml +++ b/action.yml @@ -33,18 +33,11 @@ runs: run: | RESPONSE=$(curl -v -X POST -H "Authorization: bearer ${{inputs.token}}" -H "Content-Type: application/json" -d '{"query": "mutation { addDiscussionComment(input: {body: \"${{inputs.body}}\" discussionId: \"${{inputs.discussion-id}}\" clientMutationId: \"${{inputs.client-mutation-id}}\"}) { clientMutationId comment { id body } } }"}' https://api.github.com/graphql) echo $RESPONSE - commentid=$($RESPONSE | jq -r '.data.addDiscussionComment.comment.id') - commentbody=$($RESPONSE | jq -r '.data.addDiscussionComment.comment.body') - echo "ID=$commentid" >> "$GITHUB_OUTPUT" - echo "BODY=$commentbody" >> "$GITHUB_OUTPUT" - - - name: Get Output Data - shell: bash - env: - ID: ${{ steps.discusscomment.outputs.ID }} - BODY: ${{ steps.discusscomment.outputs.BODY }} - run: | - echo $ID - echo $BODY + echo "Comment ID:" + echo $RESPONSE | jq -r '.data.addDiscussionComment.comment.id' + echo "Comment Body:" + echo $RESPONSE | jq -r '.data.addDiscussionComment.comment.body' + + \ No newline at end of file