-
-
Notifications
You must be signed in to change notification settings - Fork 280
45 lines (43 loc) · 1.58 KB
/
sentiment-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo
name: 'Sentiment Analysis'
on:
issue_comment:
types:
- created
- edited
issues:
types:
- opened
- edited
pull_request:
types:
- opened
- edited
pull_request_review:
types:
- submitted
- edited
pull_request_review_comment:
types:
- created
- edited
jobs:
sentiments:
if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor) }}
name: Checking sentiments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check sentiment
uses: derberg/code-of-conduct-sentiment-analysis-github-action@v1
id: sentiments
with:
gcp_key: ${{ secrets.GCP_KEY_SENTIMENT }}
- uses: someimportantcompany/github-actions-slack-message@v1
# this step runs only if sentiment is a negative number
if: steps.sentiments.outputs.sentiment < -0.6
with:
webhook-url: ${{ secrets.SLACK_SENTIMENTS }}
text: Here ${{steps.sentiments.outputs.source}} you can find a potential negative text that requires your attention as the sentiment analysis score is ${{steps.sentiments.outputs.sentiment}}
color: orange