name: News entry check
on:
  pull_request:
    paths:
      - "src/memray/**"
    types:
      - "opened"
      - "reopened"
      - "synchronize"
      - "labeled"
      - "unlabeled"

permissions: {}

jobs:
  news_entry_check:
    runs-on: ubuntu-latest
    name: Check for news entry
    steps:
      - name: "Check for news entry"
        uses: brettcannon/check-for-changed-files@d85c64d17b3c1d0ac57c9cc46ea39399b0d6fa71 # v1.2.2
        with:
          file-pattern: |
            news/*.rst
            NEWS.rst
          skip-label: "skip news"
          failure-message: "Missing a news file in ${file-pattern}; please add one or apply the ${skip-label} label to the pull request"
