name: "Check for mean comments"
on:
  issue_comment:
    types:
      - created

jobs:
  sentiment:
    runs-on: ubuntu-latest
    if: ${{ github.event.issue.pull_request }}
    steps:
      - env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_DEFAULT_REGION: us-west-2
        run: |
          commenter="${{ github.event.comment.user.login }}"
          body="$(echo '${{ github.event.comment.body }}' | sed '/^$/d')"
          owner="${{ github.event.repository.owner.login }}"
          repo="${{ github.event.repository.name}}"
          pull_number="${{ github.event.issue.number }}"
          issue_id="${{ github.event.issue.id }}"

          # Send comment body to AWS for sentiment analysis
          sentiment=$(aws comprehend detect-sentiment --language-code en --text "${body}" | jq -r ".Sentiment")

          if [ "NEGATIVE" = "${sentiment}" ]; then
            # Create a comment on this pull request
            hub api /repos/${owner}/${repo}/issues/${pull_number}/comments -f body="> ${body}

            @${commenter} Please don't be a dick"
          fi

name: "Check for mean comments"
on:
  issue_comment:
    types:
      - created

jobs:
  sentiment:
    runs-on: ubuntu-latest
    if: ${{ github.event.issue.pull_request }}
    steps:
      - env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_DEFAULT_REGION: us-west-2
        run: |
          commenter="${{ github.event.comment.user.login }}"
          body="$(echo '${{ github.event.comment.body }}' | sed 's/^/>/')"
          owner="${{ github.event.repository.owner.login }}"
          repo="${{ github.event.repository.name}}"
          pull_number="${{ github.event.issue.number }}"
          issue_id="${{ github.event.issue.id }}"

          # Send comment body to AWS for sentiment analysis
          sentiment=$(aws comprehend detect-sentiment --language-code en --text "${body}" | jq -r ".Sentiment")

          if [ "NEGATIVE" = "${sentiment}" ]; then
            # Create a comment on this pull request
            hub api /repos/${owner}/${repo}/issues/${pull_number}/comments -f body="${body}

            @${commenter} Please don't be a dick"
          fi

Insert quote at every new line
Insert quote at every new line
