name: Sanitize comment

on:
  issue_comment:
    types: [created, edited]

permissions:
  issues: write

jobs:
  sanitize-comment:
    name: Sanitize comment
    if: vars.SANITIZE_COMMENT && !github.event.issue.pull_request
    runs-on: ubuntu-latest
    steps:
      - name: Sanitize comment
        uses: yt-dlp/sanitize-comment@v1
