name: "CLA Assistant"
on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened, closed, synchronize]

jobs:
  CLAssistant:
    runs-on: ubuntu-latest
    steps:
      - name: "CLA Assistant"
        if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
        uses: cla-assistant/github-action@v2.1.3-beta
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_PERSONAL_ACCESS_TOKEN }}
        with:
          path-to-signatures: "${{ github.event.repository.name }}/signatures/version1/cla.json"
          path-to-document: "https://gist.github.com/kaiachain-dev/bbf65cc330275c057463c4c94ce787a6" # kaia Gist
          branch: "main"
          allowlist: dependabot[bot]
          remote-repository-name: ${{ secrets.CLA_REPOSITORY }}
