Issue Chill Action
About
This action reads a GitHub Issue and outputs its Sentiment Analysis, so you can detect whether its content is redacted in a way that make it sound positive or negative.
Example
Create a .github/workflows/issue-sentiment.yml
file in your repository with the following content
Make sure to replace and with your repository values.
# .github/workflows/issue-sentiment.yml
name: Issue Sentiment Analysis
on:
issues:
types: [opened, edited]
jobs:
add-comment:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Sentiment Analysis
id: sa
uses: oscarnevarezleal/issue-chill@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
owner: <org>
repo: <repo>
issue: ${{ github.event.issue.number }}
- name: Add positive comment
if: ${{ startsWith(steps.sa.outputs.IS_50_POS, 'true') }} # 60, 70, 80 and 90 also available
uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
with:
issue-number: ${{ github.event.issue.number }}
body: |
This issue
…