# THIS CODE WAS AUTOGENERATED. DO NOT MODIFY THIS FILE DIRECTLY
# THE SOURCE CODE LIVES IN A DIFFERENT REPOSITORY:
#   - centralized-templates
# FILE STEWARD: @pleo-io/devx

name: Check PR
on:
  pull_request:
    types:
      - assigned
      - unassigned
      - labeled
      - unlabeled
      - opened
      - edited
      - closed
      - reopened
      - synchronize
      - ready_for_review
      - locked
      - unlocked
      - review_requested
      - review_request_removed

concurrency:
  group: ci-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  validate-pr:
    timeout-minutes: 5
    name: Validate PR
    permissions: write-all
    runs-on: ubuntu-latest

    steps:
      - name: Setup
        uses: actions/setup-node@v3

      - name: Run Danger
        run: npx danger ci -v --dangerfile pleo-io/danger-config/dangerfile.ts@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          DANGER_GITHUB_API_BASE_URL: https://api.github.com
