name: Component owners
on:
  pull_request_target:

jobs:
  run_self:
    runs-on: ubuntu-latest
    name: Assign component owners
    permissions:
      contents: read
      issues: write
      pull-requests: write
    if: github.repository_owner == 'open-telemetry'
    steps:
      - uses: dyladan/component-owners@v0.1.0
        with:
          config-file: .github/component-owners.yml
          repo-token: ${{ secrets.OPENTELEMETRYBOT_OPENTELEMETRY_IO_PAT }}
          assign-owners: false
