# Workflow from https://github.com/mitchellh/vouch/tree/main/action/manage-by-issue
on:
  issue_comment:
    types: [created]

# Serialize updates to the VOUCHED file.
concurrency:
  group: vouch-manage
  cancel-in-progress: false

permissions:
  contents: write
  issues: write
  pull-requests: read

jobs:
  manage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: mitchellh/vouch/action/manage-by-issue@v1
        with:
          repo: ${{ github.repository }}
          issue-id: ${{ github.event.issue.number }}
          comment-id: ${{ github.event.comment.id }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
