name: Vouch - Manage by Issue

on:
  issue_comment:
    types: [created]

permissions:
  contents: write
  issues: write

jobs:
  manage:
    runs-on: warp-ubuntu-latest-x64-2x
    if: >-
      contains(github.event.comment.body, 'vouch') ||
      contains(github.event.comment.body, 'denounce') ||
      contains(github.event.comment.body, 'unvouch')
    steps:
      - uses: mitchellh/vouch/action/manage-by-issue@c6d80ead49839655b61b422700b7a3bc9d0804a9 # v1.4.2
        with:
          comment-id: ${{ github.event.comment.id }}
          issue-id: ${{ github.event.issue.number }}
        env:
          GH_TOKEN: ${{ github.token }}
