Skip to content

Commit

Permalink
chore(all): Modifed the setting to notify all comments update (#3574)
Browse files Browse the repository at this point in the history
* Modifed the setting to notify all comments update

* Added Environmental Variable

---------

Co-authored-by: JoonWon Choi <joonwonc@amazon.com>
  • Loading branch information
joon-won and JoonWon Choi authored May 16, 2024
1 parent 3e45ea6 commit 5ad725b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/notify_comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# The type of runner that the job will run on
runs-on: ubuntu-latest

if: ${{ !github.event.issue.pull_request && (github.event.issue.state == 'closed' || contains(github.event.issue.labels.*.name, 'pending-response') || contains(github.event.issue.labels.*.name, 'closing-soon-if-no-response')) }}
if: ${{ !github.event.issue.pull_request }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -25,5 +25,6 @@ jobs:
WEBHOOK_URL: ${{ secrets.SLACK_COMMENT_WEBHOOK_URL }}
BODY: ${{ toJson(github.event.comment.body) }}
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 '{"issue":"'$COMMENT_URL'", "body":"{}"}'
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"'$COMMENT_URL'", "body":"{}", "user":"'$USER'"}'

0 comments on commit 5ad725b

Please sign in to comment.