Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add comment author to slack webhook payload #2812

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/issue_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading