name: No important files changed

on:
  pull_request_target:
    types: [opened]
    branches: [main]
    paths:
      - "exercises/concept/**"
      - "exercises/practice/**"
      - "!exercises/*/*/.approaches/**"
      - "!exercises/*/*/.articles/**"
      - "!exercises/*/*/.docs/**"
      - "!exercises/*/*/.meta/**"

permissions:
  pull-requests: write

jobs:
  check:
    uses: exercism/github-actions/.github/workflows/check-no-important-files-changed.yml@main
    with:
      repository: ${{ github.event.pull_request.head.repo.owner.login }}/${{ github.event.pull_request.head.repo.name }}
      ref: ${{ github.head_ref }}
