name: DangerJS Pull Request linter
on:
  pull_request_target:
    types: [opened, edited, reopened, synchronize]

permissions:
  pull-requests: write
  contents: write

jobs:
  pull-request-style-linter:
    runs-on: ubuntu-latest
    steps:
    - name: Check out PR head
      uses: actions/checkout@v4
      with:
        ref: ${{ github.event.pull_request.head.sha }}

    - name: DangerJS pull request linter
      uses: espressif/shared-github-dangerjs@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
