From 63f3421920a9029209ddff5fb0d41fbac5d0f1fd Mon Sep 17 00:00:00 2001 From: Matt Creaser Date: Thu, 9 May 2024 11:30:12 -0300 Subject: [PATCH] Add comment author to slack webhook payload --- .github/workflows/issue_comment.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 2ebed99ba..4c0192156 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -8,15 +8,16 @@ jobs: notify: runs-on: ubuntu-latest permissions: {} - if: ${{ !github.event.issue.pull_request && !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} + if: ${{ !github.event.issue.pull_request }} steps: - name: Run webhook curl command env: WEBHOOK_URL: ${{ secrets.SLACK_COMMENT_WEBHOOK_URL }} BODY: ${{ toJson(github.event.comment.body) }} - COMMENT_URL: ${{github.event.comment.html_url}} + COMMENT_URL: ${{ github.event.comment.html_url }} + USER: ${{ github.event.comment.user.login }} shell: bash - run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'"}' + run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}' remove-pending-response-label: runs-on: ubuntu-latest