Skip to content

Commit

Permalink
Merge pull request #9 from rparadowski/12567_issue
Browse files Browse the repository at this point in the history
12567 issue
  • Loading branch information
MisRob authored Nov 27, 2024
2 parents b20d76e + c217ecb commit cb001ea
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/notify_team_new_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Send a slack notification when a contributor comments on issue

on:
workflow_call:
secrets:
SLACK_WEBHOOK_URL:
required: true

jobs:
contributor_issue_comment:
name: Contributor issue comment

if: >-
${{
!github.event.issue.pull_request &&
github.event.comment.author_association != 'MEMBER' &&
github.event.comment.author_association != 'OWNER'
}}
runs-on: ubuntu-latest
steps:
- name: Escape title double quotes
id: escape_title
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
run: echo "ISSUE_TITLE=${ISSUE_TITLE//\"/\\\"}" >> "$GITHUB_OUTPUT"

- name: Send message to Slack channel
uses: slackapi/[email protected]
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "*[Kolibri] New comment on issue: <${{ github.event.issue.html_url }}#issuecomment-${{ github.event.comment.id }}|${{ steps.escape_title.outputs.ISSUE_TITLE }} by ${{ github.event.comment.user.login }}>*"

0 comments on commit cb001ea

Please sign in to comment.